mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-03-22 10:51:54 +00:00
Lots of small tweaks & fixes, that should make Battle a LOT more bearable
- Comeback timer is now always 10 seconds instead of scaling - Takes 10 seconds before exiting - Flashing tics is doubled in Battle Mode - Removed a bunch of bomb nerfs - Bombs are back to making only 1 point per hit - Exposed K_GetKartAccel & K_GetKartFlashing to Lua - Item boxes should no longer drop while going up slopes - Trading item boxes with a bomb should turn you back into a bomb - Balloons should no longer all respawn when dying in pits in 2-player games - Flashing players are able to kill *thrown* shells again (shields and trap items are still unkillable). Prevents red shells from being able to stick to a flashing player and hurt them again as soon as they're done flashing - CHECK appears at a farther distance
This commit is contained in:
parent
3d3972fac9
commit
cca30d1095
12 changed files with 124 additions and 135 deletions
|
@ -310,7 +310,6 @@ typedef enum
|
|||
|
||||
// Battle Mode vars
|
||||
k_balloon, // Number of balloons left
|
||||
k_comebackhits, // Number of times hit in comeback mode
|
||||
k_comebackpoints, // Number of times you've bombed or gave an item to someone; once it's 3 it gets set back to 0 and you're given a balloon
|
||||
k_comebackmode, // 0 = bomb, 1 = item
|
||||
k_comebackshowninfo,// Have you already seen the info screen before?
|
||||
|
|
10
src/g_game.c
10
src/g_game.c
|
@ -2200,7 +2200,7 @@ void G_PlayerReborn(INT32 player)
|
|||
INT32 starpostwp;
|
||||
INT32 offroad;
|
||||
INT32 balloon;
|
||||
INT32 comebackhits;
|
||||
INT32 comebackpoints;
|
||||
|
||||
score = players[player].score;
|
||||
lives = players[player].lives;
|
||||
|
@ -2256,7 +2256,7 @@ void G_PlayerReborn(INT32 player)
|
|||
starpostwp = players[player].kartstuff[k_starpostwp];
|
||||
offroad = players[player].kartstuff[k_offroad];
|
||||
balloon = players[player].kartstuff[k_balloon];
|
||||
comebackhits = players[player].kartstuff[k_comebackhits];
|
||||
comebackpoints = players[player].kartstuff[k_comebackpoints];
|
||||
|
||||
p = &players[player];
|
||||
memset(p, 0, sizeof (*p));
|
||||
|
@ -2313,8 +2313,8 @@ void G_PlayerReborn(INT32 player)
|
|||
p->kartstuff[k_starpostwp] = starpostwp; // TODO: get these out of kartstuff, it causes desync
|
||||
p->kartstuff[k_offroad] = offroad;
|
||||
p->kartstuff[k_balloon] = balloon;
|
||||
p->kartstuff[k_comebackhits] = comebackhits;
|
||||
p->kartstuff[k_comebacktimer] = comebacktime * (comebackhits+1);
|
||||
p->kartstuff[k_comebackpoints] = comebackpoints;
|
||||
p->kartstuff[k_comebacktimer] = comebacktime;
|
||||
|
||||
// Don't do anything immediately
|
||||
p->pflags |= PF_USEDOWN;
|
||||
|
@ -2326,7 +2326,7 @@ void G_PlayerReborn(INT32 player)
|
|||
p->panim = PA_IDLE; // standing animation
|
||||
|
||||
if ((netgame || multiplayer) && !p->spectator)
|
||||
p->powers[pw_flashing] = flashingtics-1; // Babysitting deterrent
|
||||
p->powers[pw_flashing] = K_GetKartFlashing(p)-1; // Babysitting deterrent
|
||||
|
||||
if (p-players == consoleplayer)
|
||||
{
|
||||
|
|
144
src/k_kart.c
144
src/k_kart.c
|
@ -1394,7 +1394,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
player->kartstuff[k_comebackshowninfo] = 1;
|
||||
}
|
||||
|
||||
if (player->kartstuff[k_spinout] == 0 && player->kartstuff[k_spinouttimer] == 0 && player->powers[pw_flashing] == flashingtics)
|
||||
if (player->kartstuff[k_spinout] == 0 && player->kartstuff[k_spinouttimer] == 0 && player->powers[pw_flashing] == K_GetKartFlashing(player))
|
||||
player->powers[pw_flashing]--;
|
||||
|
||||
if (player->kartstuff[k_magnettimer])
|
||||
|
@ -1455,11 +1455,6 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
if (player->kartstuff[k_sounds])
|
||||
player->kartstuff[k_sounds]--;
|
||||
|
||||
if (player->kartstuff[k_comebackhits] > 5)
|
||||
player->kartstuff[k_comebackhits] = 5;
|
||||
else if (player->kartstuff[k_comebackhits] < 0)
|
||||
player->kartstuff[k_comebackhits] = 0;
|
||||
|
||||
// ???
|
||||
/*
|
||||
if (player->kartstuff[k_jmp] > 1 && onground)
|
||||
|
@ -1643,10 +1638,7 @@ fixed_t K_GetKartSpeed(player_t *player, boolean doboostpower)
|
|||
break;
|
||||
}
|
||||
|
||||
if (gametype != GT_RACE && player->kartstuff[k_balloon] <= 0)
|
||||
k_speed += 3; // 153
|
||||
else
|
||||
k_speed += player->kartspeed*3; // 153 - 177
|
||||
k_speed += player->kartspeed*3; // 153 - 177
|
||||
|
||||
finalspeed = FixedMul(FixedMul(k_speed<<14, g_cc), player->mo->scale);
|
||||
|
||||
|
@ -1655,19 +1647,27 @@ fixed_t K_GetKartSpeed(player_t *player, boolean doboostpower)
|
|||
return finalspeed;
|
||||
}
|
||||
|
||||
static fixed_t K_GetKartAccel(player_t *player)
|
||||
fixed_t K_GetKartAccel(player_t *player)
|
||||
{
|
||||
fixed_t k_accel = 32; // 36;
|
||||
|
||||
if (gametype == GT_RACE || player->kartstuff[k_balloon] > 0)
|
||||
{
|
||||
//k_accel += 3 * (9 - player->kartspeed); // 36 - 60
|
||||
k_accel += 4 * (9 - player->kartspeed); // 32 - 64
|
||||
}
|
||||
//k_accel += 3 * (9 - player->kartspeed); // 36 - 60
|
||||
k_accel += 4 * (9 - player->kartspeed); // 32 - 64
|
||||
|
||||
return FixedMul(k_accel, K_GetKartBoostPower(player, false));
|
||||
}
|
||||
|
||||
UINT16 K_GetKartFlashing(player_t *player)
|
||||
{
|
||||
UINT16 tics = flashingtics;
|
||||
if (gametype != GT_RACE)
|
||||
{
|
||||
tics *= 2;
|
||||
//tics += (3*TICRATE/8) * (player->kartspeed-1);
|
||||
}
|
||||
return tics;
|
||||
}
|
||||
|
||||
fixed_t K_3dKartMovement(player_t *player, boolean onground, fixed_t forwardmove)
|
||||
{
|
||||
fixed_t accelmax = 4000;
|
||||
|
@ -1729,8 +1729,6 @@ void K_SpinPlayer(player_t *player, mobj_t *source)
|
|||
CONS_Printf(M_GetText("%s lost all of their balloons!\n"), player_names[player-players]);
|
||||
player->kartstuff[k_balloon]--;
|
||||
}
|
||||
else
|
||||
player->kartstuff[k_comebackhits]++;
|
||||
|
||||
if (source && source->player && player != source->player)
|
||||
P_AddPlayerScore(source->player, 1);
|
||||
|
@ -1738,7 +1736,7 @@ void K_SpinPlayer(player_t *player, mobj_t *source)
|
|||
K_CheckBalloons();
|
||||
}
|
||||
|
||||
player->kartstuff[k_comebacktimer] = comebacktime * (player->kartstuff[k_comebackhits]+1);
|
||||
player->kartstuff[k_comebacktimer] = comebacktime;
|
||||
|
||||
if (player->kartstuff[k_spinouttype] <= 0)
|
||||
{
|
||||
|
@ -1756,7 +1754,7 @@ void K_SpinPlayer(player_t *player, mobj_t *source)
|
|||
else
|
||||
player->kartstuff[k_spinouttimer] = 1*TICRATE; // ? Whipeout
|
||||
|
||||
player->powers[pw_flashing] = flashingtics;
|
||||
player->powers[pw_flashing] = K_GetKartFlashing(player);
|
||||
|
||||
player->kartstuff[k_spinout] = player->kartstuff[k_spinouttimer];
|
||||
|
||||
|
@ -1789,8 +1787,6 @@ void K_SquishPlayer(player_t *player, mobj_t *source)
|
|||
CONS_Printf(M_GetText("%s lost all of their balloons!\n"), player_names[player-players]);
|
||||
player->kartstuff[k_balloon]--;
|
||||
}
|
||||
else
|
||||
player->kartstuff[k_comebackhits]++;
|
||||
|
||||
if (source && source->player && player != source->player)
|
||||
P_AddPlayerScore(source->player, 1);
|
||||
|
@ -1798,11 +1794,11 @@ void K_SquishPlayer(player_t *player, mobj_t *source)
|
|||
K_CheckBalloons();
|
||||
}
|
||||
|
||||
player->kartstuff[k_comebacktimer] = comebacktime * (player->kartstuff[k_comebackhits]+1);
|
||||
player->kartstuff[k_comebacktimer] = comebacktime;
|
||||
|
||||
player->kartstuff[k_squishedtimer] = 1*TICRATE;
|
||||
|
||||
player->powers[pw_flashing] = flashingtics;
|
||||
player->powers[pw_flashing] = K_GetKartFlashing(player);
|
||||
|
||||
player->mo->flags |= MF_NOCLIP;
|
||||
|
||||
|
@ -1838,8 +1834,6 @@ void K_ExplodePlayer(player_t *player, mobj_t *source) // A bit of a hack, we ju
|
|||
CONS_Printf(M_GetText("%s lost all of their balloons!\n"), player_names[player-players]);
|
||||
player->kartstuff[k_balloon]--;
|
||||
}
|
||||
else
|
||||
player->kartstuff[k_comebackhits]++;
|
||||
|
||||
if (source && source->player && player != source->player)
|
||||
P_AddPlayerScore(source->player, 1);
|
||||
|
@ -1847,13 +1841,13 @@ void K_ExplodePlayer(player_t *player, mobj_t *source) // A bit of a hack, we ju
|
|||
K_CheckBalloons();
|
||||
}
|
||||
|
||||
player->kartstuff[k_comebacktimer] = comebacktime * (player->kartstuff[k_comebackhits]+1);
|
||||
player->kartstuff[k_comebacktimer] = comebacktime;
|
||||
|
||||
player->kartstuff[k_spinouttype] = 1;
|
||||
player->kartstuff[k_spinouttimer] = 2*TICRATE+(TICRATE/2);
|
||||
player->kartstuff[k_spinout] = player->kartstuff[k_spinouttimer];
|
||||
|
||||
player->powers[pw_flashing] = flashingtics;
|
||||
player->powers[pw_flashing] = K_GetKartFlashing(player);
|
||||
|
||||
if (player->mo->state != &states[S_KART_SPIN])
|
||||
P_SetPlayerMobjState(player->mo, S_KART_SPIN);
|
||||
|
@ -1921,7 +1915,7 @@ void K_StealBalloon(player_t *player, player_t *victim)
|
|||
P_SetMobjState(newmo, S_BATTLEBALLOON1);
|
||||
|
||||
player->kartstuff[k_balloon]++;
|
||||
player->powers[pw_flashing] = flashingtics;
|
||||
player->powers[pw_flashing] = K_GetKartFlashing(player);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -4492,7 +4486,7 @@ static void K_drawKartBalloonsOrKarma(void)
|
|||
if (stplyr->kartstuff[k_balloon] <= 0)
|
||||
{
|
||||
V_DrawScaledPatch(LAPS_X, STRINGY(LAPS_Y), flags, kp_karmasticker);
|
||||
V_DrawKartString(LAPS_X+58, STRINGY(LAPS_Y+3), flags, va("%d", stplyr->kartstuff[k_comebackhits]));
|
||||
V_DrawKartString(LAPS_X+58, STRINGY(LAPS_Y+3), flags, va("%d", stplyr->kartstuff[k_comebackpoints]));
|
||||
V_DrawKartString(LAPS_X+85, STRINGY(LAPS_Y+3), flags, va("3"));
|
||||
}
|
||||
else
|
||||
|
@ -4515,7 +4509,7 @@ static void K_drawKartBalloonsOrKarma(void)
|
|||
fixed_t K_FindCheckX(fixed_t px, fixed_t py, angle_t ang, fixed_t mx, fixed_t my)
|
||||
{
|
||||
fixed_t dist, x;
|
||||
fixed_t range = RING_DIST/4;
|
||||
fixed_t range = RING_DIST/3;
|
||||
angle_t diff;
|
||||
|
||||
range *= (K_GetKartCC()/50);
|
||||
|
@ -4587,51 +4581,51 @@ static void K_drawKartPlayerCheck(void)
|
|||
}
|
||||
}
|
||||
|
||||
static void K_drawBattleWait(void)
|
||||
static void K_drawBattleFullscreen(void)
|
||||
{
|
||||
INT32 t = ((stplyr->kartstuff[k_comebacktimer]+TICRATE)/TICRATE);
|
||||
INT32 X = BASEVIDWIDTH/2;
|
||||
|
||||
if (!WipeInAction || !menuactive || !splitscreen)
|
||||
if (!WipeInAction && !menuactive && !splitscreen)
|
||||
V_DrawFadeScreen();
|
||||
|
||||
while (t)
|
||||
if (stplyr->exiting)
|
||||
{
|
||||
X -= 8;
|
||||
t /= 10;
|
||||
}
|
||||
|
||||
if (!stplyr->kartstuff[k_comebackshowninfo])
|
||||
{
|
||||
V_DrawScaledPatch(BASEVIDWIDTH/2, STRINGY(BASEVIDHEIGHT/2), 0, kp_battleinfo);
|
||||
V_DrawScaledPatch(BASEVIDWIDTH/2, STRINGY((BASEVIDHEIGHT/2) + 66), 0, kp_timeoutsticker);
|
||||
V_DrawKartString(X, STRINGY((BASEVIDHEIGHT/2) + 66), 0, va("%d", ((stplyr->kartstuff[k_comebacktimer]+TICRATE)/TICRATE)));
|
||||
}
|
||||
else
|
||||
{
|
||||
V_DrawScaledPatch(BASEVIDWIDTH/2, STRINGY(BASEVIDHEIGHT/2), 0, kp_battlewait);
|
||||
V_DrawScaledPatch(BASEVIDWIDTH/2, STRINGY((BASEVIDHEIGHT/2) + 30), 0, kp_timeoutsticker);
|
||||
V_DrawKartString(X, STRINGY((BASEVIDHEIGHT/2) + 30), 0, va("%d", ((stplyr->kartstuff[k_comebacktimer]+TICRATE)/TICRATE)));
|
||||
}
|
||||
}
|
||||
|
||||
static void K_drawBattleExit(void)
|
||||
{
|
||||
if (!WipeInAction || !menuactive || !(splitscreen && stplyr != &players[consoleplayer]))
|
||||
V_DrawFadeScreen();
|
||||
if (splitscreen)
|
||||
{
|
||||
if (stplyr->kartstuff[k_balloon])
|
||||
V_DrawScaledPatch(96, STRINGY(BASEVIDHEIGHT/2), 0, kp_battlewin);
|
||||
if (splitscreen)
|
||||
{
|
||||
if (stplyr->kartstuff[k_balloon])
|
||||
V_DrawScaledPatch(96, STRINGY(100), 0, kp_battlewin);
|
||||
else
|
||||
V_DrawScaledPatch(BASEVIDWIDTH-96, STRINGY(100), 0, kp_battlelose);
|
||||
}
|
||||
else
|
||||
V_DrawScaledPatch(BASEVIDWIDTH-96, STRINGY(BASEVIDHEIGHT/2), 0, kp_battlelose);
|
||||
{
|
||||
if (stplyr->kartstuff[k_balloon])
|
||||
V_DrawScaledPatch(BASEVIDWIDTH/2, STRINGY(100), 0, kp_battlewin);
|
||||
else
|
||||
V_DrawScaledPatch(BASEVIDWIDTH/2, STRINGY(100), 0, kp_battlelose);
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (stplyr->kartstuff[k_balloon] <= 0 && stplyr->kartstuff[k_comebacktimer] && cv_kartcomeback.value)
|
||||
{
|
||||
if (stplyr->kartstuff[k_balloon])
|
||||
V_DrawScaledPatch(BASEVIDWIDTH/2, STRINGY(BASEVIDHEIGHT/2), 0, kp_battlewin);
|
||||
INT32 t = stplyr->kartstuff[k_comebacktimer]/TICRATE;
|
||||
INT32 X = BASEVIDWIDTH/2;
|
||||
|
||||
while (t)
|
||||
{
|
||||
X -= 8;
|
||||
t /= 10;
|
||||
}
|
||||
|
||||
if (!stplyr->kartstuff[k_comebackshowninfo])
|
||||
{
|
||||
V_DrawScaledPatch(BASEVIDWIDTH/2, STRINGY(BASEVIDHEIGHT/2), 0, kp_battleinfo);
|
||||
V_DrawScaledPatch(BASEVIDWIDTH/2, STRINGY((BASEVIDHEIGHT/2) + 66), 0, kp_timeoutsticker);
|
||||
V_DrawKartString(X, STRINGY((BASEVIDHEIGHT/2) + 66), 0, va("%d", stplyr->kartstuff[k_comebacktimer]/TICRATE));
|
||||
}
|
||||
else
|
||||
V_DrawScaledPatch(BASEVIDWIDTH/2, STRINGY(BASEVIDHEIGHT/2), 0, kp_battlelose);
|
||||
{
|
||||
V_DrawScaledPatch(BASEVIDWIDTH/2, STRINGY(BASEVIDHEIGHT/2), 0, kp_battlewait);
|
||||
V_DrawScaledPatch(BASEVIDWIDTH/2, STRINGY((BASEVIDHEIGHT/2) + 30), 0, kp_timeoutsticker);
|
||||
V_DrawKartString(X, STRINGY((BASEVIDHEIGHT/2) + 30), 0, va("%d", stplyr->kartstuff[k_comebacktimer]/TICRATE));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4747,18 +4741,10 @@ void K_drawKartHUD(void)
|
|||
K_initKartHUD();
|
||||
|
||||
// Draw full screen stuff that turns off the rest of the HUD
|
||||
if (gametype != GT_RACE)
|
||||
if ((gametype != GT_RACE) && (stplyr->exiting || (stplyr->kartstuff[k_balloon] <= 0 && stplyr->kartstuff[k_comebacktimer] && cv_kartcomeback.value)))
|
||||
{
|
||||
if (stplyr->exiting)
|
||||
{
|
||||
K_drawBattleExit();
|
||||
return;
|
||||
}
|
||||
else if (stplyr->kartstuff[k_balloon] <= 0 && stplyr->kartstuff[k_comebacktimer] && cv_kartcomeback.value)
|
||||
{
|
||||
K_drawBattleWait();
|
||||
return;
|
||||
}
|
||||
K_drawBattleFullscreen();
|
||||
return;
|
||||
}
|
||||
|
||||
// Draw Lakitu
|
||||
|
|
|
@ -31,6 +31,8 @@ boolean K_CheckPlayersRespawnColliding(INT32 playernum, fixed_t x, fixed_t y);
|
|||
INT16 K_GetKartTurnValue(player_t *player, INT16 turnvalue);
|
||||
void K_MomentumToFacing(player_t *player);
|
||||
fixed_t K_GetKartSpeed(player_t *player, boolean doboostpower);
|
||||
fixed_t K_GetKartAccel(player_t *player);
|
||||
UINT16 K_GetKartFlashing(player_t *player);
|
||||
fixed_t K_3dKartMovement(player_t *player, boolean onground, fixed_t forwardmove);
|
||||
void K_MoveKartPlayer(player_t *player, boolean onground);
|
||||
void K_CheckBalloons(void);
|
||||
|
|
|
@ -2139,6 +2139,26 @@ static int lib_kGetKartSpeed(lua_State *L)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int lib_kGetKartAccel(lua_State *L)
|
||||
{
|
||||
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||
//HUDSAFE
|
||||
if (!player)
|
||||
return LUA_ErrInvalid(L, "player_t");
|
||||
lua_pushinteger(L, K_GetKartAccel(player));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lib_kGetKartFlashing(lua_State *L)
|
||||
{
|
||||
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||
//HUDSAFE
|
||||
if (!player)
|
||||
return LUA_ErrInvalid(L, "player_t");
|
||||
lua_pushinteger(L, K_GetKartFlashing(player));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static luaL_Reg lib[] = {
|
||||
{"print", lib_print},
|
||||
{"EvalMath", lib_evalMath},
|
||||
|
@ -2326,6 +2346,8 @@ static luaL_Reg lib[] = {
|
|||
{"K_DoBouncePad",lib_kDoBouncePad},
|
||||
{"K_MomentumToFacing",lib_kMomentumToFacing},
|
||||
{"K_GetKartSpeed",lib_kGetKartSpeed},
|
||||
{"K_GetKartAccel",lib_kGetKartAccel},
|
||||
{"K_GetKartFlashing",lib_kGetKartFlashing},
|
||||
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
#include "z_zone.h"
|
||||
#include "p_slopes.h"
|
||||
|
||||
#include "k_kart.h" // srb2kart
|
||||
|
||||
#include "lua_script.h"
|
||||
#include "lua_hook.h"
|
||||
|
||||
|
@ -1348,7 +1350,7 @@ void Command_ObjectPlace_f(void)
|
|||
players[0].mo->color = op_oldcolor;
|
||||
|
||||
// This is necessary for recovery of dying players.
|
||||
if (players[0].powers[pw_flashing] >= flashingtics)
|
||||
players[0].powers[pw_flashing] = flashingtics - 1;
|
||||
if (players[0].powers[pw_flashing] >= K_GetKartFlashing(&players[0]))
|
||||
players[0].powers[pw_flashing] = K_GetKartFlashing(&players[0]) - 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3627,7 +3627,9 @@ void A_AttractChase(mobj_t *actor)
|
|||
|
||||
P_LookForShield(actor); // Go find 'em, boy!
|
||||
|
||||
if (!actor->tracer
|
||||
if (actor->tracer && actor->tracer->player && actor->tracer->player->kartstuff[k_comebackmode] == 1)
|
||||
;
|
||||
else if (!actor->tracer
|
||||
|| !actor->tracer->player
|
||||
|| !actor->tracer->health
|
||||
|| !P_CheckSight(actor, actor->tracer)) // You have to be able to SEE it...sorta
|
||||
|
|
|
@ -414,6 +414,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
{
|
||||
if (player->kartstuff[k_comebackmode] == 0 && !player->kartstuff[k_comebacktimer])
|
||||
{
|
||||
if (special->tracer && special->tracer->player)
|
||||
special->tracer->player->kartstuff[k_comebackmode] = 0;
|
||||
P_SetTarget(&special->tracer, toucher);
|
||||
player->kartstuff[k_comebackmode] = 1;
|
||||
}
|
||||
|
@ -437,10 +439,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
CONS_Printf(M_GetText("%s is back in the game!\n"), player_names[special->tracer->player-players]);
|
||||
}
|
||||
|
||||
special->tracer->player->kartstuff[k_comebackhits]--;
|
||||
if (special->tracer->player->kartstuff[k_comebackhits] < 0)
|
||||
special->tracer->player->kartstuff[k_comebackhits] = 0;
|
||||
special->tracer->player->kartstuff[k_comebacktimer] = comebacktime * (special->tracer->player->kartstuff[k_comebackhits]+1);
|
||||
special->tracer->player->kartstuff[k_comebacktimer] = comebacktime;
|
||||
}
|
||||
|
||||
special->momx = special->momy = special->momz = 0;
|
||||
|
@ -2596,7 +2595,7 @@ static inline void P_NiGHTSDamage(mobj_t *target, mobj_t *source)
|
|||
target->momy = FixedMul(FINESINE(fa),target->target->radius);
|
||||
}
|
||||
|
||||
player->powers[pw_flashing] = flashingtics;
|
||||
player->powers[pw_flashing] = K_GetKartFlashing(player);
|
||||
P_SetMobjState(target->tracer, S_NIGHTSHURT1);
|
||||
S_StartSound(target, sfx_nghurt);
|
||||
|
||||
|
@ -3313,7 +3312,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
player->health -= damage; // mirror mobj health here
|
||||
if (damage < 10000)
|
||||
{
|
||||
target->player->powers[pw_flashing] = flashingtics;
|
||||
target->player->powers[pw_flashing] = K_GetKartFlashing(target->player);
|
||||
if (damage > 0) // don't spill emeralds/ammo/panels for shield damage
|
||||
P_PlayerRingBurst(player, damage);
|
||||
}
|
||||
|
|
35
src/p_map.c
35
src/p_map.c
|
@ -675,7 +675,8 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
&& (tmthing->target == thing->target)) // Don't hit each other if you have the same target
|
||||
return true;
|
||||
|
||||
if (thing->player && thing->player->powers[pw_flashing])
|
||||
if (thing->player && thing->player->powers[pw_flashing]
|
||||
&& !(tmthing->type == MT_GREENITEM || tmthing->type == MT_REDITEM || tmthing->type == MT_REDITEMDUD))
|
||||
return true;
|
||||
|
||||
if (thing->type == MT_PLAYER)
|
||||
|
@ -1107,7 +1108,8 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
if (tmthing->z + tmthing->height < thing->z)
|
||||
return true; // underneath
|
||||
|
||||
if (tmthing->player && tmthing->player->powers[pw_flashing])
|
||||
if (tmthing->player && tmthing->player->powers[pw_flashing]
|
||||
&& !(thing->type == MT_GREENITEM || thing->type == MT_REDITEM || thing->type == MT_REDITEMDUD))
|
||||
return true;
|
||||
|
||||
if (thing->type == MT_GREENSHIELD || thing->type == MT_TRIPLEGREENSHIELD1 || thing->type == MT_TRIPLEGREENSHIELD2 || thing->type == MT_TRIPLEGREENSHIELD3
|
||||
|
@ -1656,13 +1658,8 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
}
|
||||
|
||||
K_ExplodePlayer(tmthing->player, thing);
|
||||
P_AddPlayerScore(thing->player, 1); // 2 points instead of 1 for getting someone in comeback mode, since it's REALLY tough :V
|
||||
|
||||
thing->player->kartstuff[k_comebackhits]--;
|
||||
if (thing->player->kartstuff[k_comebackhits] < 0)
|
||||
thing->player->kartstuff[k_comebackhits] = 0;
|
||||
|
||||
thing->player->kartstuff[k_comebacktimer] = comebacktime * (thing->player->kartstuff[k_comebackhits]+1);
|
||||
thing->player->kartstuff[k_comebacktimer] = comebacktime;
|
||||
return true;
|
||||
}
|
||||
else if (thing->player->kartstuff[k_balloon] > 0)
|
||||
|
@ -1678,28 +1675,8 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
}
|
||||
|
||||
K_ExplodePlayer(thing->player, tmthing);
|
||||
P_AddPlayerScore(tmthing->player, 1); // 2 points instead of 1 for getting someone in comeback mode, since it's REALLY tough :V
|
||||
|
||||
tmthing->player->kartstuff[k_comebackhits]--;
|
||||
if (tmthing->player->kartstuff[k_comebackhits] < 0)
|
||||
tmthing->player->kartstuff[k_comebackhits] = 0;
|
||||
|
||||
tmthing->player->kartstuff[k_comebacktimer] = comebacktime * (tmthing->player->kartstuff[k_comebackhits]+1);
|
||||
return true;
|
||||
}
|
||||
else if (thing->player->kartstuff[k_balloon] <= 0 && tmthing->player->kartstuff[k_balloon] <= 0)
|
||||
{
|
||||
K_KartBouncing(tmthing, thing, false);
|
||||
thing->player->kartstuff[k_justbumped] = 6;
|
||||
tmthing->player->kartstuff[k_justbumped] = 6;
|
||||
|
||||
K_SpinPlayer(thing->player, tmthing);
|
||||
K_SpinPlayer(tmthing->player, thing);
|
||||
|
||||
thing->player->kartstuff[k_comebackhits]++;
|
||||
thing->player->kartstuff[k_comebacktimer] = comebacktime * (thing->player->kartstuff[k_comebackhits]+1);
|
||||
tmthing->player->kartstuff[k_comebackhits]++;
|
||||
tmthing->player->kartstuff[k_comebacktimer] = comebacktime * (tmthing->player->kartstuff[k_comebackhits]+1);
|
||||
tmthing->player->kartstuff[k_comebacktimer] = comebacktime;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -216,10 +216,10 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
|
|||
}
|
||||
}
|
||||
// You were in pain state after taking a hit, and you're moving out of pain state now?
|
||||
else */if (mobj->state == &states[mobj->info->painstate] && player->powers[pw_flashing] == flashingtics && state != mobj->info->painstate)
|
||||
else */if (mobj->state == &states[mobj->info->painstate] && player->powers[pw_flashing] == K_GetKartFlashing(player) && state != mobj->info->painstate)
|
||||
{
|
||||
// Start flashing, since you've landed.
|
||||
player->powers[pw_flashing] = flashingtics-1;
|
||||
player->powers[pw_flashing] = K_GetKartFlashing(player)-1;
|
||||
//P_DoPityCheck(player);
|
||||
}
|
||||
|
||||
|
@ -9456,6 +9456,8 @@ void P_SpawnPlayer(INT32 playernum)
|
|||
{
|
||||
if (!playeringame[i] || players[i].spectator || &players[i] == p)
|
||||
continue;
|
||||
if (players[i].jointime > 0)
|
||||
continue;
|
||||
pcount++;
|
||||
}
|
||||
|
||||
|
|
|
@ -7547,7 +7547,7 @@ void T_Pusher(pusher_t *p)
|
|||
if (thing->player && thing->player->pflags & PF_ROPEHANG)
|
||||
continue;
|
||||
|
||||
if (thing->player && (thing->state == &states[thing->info->painstate]) && (thing->player->powers[pw_flashing] > (flashingtics/4)*3 && thing->player->powers[pw_flashing] <= flashingtics))
|
||||
if (thing->player && (thing->state == &states[thing->info->painstate]) && (thing->player->powers[pw_flashing] > (K_GetKartFlashing(thing->player)/4)*3 && thing->player->powers[pw_flashing] <= K_GetKartFlashing(thing->player)))
|
||||
continue;
|
||||
|
||||
inFOF = touching = moved = false;
|
||||
|
|
16
src/p_user.c
16
src/p_user.c
|
@ -863,7 +863,7 @@ void P_DoPlayerPain(player_t *player, mobj_t *source, mobj_t *inflictor)
|
|||
|
||||
P_ResetPlayer(player);
|
||||
P_SetPlayerMobjState(player->mo, player->mo->info->painstate);
|
||||
player->powers[pw_flashing] = flashingtics;
|
||||
player->powers[pw_flashing] = K_GetKartFlashing(player);
|
||||
|
||||
if (player->timeshit != UINT8_MAX)
|
||||
++player->timeshit;
|
||||
|
@ -1607,9 +1607,7 @@ void P_DoPlayerExit(player_t *player)
|
|||
if (player->exiting)
|
||||
return;
|
||||
|
||||
/*if (cv_allowexitlevel.value == 0 && !G_PlatformGametype()) // srb2kart
|
||||
return;
|
||||
else*/ if (gametype == GT_RACE || gametype == GT_COMPETITION) // If in Race Mode, allow
|
||||
if (gametype == GT_RACE || gametype == GT_COMPETITION) // If in Race Mode, allow
|
||||
{
|
||||
// SRB2kart 120217
|
||||
if (!countdown && !(netgame || multiplayer))
|
||||
|
@ -3557,7 +3555,7 @@ static void P_DoSuperStuff(player_t *player)
|
|||
}
|
||||
|
||||
if (gametype != GT_COOP)
|
||||
player->powers[pw_flashing] = flashingtics-1;
|
||||
player->powers[pw_flashing] = K_GetKartFlashing(player)-1;
|
||||
|
||||
/*
|
||||
if (player->mo->health > 0)
|
||||
|
@ -5842,7 +5840,7 @@ static void P_NiGHTSMovement(player_t *player)
|
|||
}
|
||||
|
||||
// Currently reeling from being hit.
|
||||
if (player->powers[pw_flashing] > (2*flashingtics)/3)
|
||||
if (player->powers[pw_flashing] > (2*K_GetKartFlashing(player))/3)
|
||||
{
|
||||
{
|
||||
const angle_t fa = (FixedAngle(player->flyangle*FRACUNIT)>>ANGLETOFINESHIFT) & FINEMASK;
|
||||
|
@ -9120,7 +9118,7 @@ void P_PlayerThink(player_t *player)
|
|||
|
||||
// If it is set, start subtracting
|
||||
// Don't allow it to go back to 0
|
||||
if (player->exiting > 1 && player->exiting < 3*TICRATE && player->exiting > 1) // SRB2kart - " && player->exiting > 1"
|
||||
if (player->exiting > 1 && (player->exiting < 3*TICRATE || gametype != GT_RACE)) // SRB2kart - "&& player->exiting > 1"
|
||||
player->exiting--;
|
||||
|
||||
if (player->exiting && countdown2)
|
||||
|
@ -9375,7 +9373,7 @@ void P_PlayerThink(player_t *player)
|
|||
if (player->powers[pw_invulnerability] && player->powers[pw_invulnerability] < UINT16_MAX)
|
||||
player->powers[pw_invulnerability]--;
|
||||
|
||||
if (player->powers[pw_flashing] && player->powers[pw_flashing] < UINT16_MAX && ((player->pflags & PF_NIGHTSMODE) || player->powers[pw_flashing] < flashingtics))
|
||||
if (player->powers[pw_flashing] && player->powers[pw_flashing] < UINT16_MAX && ((player->pflags & PF_NIGHTSMODE) || player->powers[pw_flashing] < K_GetKartFlashing(player)))
|
||||
player->powers[pw_flashing]--;
|
||||
|
||||
if (player->powers[pw_tailsfly] && player->powers[pw_tailsfly] < UINT16_MAX && player->charability != CA_SWIM && !(player->powers[pw_super] && ALL7EMERALDS(player->powers[pw_emeralds]))) // tails fly counter
|
||||
|
@ -9467,7 +9465,7 @@ void P_PlayerThink(player_t *player)
|
|||
&& player->kartstuff[k_bootimer] == 0 && player->kartstuff[k_growshrinktimer] <= 0
|
||||
&& (player->kartstuff[k_comebacktimer] == 0 || (gametype == GT_RACE || player->kartstuff[k_balloon] > 0)))
|
||||
{
|
||||
if (player->powers[pw_flashing] > 0 && player->powers[pw_flashing] < flashingtics && (leveltime & 1))
|
||||
if (player->powers[pw_flashing] > 0 && player->powers[pw_flashing] < K_GetKartFlashing(player) && (leveltime & 1))
|
||||
player->mo->flags2 |= MF2_DONTDRAW;
|
||||
else
|
||||
player->mo->flags2 &= ~MF2_DONTDRAW;
|
||||
|
|
Loading…
Reference in a new issue