- Allow NULL.

- Instead of reverting the teleport fog back to defaults, if there wasn't a class or if the class failed to be found, set it to NULL.
- P_SpawnTeleportFog will not spawn anything if it's NULL.
- Added "" so it can be used to mean 'don't change anything' for A_SetTeleFog.
This commit is contained in:
MajorCooke 2014-12-18 09:19:39 -06:00
commit dcab57b236
3 changed files with 16 additions and 5 deletions

View file

@ -1422,7 +1422,7 @@ DEFINE_PROPERTY(stamina, I, Actor)
DEFINE_PROPERTY(telefogsourcetype, S, Actor)
{
PROP_STRING_PARM(str, 0);
if (!stricmp(str,"") || *str == 0) defaults->TeleFogSourceType = PClass::FindClass("TeleportFog");
if (!stricmp(str, "") || (!stricmp(str, "none")) || (!stricmp(str, "null")) || *str == 0) defaults->TeleFogSourceType = NULL;
else defaults->TeleFogSourceType = FindClassTentative(str,"TeleportFog");
}
@ -1432,7 +1432,7 @@ DEFINE_PROPERTY(telefogsourcetype, S, Actor)
DEFINE_PROPERTY(telefogdesttype, S, Actor)
{
PROP_STRING_PARM(str, 0);
if (!stricmp(str, "") || *str == 0) defaults->TeleFogDestType = PClass::FindClass("TeleportFog");
if (!stricmp(str, "") || (!stricmp(str, "none")) || (!stricmp(str, "null")) || *str == 0) defaults->TeleFogDestType = NULL;
else defaults->TeleFogDestType = FindClassTentative(str, "TeleportFog");
}