mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Replace battlecapsules || bossinfo.valid checks with K_Cooperative
This commit is contained in:
parent
7669ae7bde
commit
85a101cbd7
5 changed files with 23 additions and 8 deletions
|
|
@ -95,8 +95,6 @@ void K_CheckBumpers(void)
|
|||
UINT8 nobumpers = 0;
|
||||
UINT8 eliminated = 0;
|
||||
|
||||
const boolean singleplayer = (battlecapsules || bossinfo.valid);
|
||||
|
||||
if (!(gametyperules & GTR_BUMPERS))
|
||||
return;
|
||||
|
||||
|
|
@ -124,7 +122,7 @@ void K_CheckBumpers(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (singleplayer
|
||||
if (K_Cooperative()
|
||||
? nobumpers > 0 && nobumpers >= numingame
|
||||
: eliminated >= numingame - 1)
|
||||
{
|
||||
|
|
@ -135,7 +133,7 @@ void K_CheckBumpers(void)
|
|||
if (players[i].spectator)
|
||||
continue;
|
||||
|
||||
if (singleplayer)
|
||||
if (K_Cooperative())
|
||||
players[i].pflags |= PF_NOCONTEST;
|
||||
|
||||
P_DoPlayerExit(&players[i]);
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
#include "core/static_vec.hpp"
|
||||
|
||||
#include "k_battle.h"
|
||||
#include "k_boss.h"
|
||||
#include "k_hud.h"
|
||||
#include "k_kart.h"
|
||||
#include "k_objects.h"
|
||||
#include "m_fixed.h"
|
||||
#include "p_local.h"
|
||||
|
|
@ -314,7 +314,7 @@ bool is_player_tracking_target(player_t *player = stplyr)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (battlecapsules || bossinfo.valid)
|
||||
if (K_Cooperative())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
17
src/k_kart.c
17
src/k_kart.c
|
|
@ -11577,7 +11577,7 @@ UINT32 K_PointLimitForGametype(void)
|
|||
return cv_pointlimit.value;
|
||||
}
|
||||
|
||||
if (battlecapsules || bossinfo.valid)
|
||||
if (K_Cooperative())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -11601,4 +11601,19 @@ UINT32 K_PointLimitForGametype(void)
|
|||
return ptsCap;
|
||||
}
|
||||
|
||||
boolean K_Cooperative(void)
|
||||
{
|
||||
if (battlecapsules)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (bossinfo.valid)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//}
|
||||
|
|
|
|||
|
|
@ -208,6 +208,8 @@ void K_EggmanTransfer(player_t *source, player_t *victim);
|
|||
tic_t K_TimeLimitForGametype(void);
|
||||
UINT32 K_PointLimitForGametype(void);
|
||||
|
||||
boolean K_Cooperative(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1382,7 +1382,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
|||
P_PlayDeathSound(target);
|
||||
}
|
||||
|
||||
if (battlecapsules || bossinfo.valid)
|
||||
if (K_Cooperative())
|
||||
{
|
||||
target->player->pflags |= (PF_NOCONTEST|PF_ELIMINATED);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue