mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-03-02 01:11:19 +00:00
PARANOIA: delay P_RemoveThinkerDelayed warning by 2 tics
MT_ITEMCAPSULE_PART can be delayed by this much it seems.
This commit is contained in:
parent
205de5503f
commit
1949e9eebb
1 changed files with 9 additions and 7 deletions
16
src/p_tick.c
16
src/p_tick.c
|
|
@ -300,17 +300,19 @@ void P_RemoveThinkerDelayed(thinker_t *thinker)
|
|||
if (thinker->references != 0)
|
||||
{
|
||||
#ifdef PARANOIA
|
||||
if (thinker->debug_time > leveltime)
|
||||
{
|
||||
thinker->debug_time = leveltime + 2; // do not print errors again
|
||||
}
|
||||
// Removed mobjs can be the target of another mobj. In
|
||||
// that case, the other mobj will manage its reference
|
||||
// to the removed mobj in P_MobjThinker. However, if
|
||||
// the removed mobj is removed after the other object
|
||||
// thinks, the reference management is delayed by one
|
||||
// tic.
|
||||
else if (thinker->debug_time < leveltime)
|
||||
// tic (or two?)
|
||||
const UINT8 delay = 2;
|
||||
|
||||
if (thinker->debug_time > leveltime)
|
||||
{
|
||||
thinker->debug_time = leveltime + delay + 1; // do not print errors again
|
||||
}
|
||||
else if ((thinker->debug_time + delay) <= leveltime)
|
||||
{
|
||||
CONS_Printf(
|
||||
"PARANOIA/P_RemoveThinkerDelayed: %p %s references=%d\n",
|
||||
|
|
@ -319,7 +321,7 @@ void P_RemoveThinkerDelayed(thinker_t *thinker)
|
|||
thinker->references
|
||||
);
|
||||
|
||||
thinker->debug_time = leveltime + 2; // do not print this error again
|
||||
thinker->debug_time = leveltime + delay + 1; // do not print this error again
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue