From 2747f9a9f37b3a452cd0e008a61b6698f038a80b Mon Sep 17 00:00:00 2001 From: MajorCooke Date: Thu, 18 Dec 2014 09:29:23 -0600 Subject: [PATCH] - Make ACS SetTeleFog follow the same format as the DECORATE version too. --- src/p_acs.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index a86212679..69f489627 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -4760,10 +4760,15 @@ static void SetActorTeleFog(AActor *activator, int tid, FName telefogsrc, FName if (activator != NULL) { check = PClass::FindClass(telefogsrc); - if (check != NULL) + if (check != NULL || !stricmp(telefogsrc, "none") || !stricmp(telefogsrc, "null")) + activator->TeleFogSourceType = NULL; + else activator->TeleFogSourceType = check; + check = PClass::FindClass(telefogdest); - if (check != NULL) + if (check != NULL || !stricmp(telefogdest, "none") || !stricmp(telefogdest, "null")) + activator->TeleFogDestType = NULL; + else activator->TeleFogDestType = check; } } @@ -4775,10 +4780,15 @@ static void SetActorTeleFog(AActor *activator, int tid, FName telefogsrc, FName while ((actor = iterator.Next())) { check = PClass::FindClass(telefogsrc); - if (check != NULL) + if (check != NULL || !stricmp(telefogsrc, "none") || !stricmp(telefogsrc, "null")) + actor->TeleFogSourceType = NULL; + else actor->TeleFogSourceType = check; + check = PClass::FindClass(telefogdest); - if (check != NULL) + if (check != NULL || !stricmp(telefogdest, "none") || !stricmp(telefogdest, "null")) + actor->TeleFogDestType = NULL; + else actor->TeleFogDestType = check; } }