mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +00:00
I actually didn't do any of this right!! Whoops!!
Also made red shells dumb in battle mode
This commit is contained in:
parent
2cbef008c8
commit
1dcdaf0c44
5 changed files with 25 additions and 21 deletions
|
|
@ -275,6 +275,7 @@ typedef enum
|
||||||
k_startimer, // Invincibility timer
|
k_startimer, // Invincibility timer
|
||||||
k_spinouttimer, // Wipe-out from a banana peel or oil slick (was "pw_bananacam")
|
k_spinouttimer, // Wipe-out from a banana peel or oil slick (was "pw_bananacam")
|
||||||
k_laserwisptimer, // The duration and relative angle of the laser
|
k_laserwisptimer, // The duration and relative angle of the laser
|
||||||
|
k_justbumped, // Prevent players from endlessly bumping into each other
|
||||||
k_poweritemtimer, // Battle mode, how long before you're allowed another power item (Star, Megashroom)
|
k_poweritemtimer, // Battle mode, how long before you're allowed another power item (Star, Megashroom)
|
||||||
|
|
||||||
// Each item needs its own power slot, for the HUD and held use
|
// Each item needs its own power slot, for the HUD and held use
|
||||||
|
|
|
||||||
26
src/k_kart.c
26
src/k_kart.c
|
|
@ -1128,8 +1128,6 @@ void K_KartBilliards(mobj_t *mobj1, mobj_t *mobj2, boolean bounce)
|
||||||
mobj2->momz = newz;
|
mobj2->momz = newz;
|
||||||
}
|
}
|
||||||
|
|
||||||
void K_KartBouncer(void)
|
|
||||||
{
|
|
||||||
// Because this is done during collision now, rmomx and rmomy need to be recalculated
|
// Because this is done during collision now, rmomx and rmomy need to be recalculated
|
||||||
// so that friction doesn't immediately decide to stop the player if they're at a standstill
|
// so that friction doesn't immediately decide to stop the player if they're at a standstill
|
||||||
if (mobj1->player)
|
if (mobj1->player)
|
||||||
|
|
@ -1360,6 +1358,9 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
if (player->kartstuff[k_sounds])
|
if (player->kartstuff[k_sounds])
|
||||||
player->kartstuff[k_sounds]--;
|
player->kartstuff[k_sounds]--;
|
||||||
|
|
||||||
|
if (player->kartstuff[k_justbumped])
|
||||||
|
player->kartstuff[k_justbumped]--;
|
||||||
|
|
||||||
// ???
|
// ???
|
||||||
/*
|
/*
|
||||||
if (player->kartstuff[k_jmp] > 1 && onground)
|
if (player->kartstuff[k_jmp] > 1 && onground)
|
||||||
|
|
@ -2020,13 +2021,13 @@ static mobj_t *K_ThrowKartItem(player_t *player, boolean missile, mobjtype_t map
|
||||||
switch (K_GetKartCC())
|
switch (K_GetKartCC())
|
||||||
{
|
{
|
||||||
case 50:
|
case 50:
|
||||||
PROJSPEED = 85*FRACUNIT; // Avg Speed is 34
|
PROJSPEED = 68*FRACUNIT; // Avg Speed is 34
|
||||||
break;
|
break;
|
||||||
case 150:
|
case 150:
|
||||||
PROJSPEED = 120*FRACUNIT; // Avg Speed is 48
|
PROJSPEED = 96*FRACUNIT; // Avg Speed is 48
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
PROJSPEED = 102*FRACUNIT+FRACUNIT/2; // Avg Speed is 41
|
PROJSPEED = 82*FRACUNIT; // Avg Speed is 41
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2129,7 +2130,7 @@ static mobj_t *K_ThrowKartItem(player_t *player, boolean missile, mobjtype_t map
|
||||||
if (dir == 1 || dir == 2)
|
if (dir == 1 || dir == 2)
|
||||||
{
|
{
|
||||||
// Shoot forward
|
// Shoot forward
|
||||||
mo = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z + 80*FRACUNIT, mapthing);
|
mo = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z + player->mo->height/2, mapthing);
|
||||||
|
|
||||||
mo->threshold = 10;
|
mo->threshold = 10;
|
||||||
|
|
||||||
|
|
@ -2143,22 +2144,19 @@ static mobj_t *K_ThrowKartItem(player_t *player, boolean missile, mobjtype_t map
|
||||||
INT32 HEIGHT;
|
INT32 HEIGHT;
|
||||||
|
|
||||||
if (dir == 2)
|
if (dir == 2)
|
||||||
HEIGHT = 16*FRACUNIT + player->mo->momz;
|
HEIGHT = 40*FRACUNIT + player->mo->momz;
|
||||||
else
|
else
|
||||||
HEIGHT = 8*FRACUNIT + player->mo->momz;
|
HEIGHT = 30*FRACUNIT + player->mo->momz;
|
||||||
|
|
||||||
if (HEIGHT > 64*FRACUNIT)
|
mo->momx = player->mo->momx + FixedMul(FINECOSINE(fa), PROJSPEED);
|
||||||
HEIGHT = 64*FRACUNIT;
|
mo->momy = player->mo->momy + FixedMul(FINESINE(fa), PROJSPEED);
|
||||||
|
|
||||||
mo->momx = FixedMul(FINECOSINE(fa), PROJSPEED);
|
|
||||||
mo->momy = FixedMul(FINESINE(fa), PROJSPEED);
|
|
||||||
mo->momz = HEIGHT;
|
mo->momz = HEIGHT;
|
||||||
|
|
||||||
if (player->mo->eflags & MFE_VERTICALFLIP)
|
if (player->mo->eflags & MFE_VERTICALFLIP)
|
||||||
mo->eflags |= MFE_VERTICALFLIP;
|
mo->eflags |= MFE_VERTICALFLIP;
|
||||||
}
|
}
|
||||||
|
|
||||||
mobj_t *throwmo = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z + 80*FRACUNIT, MT_FIREDITEM);
|
mobj_t *throwmo = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z + player->mo->height/2, MT_FIREDITEM);
|
||||||
P_SetTarget(&throwmo->target, player->mo);
|
P_SetTarget(&throwmo->target, player->mo);
|
||||||
throwmo->movecount = 0; // above player
|
throwmo->movecount = 0; // above player
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ UINT8 K_GetKartColorByName(const char *name);
|
||||||
|
|
||||||
void K_RegisterKartStuff(void);
|
void K_RegisterKartStuff(void);
|
||||||
|
|
||||||
|
UINT8 K_GetKartCC(void);
|
||||||
void K_KartBilliards(mobj_t *mobj1, mobj_t *mobj2, boolean bounce);
|
void K_KartBilliards(mobj_t *mobj1, mobj_t *mobj2, boolean bounce);
|
||||||
void K_KartPlayerThink(player_t *player, ticcmd_t *cmd);
|
void K_KartPlayerThink(player_t *player, ticcmd_t *cmd);
|
||||||
void K_SpinPlayer(player_t *player, mobj_t *source);
|
void K_SpinPlayer(player_t *player, mobj_t *source);
|
||||||
|
|
|
||||||
|
|
@ -1617,9 +1617,9 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
if (gametype != GT_RACE)
|
if (gametype != GT_RACE)
|
||||||
{
|
{
|
||||||
if (thing->player->kartstuff[k_mushroomtimer] && !(tmthing->player->kartstuff[k_mushroomtimer]))
|
if (thing->player->kartstuff[k_mushroomtimer] && !(tmthing->player->kartstuff[k_mushroomtimer]))
|
||||||
K_StealBalloon(&thing->player, &tmthing->player);
|
K_StealBalloon(thing->player, tmthing->player);
|
||||||
else if (tmthing->player->kartstuff[k_mushroomtimer] && !(thing->player->kartstuff[k_mushroomtimer]))
|
else if (tmthing->player->kartstuff[k_mushroomtimer] && !(thing->player->kartstuff[k_mushroomtimer]))
|
||||||
K_StealBalloon(&tmthing->player, &thing->player);
|
K_StealBalloon(tmthing->player, thing->player);
|
||||||
}
|
}
|
||||||
|
|
||||||
thing->player->kartstuff[k_justbumped] = 6;
|
thing->player->kartstuff[k_justbumped] = 6;
|
||||||
|
|
|
||||||
14
src/p_mobj.c
14
src/p_mobj.c
|
|
@ -1378,6 +1378,10 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
|
||||||
break;
|
break;
|
||||||
case MT_WATERDROP:
|
case MT_WATERDROP:
|
||||||
gravityadd >>= 1;
|
gravityadd >>= 1;
|
||||||
|
case MT_BANANAITEM:
|
||||||
|
case MT_FAKEITEM:
|
||||||
|
case MT_BOMBITEM:
|
||||||
|
gravityadd = FixedMul(gravityadd, 5*FRACUNIT/2);
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -7686,11 +7690,11 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
|
|
||||||
P_SpawnGhostMobj(mobj);
|
P_SpawnGhostMobj(mobj);
|
||||||
|
|
||||||
if (cv_kartcc.value == 50)
|
if (K_GetKartCC() == 50)
|
||||||
{
|
{
|
||||||
finalspeed = FixedMul(finalspeed, FRACUNIT-FRACUNIT/4);
|
finalspeed = FixedMul(finalspeed, FRACUNIT-FRACUNIT/4);
|
||||||
}
|
}
|
||||||
else if (cv_kartcc.value == 150)
|
else if (K_GetKartCC() == 150)
|
||||||
{
|
{
|
||||||
finalspeed = FixedMul(finalspeed, FRACUNIT+FRACUNIT/4);
|
finalspeed = FixedMul(finalspeed, FRACUNIT+FRACUNIT/4);
|
||||||
}
|
}
|
||||||
|
|
@ -7728,18 +7732,18 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
if (leveltime % 7 == 0)
|
if (leveltime % 7 == 0)
|
||||||
S_StartSound(mobj, mobj->info->activesound);
|
S_StartSound(mobj, mobj->info->activesound);
|
||||||
|
|
||||||
if (cv_kartcc.value == 50)
|
if (K_GetKartCC() == 50)
|
||||||
{
|
{
|
||||||
topspeed = FixedMul(topspeed, FRACUNIT-FRACUNIT/4);
|
topspeed = FixedMul(topspeed, FRACUNIT-FRACUNIT/4);
|
||||||
distbarrier = FixedMul(distbarrier, FRACUNIT-FRACUNIT/4);
|
distbarrier = FixedMul(distbarrier, FRACUNIT-FRACUNIT/4);
|
||||||
}
|
}
|
||||||
else if (cv_kartcc.value == 150)
|
else if (K_GetKartCC() == 150)
|
||||||
{
|
{
|
||||||
topspeed = FixedMul(topspeed, FRACUNIT+FRACUNIT/4);
|
topspeed = FixedMul(topspeed, FRACUNIT+FRACUNIT/4);
|
||||||
distbarrier = FixedMul(distbarrier, FRACUNIT+FRACUNIT/4);
|
distbarrier = FixedMul(distbarrier, FRACUNIT+FRACUNIT/4);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mobj->tracer)
|
if (gametype == GT_RACE && mobj->tracer)
|
||||||
{
|
{
|
||||||
distaway = P_AproxDistance(mobj->tracer->x - mobj->x, mobj->tracer->y - mobj->y);
|
distaway = P_AproxDistance(mobj->tracer->x - mobj->x, mobj->tracer->y - mobj->y);
|
||||||
if (distaway < distbarrier)
|
if (distaway < distbarrier)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue