- remove some redundancy from TeleportFog code.

This commit is contained in:
Christoph Oelckers 2015-04-28 22:11:43 +02:00
parent 15fbf2510a
commit f087903fca
2 changed files with 4 additions and 6 deletions

View file

@ -4755,8 +4755,8 @@ static void SetActorTeleFog(AActor *activator, int tid, FString telefogsrc, FStr
FActorIterator iterator(tid);
AActor *actor;
const PClass * const src = telefogsrc.IsNotEmpty() ? PClass::FindClass(telefogsrc) : NULL;
const PClass * const dest = telefogdest.IsNotEmpty() ? PClass::FindClass(telefogdest) : NULL;
const PClass *src = PClass::FindClass(telefogsrc);
const PClass * dest = PClass::FindClass(telefogdest);
while ((actor = iterator.Next()))
{
if (telefogsrc.IsNotEmpty())

View file

@ -1410,8 +1410,7 @@ DEFINE_PROPERTY(stamina, I, Actor)
DEFINE_PROPERTY(telefogsourcetype, S, Actor)
{
PROP_STRING_PARM(str, 0);
if (!stricmp(str, "") || !stricmp(str, "none")) defaults->TeleFogSourceType = NULL;
else defaults->TeleFogSourceType = FindClassTentative(str,"TeleportFog");
defaults->TeleFogSourceType = FindClassTentative(str,"Actor");
}
//==========================================================================
@ -1420,8 +1419,7 @@ DEFINE_PROPERTY(telefogsourcetype, S, Actor)
DEFINE_PROPERTY(telefogdesttype, S, Actor)
{
PROP_STRING_PARM(str, 0);
if (!stricmp(str, "") || !stricmp(str, "none")) defaults->TeleFogDestType = NULL;
else defaults->TeleFogDestType = FindClassTentative(str, "TeleportFog");
defaults->TeleFogDestType = FindClassTentative(str, "Actor");
}
//==========================================================================