diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index f6e3425bc..cb59f8a1f 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -5726,33 +5726,17 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Remove) // A_SetTeleFog // // Sets the teleport fog(s) for the calling actor. -// Takes a name of the classes for te source and destination. -// Can set both at the same time. Use "" to retain the previous fog without -// changing it. +// Takes a name of the classes for the source and destination. //=========================================================================== DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetTeleFog) { ACTION_PARAM_START(2); - ACTION_PARAM_NAME(oldpos, 0); - ACTION_PARAM_NAME(newpos, 1); - const PClass *check = PClass::FindClass(oldpos); - if (check == NULL || !stricmp(oldpos, "none") || !stricmp(oldpos, "null")) - self->TeleFogSourceType = NULL; - else if (!stricmp(oldpos, "")) - { //Don't change it if it's just "" - } - else - self->TeleFogSourceType = check; + ACTION_PARAM_CLASS(oldpos, 0); + ACTION_PARAM_CLASS(newpos, 1); - check = PClass::FindClass(newpos); - if (check == NULL || !stricmp(newpos, "none") || !stricmp(newpos, "null")) - self->TeleFogDestType = NULL; - else if (!stricmp(newpos, "")) - { //Don't change it if it's just "" - } - else - self->TeleFogDestType = check; + self->TeleFogSourceType = oldpos; + self->TeleFogDestType = newpos; } //=========================================================================== diff --git a/wadsrc/static/actors/actor.txt b/wadsrc/static/actors/actor.txt index f84151d18..d85717ead 100644 --- a/wadsrc/static/actors/actor.txt +++ b/wadsrc/static/actors/actor.txt @@ -325,7 +325,7 @@ ACTOR Actor native //: Thinker action native A_GiveToSiblings(class itemtype, int amount = 0); action native A_TakeFromChildren(class itemtype, int amount = 0); action native A_TakeFromSiblings(class itemtype, int amount = 0); - action native A_SetTeleFog(name oldpos, name newpos); + action native A_SetTeleFog(class oldpos, class newpos); action native A_SwapTeleFog(); action native A_SetFloatBobPhase(int bob); action native A_SetHealth(int health, int ptr = AAPTR_DEFAULT);