mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-10 10:51:42 +00:00
Merge branch 'sink-is-back' into 'master'
Sink is back See merge request KartKrew/Kart!1149
This commit is contained in:
commit
9072437751
1 changed files with 47 additions and 2 deletions
|
|
@ -15,6 +15,7 @@
|
||||||
#include "../info.h"
|
#include "../info.h"
|
||||||
#include "../k_kart.h"
|
#include "../k_kart.h"
|
||||||
#include "../k_objects.h"
|
#include "../k_objects.h"
|
||||||
|
#include "../k_roulette.h"
|
||||||
#include "../m_random.h"
|
#include "../m_random.h"
|
||||||
#include "../p_local.h"
|
#include "../p_local.h"
|
||||||
#include "../r_main.h"
|
#include "../r_main.h"
|
||||||
|
|
@ -379,6 +380,45 @@ pop_hyudoro (mobj_t **head)
|
||||||
*head = hyu;
|
*head = hyu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void hyudoro_set_held_item_from_player
|
||||||
|
( mobj_t * hyu,
|
||||||
|
player_t *player)
|
||||||
|
{
|
||||||
|
if (K_ItemEnabled(KITEM_KITCHENSINK))
|
||||||
|
{
|
||||||
|
boolean convert = false;
|
||||||
|
|
||||||
|
switch (player->itemtype)
|
||||||
|
{
|
||||||
|
// The following permits a case-by-case balancing for items
|
||||||
|
// we don't want ending up in 2nd place's hands too often...
|
||||||
|
case KITEM_SPB:
|
||||||
|
convert = true;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (convert == true)
|
||||||
|
{
|
||||||
|
if (player->itemtype > 0 && player->itemtype < NUMKARTITEMS)
|
||||||
|
{
|
||||||
|
// A conversion has occoured, this is no longer on the
|
||||||
|
// playing field... someone else must manifest it!?
|
||||||
|
itemCooldowns[player->itemtype - 1] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
hyudoro_itemtype(hyu) = KITEM_KITCHENSINK;
|
||||||
|
hyudoro_itemcount(hyu) = 1;
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hyudoro_itemtype(hyu) = player->itemtype;
|
||||||
|
hyudoro_itemcount(hyu) = player->itemamount;
|
||||||
|
}
|
||||||
|
|
||||||
static boolean
|
static boolean
|
||||||
hyudoro_patrol_hit_player
|
hyudoro_patrol_hit_player
|
||||||
( mobj_t * hyu,
|
( mobj_t * hyu,
|
||||||
|
|
@ -409,8 +449,8 @@ hyudoro_patrol_hit_player
|
||||||
K_AddHitLag(toucher, TICRATE/2, false);
|
K_AddHitLag(toucher, TICRATE/2, false);
|
||||||
|
|
||||||
hyudoro_mode(hyu) = HYU_RETURN;
|
hyudoro_mode(hyu) = HYU_RETURN;
|
||||||
hyudoro_itemtype(hyu) = player->itemtype;
|
|
||||||
hyudoro_itemcount(hyu) = player->itemamount;
|
hyudoro_set_held_item_from_player(hyu, player);
|
||||||
|
|
||||||
K_StripItems(player);
|
K_StripItems(player);
|
||||||
|
|
||||||
|
|
@ -442,6 +482,11 @@ award_immediately (mobj_t *hyu)
|
||||||
|
|
||||||
if (player)
|
if (player)
|
||||||
{
|
{
|
||||||
|
if (player->position == 1)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (player->itemamount &&
|
if (player->itemamount &&
|
||||||
player->itemtype != hyudoro_itemtype(hyu))
|
player->itemtype != hyudoro_itemtype(hyu))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue