- only use the floatified version of findplayer.

This commit is contained in:
Christoph Oelckers 2022-09-14 22:49:01 +02:00
parent 848d7fc16e
commit 1fdfe4635b
3 changed files with 5 additions and 5 deletions

View file

@ -174,7 +174,7 @@ DDukeActor* LocateTheLocator(int n, sectortype* sectnum);
void clearcamera(player_struct* ps);
void LoadActor(DDukeActor* i, int p, int x);
void execute(DDukeActor* s, int p, int d);
void execute(DDukeActor* s, int p, double d);
void makeitfall(DDukeActor* s);
DAngle furthestangle(DDukeActor* snum, int angDiv);
void getglobalz(DDukeActor* s);

View file

@ -3703,7 +3703,7 @@ void LoadActor(DDukeActor *actor, int p, int x)
//
//---------------------------------------------------------------------------
void execute(DDukeActor *actor,int p,int x)
void execute(DDukeActor *actor,int p,double xx)
{
if (gs.actorinfo[actor->spr.picnum].scriptaddress == 0) return;
@ -3711,7 +3711,7 @@ void execute(DDukeActor *actor,int p,int x)
ParseState s;
s.g_p = p; // Player ID
s.g_x = x; // ??
s.g_x = int(xx / maptoworld); // ??
s.g_ac = actor;
s.g_t = &actor->temp_data[0]; // Sprite's 'extra' data
@ -3760,7 +3760,7 @@ void execute(DDukeActor *actor,int p,int x)
}
else
{
fi.move(actor, p, x);
fi.move(actor, p, int(xx / maptoworld));
if (actor->spr.statnum == STAT_ACTOR)
{

View file

@ -143,7 +143,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(DDukeActor, getglobalz, getglobalz)
player_struct* DukeActor_findplayer(DDukeActor* self)
{
int a;
double a;
return &ps[findplayer(self, &a)];
}