Merge branch 'blankart-dev' into mappatch
This commit is contained in:
commit
97fe82afc9
5 changed files with 32 additions and 38 deletions
|
|
@ -1515,6 +1515,12 @@ struct int_const_s const INT_CONST[] = {
|
|||
{"ASR_ITEMBOX", ASR_ITEMBOX},
|
||||
{"ASR_SUPERRING", ASR_SUPERRING},
|
||||
|
||||
// sneakertype_t
|
||||
{"SNEAKERTYPE_PANEL", SNEAKERTYPE_PANEL},
|
||||
{"SNEAKERTYPE_SNEAKER", SNEAKERTYPE_SNEAKER},
|
||||
{"SNEAKERTYPE_ROCKETSNEAKER", SNEAKERTYPE_ROCKETSNEAKER},
|
||||
{"SNEAKERTYPE_WATERPANEL", SNEAKERTYPE_WATERPANEL},
|
||||
|
||||
{NULL,0}
|
||||
};
|
||||
|
||||
|
|
|
|||
45
src/k_kart.c
45
src/k_kart.c
|
|
@ -556,7 +556,7 @@ SINT8 K_ItemResultToType(SINT8 getitem)
|
|||
return KITEM_JAWZ;
|
||||
|
||||
default:
|
||||
I_Error("Bad item redirect for result %d\n", getitem);
|
||||
I_Error("K_ItemResultToType: Bad item redirect for result %d\n", getitem);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -5543,6 +5543,7 @@ static void K_SneakerPanelEffect(player_t *player, INT32 type)
|
|||
void K_DoSneaker(player_t *player, INT32 type)
|
||||
{
|
||||
const fixed_t intendedboost = K_GetSneakerBoostSpeed();
|
||||
const tic_t sneakerduration = (type == 3) ? TICRATE*2 : sneakertime;
|
||||
|
||||
if (player->floorboost == 0 || player->floorboost == 3)
|
||||
{
|
||||
|
|
@ -5555,46 +5556,24 @@ void K_DoSneaker(player_t *player, INT32 type)
|
|||
|
||||
K_SneakerPanelEffect(player, type);
|
||||
|
||||
if (type != 0)
|
||||
if (type != 0 && type != 3)
|
||||
{
|
||||
K_PlayBoostTaunt(player->mo);
|
||||
}
|
||||
|
||||
player->sneakertimer = sneakertime;
|
||||
player->realsneakertimer = sneakertime;
|
||||
player->sneakertimer = sneakerduration;
|
||||
player->realsneakertimer = sneakerduration;
|
||||
|
||||
if (player->sneakertimer && (player->floorboost == 0 || player->floorboost == 3))
|
||||
{
|
||||
player->numsneakers = CLAMP(player->numsneakers+1, 0, stackingactive ? MAXSNEAKERSTACK : 1);
|
||||
}
|
||||
|
||||
// set angle for spun out players:
|
||||
player->boostangle = player->mo->angle;
|
||||
}
|
||||
|
||||
void K_DoWaterRunPanel(player_t *player)
|
||||
{
|
||||
const fixed_t intendedboost = K_GetSneakerBoostSpeed();
|
||||
|
||||
if (player->floorboost == 0 || player->floorboost == 3)
|
||||
if (type == 3)
|
||||
{
|
||||
K_SneakerPanelStackSound(player);
|
||||
K_SpawnDashDustRelease(player);
|
||||
if (intendedboost > player->speedboost)
|
||||
player->karthud[khud_destboostcam] = FixedMul(FRACUNIT, FixedDiv((intendedboost - player->speedboost), intendedboost));
|
||||
}
|
||||
|
||||
K_SneakerPanelEffect(player, 0);
|
||||
|
||||
player->sneakertimer = TICRATE*2;
|
||||
player->realsneakertimer = TICRATE*2;
|
||||
|
||||
if (player->sneakertimer && (player->floorboost == 0 || player->floorboost == 3))
|
||||
{
|
||||
player->numsneakers = CLAMP(player->numsneakers+1, 0, stackingactive ? MAXSNEAKERSTACK : 1);
|
||||
}
|
||||
|
||||
// Water Running please!
|
||||
player->mo->flags2 |= MF2_WATERRUN;
|
||||
}
|
||||
|
||||
// set angle for spun out players:
|
||||
player->boostangle = player->mo->angle;
|
||||
|
|
@ -7202,7 +7181,7 @@ static void K_RaceStart(player_t *player)
|
|||
if (player->boostcharge <= 36)
|
||||
{
|
||||
player->startboost = 0;
|
||||
K_DoSneaker(player, 0);
|
||||
K_DoSneaker(player, SNEAKERTYPE_PANEL);
|
||||
player->sneakertimer = 70; // PERFECT BOOST!!
|
||||
player->realsneakertimer = 70;
|
||||
|
||||
|
|
@ -10043,7 +10022,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
{
|
||||
if (ATTACK_IS_DOWN && !HOLDING_ITEM && onground && NO_HYUDORO)
|
||||
{
|
||||
K_DoSneaker(player, 2);
|
||||
K_DoSneaker(player, SNEAKERTYPE_ROCKETSNEAKER);
|
||||
K_PlayBoostTaunt(player->mo);
|
||||
if (player->rocketsneakertimer <= 3*TICRATE)
|
||||
player->rocketsneakertimer = 1;
|
||||
|
|
@ -10129,7 +10108,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
case KITEM_SNEAKER:
|
||||
if (ATTACK_IS_DOWN && !HOLDING_ITEM && onground && NO_HYUDORO)
|
||||
{
|
||||
K_DoSneaker(player, 1);
|
||||
K_DoSneaker(player, SNEAKERTYPE_SNEAKER);
|
||||
K_PlayBoostTaunt(player->mo);
|
||||
player->itemamount--;
|
||||
player->botvars.itemconfirm = 0;
|
||||
|
|
@ -10146,7 +10125,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
K_PlayBoostTaunt(player->mo);
|
||||
S_StartSound(player->mo, sfx_s3k3a);
|
||||
|
||||
//K_DoSneaker(player, 2);
|
||||
//K_DoSneaker(player, SNEAKERTYPE_ROCKETSNEAKER);
|
||||
|
||||
player->rocketsneakertimer = (itemtime*3);
|
||||
player->itemamount--;
|
||||
|
|
|
|||
11
src/k_kart.h
11
src/k_kart.h
|
|
@ -165,8 +165,17 @@ void K_SpawnWipeoutTrail(mobj_t *mo, boolean translucent);
|
|||
void K_DriftDustHandling(mobj_t *spawner);
|
||||
mobj_t *K_ThrowKartItem(player_t *player, boolean missile, mobjtype_t mapthing, INT32 defaultDir, INT32 altthrow);
|
||||
void K_PuntMine(mobj_t *mine, mobj_t *punter);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SNEAKERTYPE_PANEL = 0,
|
||||
SNEAKERTYPE_SNEAKER,
|
||||
SNEAKERTYPE_ROCKETSNEAKER,
|
||||
SNEAKERTYPE_WATERPANEL,
|
||||
} sneakertype_t;
|
||||
|
||||
void K_DoSneaker(player_t *player, INT32 type);
|
||||
void K_DoWaterRunPanel(player_t *player);
|
||||
|
||||
void K_DoPogoSpring(mobj_t *mo, fixed_t vertispeed, UINT8 sound);
|
||||
void K_DoInvincibility(player_t *player, tic_t time);
|
||||
void K_KillBananaChain(mobj_t *banana, mobj_t *inflictor, mobj_t *source);
|
||||
|
|
|
|||
|
|
@ -612,7 +612,7 @@ void K_ProcessTerrainEffect(mobj_t *mo)
|
|||
else
|
||||
player->floorboost = 2;
|
||||
|
||||
K_DoSneaker(player, 0);
|
||||
K_DoSneaker(player, SNEAKERTYPE_PANEL);
|
||||
}
|
||||
|
||||
// WaterRun Panel
|
||||
|
|
@ -623,7 +623,7 @@ void K_ProcessTerrainEffect(mobj_t *mo)
|
|||
else
|
||||
player->floorboost = 2;
|
||||
|
||||
K_DoWaterRunPanel(player);
|
||||
K_DoSneaker(player, SNEAKERTYPE_WATERPANEL);
|
||||
}
|
||||
|
||||
// Speed pad
|
||||
|
|
|
|||
|
|
@ -5218,9 +5218,9 @@ static void P_ProcessBoostPanel(player_t *player, boolean isTouching, int type)
|
|||
player->floorboost = 2;
|
||||
|
||||
if (type == SBPT_WATER)
|
||||
K_DoWaterRunPanel(player);
|
||||
K_DoSneaker(player, SNEAKERTYPE_WATERPANEL);
|
||||
else
|
||||
K_DoSneaker(player, 0);
|
||||
K_DoSneaker(player, SNEAKERTYPE_PANEL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue