Merge branch 'no-gp-thunderdome' into 'master'

No thunderdome in GP

Closes #1265

See merge request KartKrew/Kart!2266
This commit is contained in:
Oni 2024-04-12 03:40:20 +00:00
commit ee1fb29de8
3 changed files with 15 additions and 2 deletions

View file

@ -72,6 +72,16 @@
// comeback is Battle Mode's karma comeback, also bool
// mapreset is set when enough players fill an empty server
boolean K_ThunderDome(void)
{
if (K_CanChangeRules(true))
{
return (boolean)cv_thunderdome.value;
}
return false;
}
// lat: used for when the player is in some weird state where it wouldn't be wise for it to be overwritten by another object that does similarly wacky shit.
boolean K_isPlayerInSpecialState(player_t *p)
{
@ -12181,7 +12191,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
if (player->ringboxdelay == 0)
{
UINT32 award = 5*player->ringboxaward + 10;
if (!cv_thunderdome.value)
if (!K_ThunderDome())
award = 3 * award / 2;
if (modeattacking & ATTACKING_SPB)

View file

@ -274,6 +274,8 @@ void K_MakeObjectReappear(mobj_t *mo);
void K_BumperInflate(player_t *player);
boolean K_ThunderDome(void);
#ifdef __cplusplus
} // extern "C"
#endif

View file

@ -19,6 +19,7 @@
#include "../k_battle.h"
#include "../m_random.h"
#include "../k_specialstage.h" // specialstageinfo
#include "../k_kart.h"
#define FLOAT_HEIGHT ( 12 * FRACUNIT )
#define FLOAT_TIME ( 2 * TICRATE )
@ -122,7 +123,7 @@ void Obj_RandomItemVisuals(mobj_t *mobj)
// the player's cleared out a good portion of the map.
//
// Then extraval1 starts ticking up and triggers the transformation from Ringbox to Random Item.
if (mobj->fuse == 0 && !(mobj->flags & MF_NOCLIPTHING) && !(mobj->flags2 & MF2_BOSSDEAD) && !cv_thunderdome.value
if (mobj->fuse == 0 && !(mobj->flags & MF_NOCLIPTHING) && !(mobj->flags2 & MF2_BOSSDEAD) && !K_ThunderDome()
&& (modeattacking == ATTACKING_NONE || !!(modeattacking & ATTACKING_SPB) || specialstageinfo.valid)) // Time Attacking in Special is a fucked-looking exception
{
mobj->extravalue1++;