- fixed: ACS must use COPY_AAPTREX for all pointer transfers.

It was already correct for most, but two cases have slipped through.
This commit is contained in:
Christoph Oelckers 2019-02-24 12:10:56 +01:00
parent 6129f9a9cc
commit 0676a98efc

View file

@ -5363,7 +5363,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, int32_t *args)
case ACSF_SetActivator: case ACSF_SetActivator:
if (argCount > 1 && args[1] != AAPTR_DEFAULT) // condition (x != AAPTR_DEFAULT) is essentially condition (x). if (argCount > 1 && args[1] != AAPTR_DEFAULT) // condition (x != AAPTR_DEFAULT) is essentially condition (x).
{ {
activator = COPY_AAPTR(Level->SingleActorFromTID(args[0], activator), args[1]); activator = COPY_AAPTREX(Level, Level->SingleActorFromTID(args[0], activator), args[1]);
} }
else else
{ {
@ -6378,7 +6378,7 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
const int flags = args[5]; const int flags = args[5];
AActor* const reference = ((flags & WARPF_USEPTR) && (AAPTR_DEFAULT != dest)) AActor* const reference = ((flags & WARPF_USEPTR) && (AAPTR_DEFAULT != dest))
? COPY_AAPTR(activator, dest) ? COPY_AAPTREX(Level, activator, dest)
: Level->SingleActorFromTID(dest, activator); : Level->SingleActorFromTID(dest, activator);
if (nullptr == reference) if (nullptr == reference)