mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- remove some redundancy from TeleportFog code.
This commit is contained in:
parent
15fbf2510a
commit
f087903fca
2 changed files with 4 additions and 6 deletions
|
@ -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())
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
Loading…
Reference in a new issue