mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Eggman monitor gives you a very tiny speed boost
This commit is contained in:
parent
674c0aec17
commit
3151805f6b
2 changed files with 17 additions and 3 deletions
17
src/k_kart.c
17
src/k_kart.c
|
|
@ -2302,7 +2302,7 @@ static void K_GetKartBoostPower(player_t *player)
|
|||
if (player->kartstuff[k_flamedash]) // Flame Shield dash
|
||||
{
|
||||
fixed_t dashval = ((player->kartstuff[k_flamedash]<<FRACBITS) / TICRATE) / 20; // 1 second = +5% top speed
|
||||
ADDBOOST(FRACUNIT/2 + dashval, 2*FRACUNIT); // + infinite top speed, + 100% acceleration
|
||||
ADDBOOST(FRACUNIT/2 + dashval, 2*FRACUNIT); // + infinite top speed, + 200% acceleration
|
||||
}
|
||||
|
||||
if (player->kartstuff[k_startboost]) // Startup Boost
|
||||
|
|
@ -2314,6 +2314,9 @@ static void K_GetKartBoostPower(player_t *player)
|
|||
if (player->kartstuff[k_ringboost]) // Ring Boost
|
||||
ADDBOOST(FRACUNIT/5, 4*FRACUNIT); // + 20% top speed, + 400% acceleration
|
||||
|
||||
if (player->kartstuff[k_eggmanexplode]) // Ready-to-explode
|
||||
ADDBOOST(FRACUNIT/5, 2*FRACUNIT); // + 20% top speed, + 200% acceleration
|
||||
|
||||
if (player->kartstuff[k_draftpower] > 0) // Drafting
|
||||
{
|
||||
fixed_t draftspeed = ((3*FRACUNIT)/10) + ((player->kartspeed-1) * (FRACUNIT/50)); // min is 30%, max is 46%
|
||||
|
|
@ -5216,17 +5219,27 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
{
|
||||
// Speed lines
|
||||
if (EITHERSNEAKER(player) || player->kartstuff[k_ringboost]
|
||||
|| player->kartstuff[k_driftboost] || player->kartstuff[k_startboost])
|
||||
|| player->kartstuff[k_driftboost] || player->kartstuff[k_startboost]
|
||||
|| player->kartstuff[k_eggmanexplode])
|
||||
{
|
||||
mobj_t *fast = P_SpawnMobj(player->mo->x + (P_RandomRange(-36,36) * player->mo->scale),
|
||||
player->mo->y + (P_RandomRange(-36,36) * player->mo->scale),
|
||||
player->mo->z + (player->mo->height/2) + (P_RandomRange(-20,20) * player->mo->scale),
|
||||
MT_FASTLINE);
|
||||
|
||||
fast->angle = R_PointToAngle2(0, 0, player->mo->momx, player->mo->momy);
|
||||
fast->momx = 3*player->mo->momx/4;
|
||||
fast->momy = 3*player->mo->momy/4;
|
||||
fast->momz = 3*player->mo->momz/4;
|
||||
|
||||
K_MatchGenericExtraFlags(fast, player->mo);
|
||||
|
||||
// Make it red when you have the eggman speed boost
|
||||
if (player->kartstuff[k_eggmanexplode])
|
||||
{
|
||||
fast->color = SKINCOLOR_RED;
|
||||
fast->colorized = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (player->kartstuff[k_numboosts] > 0) // Boosting after images
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "doomdef.h"
|
||||
#include "d_player.h" // Need for player_t
|
||||
#include "command.h" // Need for player_t
|
||||
|
||||
#define KART_FULLTURN 800
|
||||
|
||||
|
|
@ -24,7 +25,7 @@ boolean K_IsPlayerLosing(player_t *player);
|
|||
boolean K_IsPlayerWanted(player_t *player);
|
||||
fixed_t K_GetKartGameSpeedScalar(SINT8 value);
|
||||
|
||||
consvar_t *KartItemCVars[NUMKARTRESULTS-1];
|
||||
extern consvar_t *KartItemCVars[NUMKARTRESULTS-1];
|
||||
|
||||
INT32 K_GetShieldFromItem(INT32 item);
|
||||
void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue