mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
P_TrackRoundConditionTargetDamage, Obj_SpecialUFODamage: Fix incorrect non-g_localplayers indexing into player table
Destroying the UFO has now been promoted to a full deferred condition check
This commit is contained in:
parent
a6ef8d357c
commit
5680e00deb
2 changed files with 4 additions and 13 deletions
|
|
@ -18,6 +18,7 @@
|
|||
#include "../k_objects.h"
|
||||
#include "../m_random.h"
|
||||
#include "../p_local.h"
|
||||
#include "../m_cond.h"
|
||||
#include "../r_main.h"
|
||||
#include "../s_sound.h"
|
||||
#include "../g_game.h"
|
||||
|
|
@ -923,17 +924,7 @@ boolean Obj_SpecialUFODamage(mobj_t *ufo, mobj_t *inflictor, mobj_t *source, UIN
|
|||
// Destroy the UFO parts, and make the emerald collectible!
|
||||
UFOKillPieces(ufo);
|
||||
|
||||
{
|
||||
UINT8 i;
|
||||
for (i = 0; i <= splitscreen; i++)
|
||||
{
|
||||
if (!playeringame[g_localplayers[i]])
|
||||
continue;
|
||||
if (players[g_localplayers[i]].spectator)
|
||||
continue;
|
||||
players[i].roundconditions.checkthisframe = true;
|
||||
}
|
||||
}
|
||||
gamedata->deferredconditioncheck = true; // Check Challenges!
|
||||
|
||||
ufo->flags = (ufo->flags & ~MF_SHOOTABLE) | (MF_SPECIAL|MF_PICKUPFROMBELOW);
|
||||
ufo->shadowscale = FRACUNIT/3;
|
||||
|
|
|
|||
|
|
@ -997,10 +997,10 @@ void P_TrackRoundConditionTargetDamage(targetdamaging_t targetdamaging)
|
|||
continue;
|
||||
if (players[g_localplayers[i]].spectator)
|
||||
continue;
|
||||
players[i].roundconditions.targetdamaging |= targetdamaging;
|
||||
players[g_localplayers[i]].roundconditions.targetdamaging |= targetdamaging;
|
||||
/* -- the following isn't needed because we can just check for targetdamaging == UFOD_GACHABOM
|
||||
if (targetdamaging != UFOD_GACHABOM)
|
||||
players[i].roundconditions.gachabom_miser = 0xFF;
|
||||
players[g_localplayers[i]].roundconditions.gachabom_miser = 0xFF;
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue