mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-27 22:42:57 +00:00
- 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)
This commit is contained in:
parent
037477a20b
commit
e9702fc43d
1 changed files with 3 additions and 3 deletions
|
@ -4598,7 +4598,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args)
|
||||||
FName varname(FBehavior::StaticLookupString(args[1]), true);
|
FName varname(FBehavior::StaticLookupString(args[1]), true);
|
||||||
if (varname != NAME_None)
|
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 a != NULL ? GetUserVariable(a, varname, 0) : 0;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -4637,7 +4637,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args)
|
||||||
FName varname(FBehavior::StaticLookupString(args[1]), true);
|
FName varname(FBehavior::StaticLookupString(args[1]), true);
|
||||||
if (varname != NAME_None)
|
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 a != NULL ? GetUserVariable(a, varname, args[2]) : 0;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -4649,7 +4649,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args)
|
||||||
|
|
||||||
case ACSF_CheckActorClass:
|
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]));
|
return a == NULL ? false : a->GetClass()->TypeName == FName(FBehavior::StaticLookupString(args[1]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue