mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
- redit commit 5f56fb5a16
without altering the line endings throughout thingdef_codeptr.cpp.
* Changed the behavior of SetActorTeleFog. - Don't force "null" to resolve to no actor since "none" is already defined as NULL (via FindClass). (This change also applies to the decorate properties.) - Passing an empty actor name will keep the existing fog since there's otherwise no way set only one fog. Since "none" works to remove the fog, I see no reason not to have this option.
This commit is contained in:
parent
5f56fb5a16
commit
4d59190446
2 changed files with 6 additions and 22 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
|
@ -325,7 +325,7 @@ ACTOR Actor native //: Thinker
|
|||
action native A_GiveToSiblings(class<Inventory> itemtype, int amount = 0);
|
||||
action native A_TakeFromChildren(class<Inventory> itemtype, int amount = 0);
|
||||
action native A_TakeFromSiblings(class<Inventory> itemtype, int amount = 0);
|
||||
action native A_SetTeleFog(name oldpos, name newpos);
|
||||
action native A_SetTeleFog(class<TeleportFog> oldpos, class<TeleportFog> newpos);
|
||||
action native A_SwapTeleFog();
|
||||
action native A_SetFloatBobPhase(int bob);
|
||||
action native A_SetHealth(int health, int ptr = AAPTR_DEFAULT);
|
||||
|
|
Loading…
Reference in a new issue