diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 18ab347eb..cb7da1a53 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -4598,7 +4598,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args) FName varname(FBehavior::StaticLookupString(args[1]), true); if (varname != NAME_None) { - AActor *a = args[0] == 0 ? (AActor *)activator : SingleActorFromTID(args[0], NULL); + AActor *a = SingleActorFromTID(args[0], activator); return a != NULL ? GetUserVariable(a, varname, 0) : 0; } return 0; @@ -4637,7 +4637,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args) FName varname(FBehavior::StaticLookupString(args[1]), true); if (varname != NAME_None) { - AActor *a = args[0] == 0 ? (AActor *)activator : SingleActorFromTID(args[0], NULL); + AActor *a = SingleActorFromTID(args[0], activator); return a != NULL ? GetUserVariable(a, varname, args[2]) : 0; } return 0; @@ -4649,7 +4649,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args) case ACSF_CheckActorClass: { - AActor *a = args[0] == 0 ? (AActor *)activator : SingleActorFromTID(args[0], NULL); + AActor *a = SingleActorFromTID(args[0], activator); return a == NULL ? false : a->GetClass()->TypeName == FName(FBehavior::StaticLookupString(args[1])); }