- 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
|
|
@ -5189,7 +5189,7 @@ static DObject *BuiltinNew(PClass *cls, int outerside, int backwardscompatible)
|
|||
}
|
||||
else
|
||||
{
|
||||
object = level.CreateThinker(cls);
|
||||
object = currentVMLevel->CreateThinker(cls);
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
|
@ -8628,7 +8628,7 @@ FxExpression *FxActionSpecialCall::Resolve(FCompileContext& ctx)
|
|||
|
||||
int BuiltinCallLineSpecial(int special, AActor *activator, int arg1, int arg2, int arg3, int arg4, int arg5)
|
||||
{
|
||||
return P_ExecuteSpecial(special, nullptr, activator, 0, arg1, arg2, arg3, arg4, arg5);
|
||||
return P_ExecuteSpecial(currentVMLevel , special, nullptr, activator, 0, arg1, arg2, arg3, arg4, arg5);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(DObject, BuiltinCallLineSpecial, BuiltinCallLineSpecial)
|
||||
|
|
@ -8642,7 +8642,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(DObject, BuiltinCallLineSpecial, BuiltinCallLineSp
|
|||
PARAM_INT(arg4);
|
||||
PARAM_INT(arg5);
|
||||
|
||||
ACTION_RETURN_INT(P_ExecuteSpecial(special, nullptr, activator, 0, arg1, arg2, arg3, arg4, arg5));
|
||||
ACTION_RETURN_INT(P_ExecuteSpecial(currentVMLevel, special, nullptr, activator, 0, arg1, arg2, arg3, arg4, arg5));
|
||||
}
|
||||
|
||||
ExpEmit FxActionSpecialCall::Emit(VMFunctionBuilder *build)
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ IMPLEMENT_CLASS(DThinkerIterator, true, false);
|
|||
|
||||
static DThinkerIterator *CreateThinkerIterator(PClass *type, int statnum)
|
||||
{
|
||||
return Create<DThinkerIterator>(&level, type, statnum);
|
||||
return Create<DThinkerIterator>(currentVMLevel, type, statnum);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(DThinkerIterator, Create, CreateThinkerIterator)
|
||||
|
|
@ -109,7 +109,7 @@ public:
|
|||
}
|
||||
|
||||
DBlockLinesIterator(double x, double y, double z, double height, double radius, sector_t *sec)
|
||||
:FMultiBlockLinesIterator(check, &level, x, y, z, height, radius, sec)
|
||||
:FMultiBlockLinesIterator(check, currentVMLevel, x, y, z, height, radius, sec)
|
||||
{
|
||||
cres.line = nullptr;
|
||||
cres.Position.Zero();
|
||||
|
|
@ -183,7 +183,7 @@ public:
|
|||
}
|
||||
|
||||
DBlockThingsIterator(double checkx, double checky, double checkz, double checkh, double checkradius, bool ignorerestricted, sector_t *newsec)
|
||||
: iterator(check, &level, checkx, checky, checkz, checkh, checkradius, ignorerestricted, newsec)
|
||||
: iterator(check, currentVMLevel, checkx, checky, checkz, checkh, checkradius, ignorerestricted, newsec)
|
||||
{
|
||||
cres.thing = nullptr;
|
||||
cres.Position.Zero();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue