mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-31 13:00:59 +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);
|
FActorIterator iterator(tid);
|
||||||
AActor *actor;
|
AActor *actor;
|
||||||
|
|
||||||
const PClass * const src = telefogsrc.IsNotEmpty() ? PClass::FindClass(telefogsrc) : NULL;
|
const PClass *src = PClass::FindClass(telefogsrc);
|
||||||
const PClass * const dest = telefogdest.IsNotEmpty() ? PClass::FindClass(telefogdest) : NULL;
|
const PClass * dest = PClass::FindClass(telefogdest);
|
||||||
while ((actor = iterator.Next()))
|
while ((actor = iterator.Next()))
|
||||||
{
|
{
|
||||||
if (telefogsrc.IsNotEmpty())
|
if (telefogsrc.IsNotEmpty())
|
||||||
|
|
|
@ -1410,8 +1410,7 @@ DEFINE_PROPERTY(stamina, I, Actor)
|
||||||
DEFINE_PROPERTY(telefogsourcetype, S, Actor)
|
DEFINE_PROPERTY(telefogsourcetype, S, Actor)
|
||||||
{
|
{
|
||||||
PROP_STRING_PARM(str, 0);
|
PROP_STRING_PARM(str, 0);
|
||||||
if (!stricmp(str, "") || !stricmp(str, "none")) defaults->TeleFogSourceType = NULL;
|
defaults->TeleFogSourceType = FindClassTentative(str,"Actor");
|
||||||
else defaults->TeleFogSourceType = FindClassTentative(str,"TeleportFog");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
@ -1420,8 +1419,7 @@ DEFINE_PROPERTY(telefogsourcetype, S, Actor)
|
||||||
DEFINE_PROPERTY(telefogdesttype, S, Actor)
|
DEFINE_PROPERTY(telefogdesttype, S, Actor)
|
||||||
{
|
{
|
||||||
PROP_STRING_PARM(str, 0);
|
PROP_STRING_PARM(str, 0);
|
||||||
if (!stricmp(str, "") || !stricmp(str, "none")) defaults->TeleFogDestType = NULL;
|
defaults->TeleFogDestType = FindClassTentative(str, "Actor");
|
||||||
else defaults->TeleFogDestType = FindClassTentative(str, "TeleportFog");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
Loading…
Reference in a new issue