mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-04-04 17:08:44 +00:00
Added spawn origin flags.
- Added new spawn flags that allow for checking if an actor was spawned by the level, the console, or ACS/DECORATE/ZScript.
This commit is contained in:
parent
606bc1d04e
commit
b54da619ad
4 changed files with 12 additions and 0 deletions
|
@ -2423,6 +2423,7 @@ void Net_DoCommand (int type, uint8_t **stream, int player)
|
|||
AActor *spawned = Spawn (primaryLevel, typeinfo, spawnpos, ALLOW_REPLACE);
|
||||
if (spawned != NULL)
|
||||
{
|
||||
spawned->SpawnFlags |= MTF_CONSOLETHING;
|
||||
if (type == DEM_SUMMONFRIEND || type == DEM_SUMMONFRIEND2 || type == DEM_SUMMONMBF)
|
||||
{
|
||||
if (spawned->CountsAsKill())
|
||||
|
|
|
@ -424,6 +424,11 @@ enum EMapThingFlags
|
|||
MTF_NOINFIGHTING = 0x100000,
|
||||
MTF_NOCOUNT = 0x200000, // Removes COUNTKILL/COUNTITEM
|
||||
|
||||
// Thing spawn origins, what created this thing?
|
||||
MTF_MAPTHING = 0x400000, // Map spawned
|
||||
MTF_CONSOLETHING = 0x800000, // Console spawned (i.e summon)
|
||||
MTF_NONSPAWNTHING = (MTF_MAPTHING|MTF_CONSOLETHING), // [inkoalawetrust]: Rachael didn't want a dedicated MTF_SPAWNTHING flag taking up the field, so check if the other 2 flags aren't true instead.
|
||||
|
||||
// BOOM and DOOM compatible versions of some of the above
|
||||
|
||||
BTF_NOTSINGLE = 0x0010, // (TF_COOPERATIVE|TF_DEATHMATCH)
|
||||
|
|
|
@ -5352,6 +5352,7 @@ void AActor::LevelSpawned ()
|
|||
{
|
||||
flags &= ~MF_DROPPED;
|
||||
}
|
||||
SpawnFlags |= MTF_MAPTHING;
|
||||
HandleSpawnFlags ();
|
||||
}
|
||||
|
||||
|
|
|
@ -1008,6 +1008,11 @@ enum EMapThingFlags
|
|||
MTF_SECRET = 0x080000, // Secret pickup
|
||||
MTF_NOINFIGHTING = 0x100000,
|
||||
MTF_NOCOUNT = 0x200000, // Removes COUNTKILL/COUNTITEM
|
||||
|
||||
// Thing spawn origins, what created this thing?
|
||||
MTF_MAPTHING = 0x400000, // Map spawned
|
||||
MTF_CONSOLETHING = 0x800000, // Console spawned (i.e summon)
|
||||
MTF_NONSPAWNTHING = (MTF_MAPTHING|MTF_CONSOLETHING), // [inkoalawetrust]: Rachael didn't want a dedicated MTF_SPAWNTHING flag taking up the field, so check if the other 2 flags aren't true instead.
|
||||
};
|
||||
|
||||
enum ESkillProperty
|
||||
|
|
Loading…
Reference in a new issue