mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 13:41:05 +00:00
- added a new thinker statnum STAT_STATIC which do not get deleted between levels.
This commit is contained in:
parent
10c6b7a80b
commit
d39ee1daf3
6 changed files with 6 additions and 2 deletions
|
@ -2708,6 +2708,7 @@ void D_DoomMain (void)
|
||||||
// clean up game state
|
// clean up game state
|
||||||
ST_Clear();
|
ST_Clear();
|
||||||
D_ErrorCleanup ();
|
D_ErrorCleanup ();
|
||||||
|
DThinker::DestroyThinkersInList(STAT_STATIC);
|
||||||
P_FreeLevelData();
|
P_FreeLevelData();
|
||||||
P_FreeExtraLevelData();
|
P_FreeExtraLevelData();
|
||||||
|
|
||||||
|
|
|
@ -422,7 +422,7 @@ void DThinker::DestroyAllThinkers ()
|
||||||
|
|
||||||
for (i = 0; i <= MAX_STATNUM; i++)
|
for (i = 0; i <= MAX_STATNUM; i++)
|
||||||
{
|
{
|
||||||
if (i != STAT_TRAVELLING)
|
if (i != STAT_TRAVELLING && i != STAT_STATIC)
|
||||||
{
|
{
|
||||||
DestroyThinkersInList (Thinkers[i]);
|
DestroyThinkersInList (Thinkers[i]);
|
||||||
DestroyThinkersInList (FreshThinkers[i]);
|
DestroyThinkersInList (FreshThinkers[i]);
|
||||||
|
|
|
@ -427,6 +427,7 @@ void G_InitNew (const char *mapname, bool bTitleLevel)
|
||||||
UnlatchCVars ();
|
UnlatchCVars ();
|
||||||
G_VerifySkill();
|
G_VerifySkill();
|
||||||
UnlatchCVars ();
|
UnlatchCVars ();
|
||||||
|
DThinker::DestroyThinkersInList(STAT_STATIC);
|
||||||
|
|
||||||
if (paused)
|
if (paused)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1124,7 +1124,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SeekerMissile)
|
||||||
PARAM_INT_DEF(chance);
|
PARAM_INT_DEF(chance);
|
||||||
PARAM_INT_DEF(distance);
|
PARAM_INT_DEF(distance);
|
||||||
|
|
||||||
if ((flags & SMF_LOOK) && (self->tracer == 0) && (pr_seekermissile()<chance))
|
if ((flags & SMF_LOOK) && (self->tracer == nullptr) && (pr_seekermissile()<chance))
|
||||||
{
|
{
|
||||||
self->tracer = P_RoughMonsterSearch (self, distance, true);
|
self->tracer = P_RoughMonsterSearch (self, distance, true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4202,6 +4202,7 @@ void P_Init ()
|
||||||
static void P_Shutdown ()
|
static void P_Shutdown ()
|
||||||
{
|
{
|
||||||
// [ZZ] delete global event handlers
|
// [ZZ] delete global event handlers
|
||||||
|
DThinker::DestroyThinkersInList(STAT_STATIC);
|
||||||
E_Shutdown(false);
|
E_Shutdown(false);
|
||||||
P_DeinitKeyMessages ();
|
P_DeinitKeyMessages ();
|
||||||
P_FreeLevelData ();
|
P_FreeLevelData ();
|
||||||
|
|
|
@ -45,6 +45,7 @@ enum
|
||||||
STAT_AUTODECAL, // A decal that can be automatically deleted
|
STAT_AUTODECAL, // A decal that can be automatically deleted
|
||||||
STAT_CORPSEPOINTER, // An entry in Hexen's corpse queue
|
STAT_CORPSEPOINTER, // An entry in Hexen's corpse queue
|
||||||
STAT_TRAVELLING, // An actor temporarily travelling to a new map
|
STAT_TRAVELLING, // An actor temporarily travelling to a new map
|
||||||
|
STAT_STATIC, // persistent across maps.
|
||||||
|
|
||||||
// Thinkers that do think
|
// Thinkers that do think
|
||||||
STAT_FIRST_THINKING=32,
|
STAT_FIRST_THINKING=32,
|
||||||
|
|
Loading…
Reference in a new issue