The ifpdistl and ifpdistg commands are fixed now.

git-svn-id: https://svn.eduke32.com/eduke32@746 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hnt_ts 2008-05-30 22:45:43 +00:00
parent c380f40bc6
commit 8e40b85cfa
2 changed files with 15 additions and 7 deletions

View file

@ -548,9 +548,9 @@ void deletespriteEVENT(int s)
if (apScriptGameEvent[EVENT_KILLIT])
{
int p;
int pl=findplayer(&sprite[s],(int *)&p);
SetGameVarID(g_iReturnVarID,0, -1, -1);
OnEvent(EVENT_KILLIT, s, findplayer(&sprite[s],(int *)&p), p);
OnEvent(EVENT_KILLIT, s, pl, p);
if (GetGameVarID(g_iReturnVarID, -1, -1))
return;
}
@ -7589,8 +7589,10 @@ void moveobjects(void)
i = headspritestat[k];
while (i >= 0)
{
int pl;
j = nextspritestat[i];
OnEvent(EVENT_GAME,i, findplayer(&sprite[i],(int *)&p), p);
pl=findplayer(&sprite[i],(int *)&p);
OnEvent(EVENT_GAME,i, pl, p);
i = j;
}
}

View file

@ -4416,8 +4416,11 @@ int EGS(int whatsect,int s_x,int s_y,int s_z,int s_pn,int s_s,int s_xr,int s_yr,
ResetActorGameVars(i);
hittype[i].flags = 0;
if (apScriptGameEvent[EVENT_EGS])
OnEvent(EVENT_EGS,i, findplayer(&sprite[i],&p), p);
{
int pl=findplayer(&sprite[i],&p);
if (apScriptGameEvent[EVENT_EGS])
OnEvent(EVENT_EGS,i, pl, p);
}
return(i);
}
@ -6345,8 +6348,11 @@ int spawn(int j, int pn)
break;
}
if (apScriptGameEvent[EVENT_SPAWN])
OnEvent(EVENT_SPAWN,i, findplayer(&sprite[i],&p), p);
{
int pl=findplayer(&sprite[i],&p);
if (apScriptGameEvent[EVENT_SPAWN])
OnEvent(EVENT_SPAWN,i, pl, p);
}
return i;
}