mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Merge branch 'fix-ringbox-egg-transfer' into 'master'
Fix item HUD not appearing when receiving an eggbox transfer Closes #592 See merge request KartKrew/Kart!1387
This commit is contained in:
commit
45997c8075
6 changed files with 36 additions and 9 deletions
|
|
@ -68,6 +68,7 @@
|
||||||
#include "k_zvote.h"
|
#include "k_zvote.h"
|
||||||
#include "k_bot.h"
|
#include "k_bot.h"
|
||||||
#include "k_powerup.h"
|
#include "k_powerup.h"
|
||||||
|
#include "k_roulette.h"
|
||||||
|
|
||||||
#ifdef SRB2_CONFIG_ENABLE_WEBM_MOVIES
|
#ifdef SRB2_CONFIG_ENABLE_WEBM_MOVIES
|
||||||
#include "m_avrecorder.h"
|
#include "m_avrecorder.h"
|
||||||
|
|
@ -6179,7 +6180,7 @@ static void Got_Cheat(UINT8 **cp, INT32 playernum)
|
||||||
K_StripItems(player);
|
K_StripItems(player);
|
||||||
|
|
||||||
// Cancel roulette if rolling
|
// Cancel roulette if rolling
|
||||||
player->itemRoulette.active = false;
|
K_StopRoulette(&player->itemRoulette);
|
||||||
|
|
||||||
player->itemtype = item;
|
player->itemtype = item;
|
||||||
player->itemamount = amt;
|
player->itemamount = amt;
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@
|
||||||
#include "k_serverstats.h"
|
#include "k_serverstats.h"
|
||||||
#include "k_zvote.h"
|
#include "k_zvote.h"
|
||||||
#include "music.h"
|
#include "music.h"
|
||||||
|
#include "k_roulette.h"
|
||||||
|
|
||||||
#ifdef HAVE_DISCORDRPC
|
#ifdef HAVE_DISCORDRPC
|
||||||
#include "discord.h"
|
#include "discord.h"
|
||||||
|
|
@ -2583,7 +2584,7 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
||||||
|
|
||||||
if (betweenmaps || leveltime < introtime)
|
if (betweenmaps || leveltime < introtime)
|
||||||
{
|
{
|
||||||
itemRoulette.active = false;
|
K_StopRoulette(&itemRoulette);
|
||||||
|
|
||||||
itemtype = 0;
|
itemtype = 0;
|
||||||
itemamount = 0;
|
itemamount = 0;
|
||||||
|
|
|
||||||
10
src/k_kart.c
10
src/k_kart.c
|
|
@ -9972,7 +9972,7 @@ void K_StripItems(player_t *player)
|
||||||
|
|
||||||
if (player->itemRoulette.eggman == false)
|
if (player->itemRoulette.eggman == false)
|
||||||
{
|
{
|
||||||
player->itemRoulette.active = false;
|
K_StopRoulette(&player->itemRoulette);
|
||||||
}
|
}
|
||||||
|
|
||||||
player->hyudorotimer = 0;
|
player->hyudorotimer = 0;
|
||||||
|
|
@ -9988,7 +9988,7 @@ void K_StripItems(player_t *player)
|
||||||
|
|
||||||
void K_StripOther(player_t *player)
|
void K_StripOther(player_t *player)
|
||||||
{
|
{
|
||||||
player->itemRoulette.active = false;
|
K_StopRoulette(&player->itemRoulette);
|
||||||
|
|
||||||
player->invincibilitytimer = 0;
|
player->invincibilitytimer = 0;
|
||||||
if (player->growshrinktimer)
|
if (player->growshrinktimer)
|
||||||
|
|
@ -12119,16 +12119,14 @@ void K_EggmanTransfer(player_t *source, player_t *victim)
|
||||||
K_AddHitLag(victim->mo, 2, true);
|
K_AddHitLag(victim->mo, 2, true);
|
||||||
K_DropItems(victim);
|
K_DropItems(victim);
|
||||||
victim->eggmanexplode = 6*TICRATE;
|
victim->eggmanexplode = 6*TICRATE;
|
||||||
victim->itemRoulette.eggman = false;
|
K_StopRoulette(&victim->itemRoulette);
|
||||||
victim->itemRoulette.active = false;
|
|
||||||
|
|
||||||
if (P_IsDisplayPlayer(victim) && !demo.freecam)
|
if (P_IsDisplayPlayer(victim) && !demo.freecam)
|
||||||
S_StartSound(NULL, sfx_itrole);
|
S_StartSound(NULL, sfx_itrole);
|
||||||
|
|
||||||
K_AddHitLag(source->mo, 2, true);
|
K_AddHitLag(source->mo, 2, true);
|
||||||
source->eggmanexplode = 0;
|
source->eggmanexplode = 0;
|
||||||
source->itemRoulette.eggman = false;
|
K_StopRoulette(&source->itemRoulette);
|
||||||
source->itemRoulette.active = false;
|
|
||||||
source->eggmanTransferDelay = 10;
|
source->eggmanTransferDelay = 10;
|
||||||
|
|
||||||
S_StopSoundByID(source->mo, sfx_s3k53);
|
S_StopSoundByID(source->mo, sfx_s3k53);
|
||||||
|
|
|
||||||
|
|
@ -1485,6 +1485,18 @@ void K_StartEggmanRoulette(player_t *const player)
|
||||||
roulette->eggman = true;
|
roulette->eggman = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*--------------------------------------------------
|
||||||
|
void K_StopRoulette(itemroulette_t *const roulette)
|
||||||
|
|
||||||
|
See header file for description.
|
||||||
|
--------------------------------------------------*/
|
||||||
|
void K_StopRoulette(itemroulette_t *const roulette)
|
||||||
|
{
|
||||||
|
roulette->active = false;
|
||||||
|
roulette->eggman = false;
|
||||||
|
roulette->ringbox = false;
|
||||||
|
}
|
||||||
|
|
||||||
/*--------------------------------------------------
|
/*--------------------------------------------------
|
||||||
fixed_t K_GetRouletteOffset(itemroulette_t *const roulette, fixed_t renderDelta)
|
fixed_t K_GetRouletteOffset(itemroulette_t *const roulette, fixed_t renderDelta)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -156,6 +156,21 @@ void K_StartItemRoulette(player_t *const player, boolean ringbox);
|
||||||
|
|
||||||
void K_StartEggmanRoulette(player_t *const player);
|
void K_StartEggmanRoulette(player_t *const player);
|
||||||
|
|
||||||
|
/*--------------------------------------------------
|
||||||
|
void K_StopRoulette(itemroulette_t *const roulette);
|
||||||
|
|
||||||
|
Resets the roulette back to a default state.
|
||||||
|
Stops item roulette, Eggman and Ringbox.
|
||||||
|
|
||||||
|
Input Arguments:-
|
||||||
|
roulette - The roulette to stop.
|
||||||
|
|
||||||
|
Return:-
|
||||||
|
N/A
|
||||||
|
--------------------------------------------------*/
|
||||||
|
|
||||||
|
void K_StopRoulette(itemroulette_t *const roulette);
|
||||||
|
|
||||||
|
|
||||||
/*--------------------------------------------------
|
/*--------------------------------------------------
|
||||||
fixed_t K_GetRouletteOffset(itemroulette_t *const roulette, fixed_t renderDelta);
|
fixed_t K_GetRouletteOffset(itemroulette_t *const roulette, fixed_t renderDelta);
|
||||||
|
|
|
||||||
|
|
@ -1629,7 +1629,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
||||||
}
|
}
|
||||||
player->karthud[khud_itemblink] = TICRATE;
|
player->karthud[khud_itemblink] = TICRATE;
|
||||||
player->karthud[khud_itemblinkmode] = 0;
|
player->karthud[khud_itemblinkmode] = 0;
|
||||||
player->itemRoulette.active = false;
|
K_StopRoulette(&player->itemRoulette);
|
||||||
if (P_IsDisplayPlayer(player))
|
if (P_IsDisplayPlayer(player))
|
||||||
S_StartSound(NULL, sfx_itrolf);
|
S_StartSound(NULL, sfx_itrolf);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue