mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Add Bumper power-up, give 5 bumpers to the player
This commit is contained in:
parent
dafdb0fc10
commit
065475ea29
2 changed files with 12 additions and 2 deletions
|
|
@ -35,6 +35,10 @@ void K_GivePowerUp(player_t* player, kartitems_t powerup, tic_t time)
|
||||||
player->powerup.barrierTimer += time;
|
player->powerup.barrierTimer += time;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case POWERUP_BUMPER:
|
||||||
|
K_GiveBumpersToPlayer(player, nullptr, 5);
|
||||||
|
break;
|
||||||
|
|
||||||
case POWERUP_SUPERFLICKY:
|
case POWERUP_SUPERFLICKY:
|
||||||
if (K_PowerUpRemaining(player, POWERUP_SUPERFLICKY))
|
if (K_PowerUpRemaining(player, POWERUP_SUPERFLICKY))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,12 @@
|
||||||
#include "../k_objects.h"
|
#include "../k_objects.h"
|
||||||
#include "../p_local.h"
|
#include "../p_local.h"
|
||||||
#include "../k_kart.h"
|
#include "../k_kart.h"
|
||||||
|
#include "../k_powerup.h"
|
||||||
|
|
||||||
|
static INT16 guard_upscale (player_t *player)
|
||||||
|
{
|
||||||
|
return K_PowerUpRemaining(player, POWERUP_BARRIER) ? 40 : player->spheres;
|
||||||
|
}
|
||||||
|
|
||||||
void Obj_BlockRingThink (mobj_t *ring)
|
void Obj_BlockRingThink (mobj_t *ring)
|
||||||
{
|
{
|
||||||
|
|
@ -22,7 +28,7 @@ void Obj_BlockRingThink (mobj_t *ring)
|
||||||
ring->color = mo->color;
|
ring->color = mo->color;
|
||||||
|
|
||||||
fixed_t baseScale = mo->scale / 2;
|
fixed_t baseScale = mo->scale / 2;
|
||||||
baseScale += (mo->scale / 30) * player->spheres;
|
baseScale += (mo->scale / 30) * guard_upscale(player);
|
||||||
P_SetScale(ring, baseScale);
|
P_SetScale(ring, baseScale);
|
||||||
|
|
||||||
// Twirl
|
// Twirl
|
||||||
|
|
@ -55,7 +61,7 @@ void Obj_BlockBodyThink (mobj_t *body)
|
||||||
body->flags &= ~(MF_NOCLIPTHING);
|
body->flags &= ~(MF_NOCLIPTHING);
|
||||||
|
|
||||||
fixed_t baseScale = mo->scale / 2;
|
fixed_t baseScale = mo->scale / 2;
|
||||||
baseScale += (mo->scale / 30) * player->spheres;
|
baseScale += (mo->scale / 30) * guard_upscale(player);
|
||||||
P_SetScale(body, baseScale);
|
P_SetScale(body, baseScale);
|
||||||
|
|
||||||
P_MoveOrigin(body, mo->x, mo->y, mo->z + mo->height/2);
|
P_MoveOrigin(body, mo->x, mo->y, mo->z + mo->height/2);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue