- added the missing Level parameters to AActor::StaticSpawn and P_ExecuteSpecial.
I think these were the last two still missing it, all remaining uses of the global level variable are in code that doesn't get run through a level tick and are supposed to access the primary level.
This commit is contained in:
parent
bf665961cc
commit
6c006a5fbd
25 changed files with 124 additions and 233 deletions
|
|
@ -855,7 +855,7 @@ void FParser::SF_Spawn(void)
|
|||
}
|
||||
|
||||
t_return.type = svt_mobj;
|
||||
t_return.value.mobj = Spawn(pclass, pos, ALLOW_REPLACE);
|
||||
t_return.value.mobj = Spawn(Level, pclass, pos, ALLOW_REPLACE);
|
||||
|
||||
if (t_return.value.mobj)
|
||||
{
|
||||
|
|
@ -2071,7 +2071,7 @@ void FParser::SF_LineTrigger()
|
|||
mld.special=intvalue(t_argv[0]);
|
||||
mld.tag=t_argc > 1 ? intvalue(t_argv[1]) : 0;
|
||||
Level->TranslateLineDef(&line, &mld);
|
||||
P_ExecuteSpecial(line.special, NULL, Script->trigger, false,
|
||||
P_ExecuteSpecial(Level, line.special, NULL, Script->trigger, false,
|
||||
line.args[0],line.args[1],line.args[2],line.args[3],line.args[4]);
|
||||
}
|
||||
}
|
||||
|
|
@ -2903,7 +2903,7 @@ void FParser::SF_SpawnExplosion()
|
|||
else
|
||||
pos.Z = Level->PointInSector(pos)->floorplane.ZatPoint(pos);
|
||||
|
||||
spawn = Spawn (pclass, pos, ALLOW_REPLACE);
|
||||
spawn = Spawn (Level, pclass, pos, ALLOW_REPLACE);
|
||||
t_return.type = svt_int;
|
||||
t_return.value.i=0;
|
||||
if (spawn)
|
||||
|
|
@ -3734,7 +3734,7 @@ void FParser::SF_SpawnShot2(void)
|
|||
|
||||
t_return.type = svt_mobj;
|
||||
|
||||
AActor *mo = Spawn(pclass, source->PosPlusZ(z), ALLOW_REPLACE);
|
||||
AActor *mo = Spawn(Level, pclass, source->PosPlusZ(z), ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
S_Sound(mo, CHAN_VOICE, mo->SeeSound, 1, ATTN_NORM);
|
||||
|
|
@ -3821,7 +3821,7 @@ void FParser::RunLineSpecial(const FLineSpecial *spec)
|
|||
if (t_argc>i) args[i]=intvalue(t_argv[i]);
|
||||
else args[i] = 0;
|
||||
}
|
||||
t_return.value.i = P_ExecuteSpecial(spec->number, NULL,Script->trigger,false, args[0],args[1],args[2],args[3],args[4]);
|
||||
t_return.value.i = P_ExecuteSpecial(Level, spec->number, NULL,Script->trigger,false, args[0],args[1],args[2],args[3],args[4]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue