Skip to content

Commit

Permalink
- ScriptedMarine already exists as a name so most literal occurences …
Browse files Browse the repository at this point in the history
…in the source could be replaced with more efficient direct use of the name.
  • Loading branch information
coelckers committed Jan 27, 2018
1 parent 7ceb70b commit 1794774
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/p_acs.cpp
Expand Up @@ -9852,7 +9852,7 @@ int DLevelScript::RunScript ()
if (STACK(2) != 0)
{
AActor *marine;
NActorIterator iterator("ScriptedMarine", STACK(2));
NActorIterator iterator(NAME_ScriptedMarine, STACK(2));

while ((marine = iterator.Next()) != NULL)
{
Expand All @@ -9861,7 +9861,7 @@ int DLevelScript::RunScript ()
}
else
{
if (activator != nullptr && activator->IsKindOf (PClass::FindClass("ScriptedMarine")))
if (activator != nullptr && activator->IsKindOf (NAME_ScriptedMarine)))
{
SetMarineWeapon(activator, STACK(1));
}
Expand All @@ -9878,7 +9878,7 @@ int DLevelScript::RunScript ()
if (STACK(2) != 0)
{
AActor *marine;
NActorIterator iterator("ScriptedMarine", STACK(2));
NActorIterator iterator(NAME_ScriptedMarine, STACK(2));

while ((marine = iterator.Next()) != NULL)
{
Expand All @@ -9887,7 +9887,7 @@ int DLevelScript::RunScript ()
}
else
{
if (activator != nullptr && activator->IsKindOf("ScriptedMarine"))
if (activator != nullptr && activator->IsKindOf(NAME_ScriptedMarine))
{
SetMarineSprite(activator, type);
}
Expand Down

0 comments on commit 1794774

Please sign in to comment.