From e9702fc43dc6678c9b57a9e946b411dcd679bec9 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 1 Jun 2013 17:13:15 +0000 Subject: [PATCH] - Clean up excess code around a few calls to SingleActorFromTID(), since that function is already designed specifically to handle the case where tid is 0. SVN r4315 (trunk) --- src/p_acs.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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])); }