Posted By: Jethro
Player Entity pointer is sometimes NULL after setting. - 05/22/08 13:18
A7.07 Pro.
Heres another weird problem after upgrading from A6.314 to A7.07, this fault is also in A6.60.
In 2 functions in my code, the Engine defined Player Pointer is NULL even after it is set with Player = ME in our main player movement routine.
In many other functions in the code Player is infact set to a valid entity, and lets my code past the
While (Player==NULL) {Wait(1);} varification loop.
So to fix the broken functions, I use MY_Player=ME; and PLAYER=ME; to set the pointer, and use
While (MY_Player==NULL) {Wait(1);} to wait until it is set
if vec_dist(my.x,MY_player.x)<200 etc.....
This all works fine, what could be reason for flakey Player pointer.
Jethro ...
Heres another weird problem after upgrading from A6.314 to A7.07, this fault is also in A6.60.
In 2 functions in my code, the Engine defined Player Pointer is NULL even after it is set with Player = ME in our main player movement routine.
In many other functions in the code Player is infact set to a valid entity, and lets my code past the
While (Player==NULL) {Wait(1);} varification loop.
So to fix the broken functions, I use MY_Player=ME; and PLAYER=ME; to set the pointer, and use
While (MY_Player==NULL) {Wait(1);} to wait until it is set
if vec_dist(my.x,MY_player.x)<200 etc.....
This all works fine, what could be reason for flakey Player pointer.
Jethro ...