mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-04-04 17:37:46 +00:00
Merge branch 'sal-misc' of https://git.magicalgirl.moe/KartKrew/Kart.git into misc_plus_menustuffs
This commit is contained in:
commit
0e6bcee463
16 changed files with 189 additions and 92 deletions
|
@ -63,9 +63,9 @@ CV_PossibleValue_t CV_Unsigned[] = {{0, "MIN"}, {999999999, "MAX"}, {0, NULL}};
|
|||
CV_PossibleValue_t CV_Natural[] = {{1, "MIN"}, {999999999, "MAX"}, {0, NULL}};
|
||||
|
||||
//SRB2kart
|
||||
CV_PossibleValue_t karthud_cons_t[] = {
|
||||
{0, "Off"}, {1, "Default"}, {2, "SNES"}, {3, "MK64"},
|
||||
{0, NULL}};
|
||||
/*CV_PossibleValue_t karthud_cons_t[] = {
|
||||
{0, "Off"}, {1, "Default"}, {2, "SMK"}, {3, "MK64"},
|
||||
{0, NULL}};*/
|
||||
CV_PossibleValue_t kartspeed_cons_t[] = {
|
||||
{0, "Easy"}, {1, "Normal"}, {2, "Hard"},
|
||||
{0, NULL}};
|
||||
|
|
|
@ -127,7 +127,7 @@ extern CV_PossibleValue_t CV_Unsigned[];
|
|||
extern CV_PossibleValue_t CV_Natural[];
|
||||
|
||||
// SRB2kart
|
||||
extern CV_PossibleValue_t karthud_cons_t[];
|
||||
//extern CV_PossibleValue_t karthud_cons_t[];
|
||||
extern CV_PossibleValue_t kartspeed_cons_t[];
|
||||
|
||||
// register a variable for use at the console
|
||||
|
|
|
@ -344,7 +344,7 @@ consvar_t cv_tripleorbinaut = {"tripleorbinaut", "On", CV_NETVAR|CV_CHEAT, C
|
|||
consvar_t cv_quadorbinaut = {"quadorbinaut", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_dualjawz = {"dualjawz", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_karthud = {"karthud", "Default", CV_SAVE|CV_CALL, karthud_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
//consvar_t cv_karthud = {"karthud", "Default", CV_SAVE|CV_CALL, karthud_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
static CV_PossibleValue_t kartminimap_cons_t[] = {{0, "MIN"}, {10, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_kartminimap = {"kartminimap", "4", CV_SAVE, kartminimap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartcheck = {"kartcheck", "Yes", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
|
|
@ -117,7 +117,7 @@ extern consvar_t cv_thundershield, cv_hyudoro, cv_pogospring, cv_kitchensink;
|
|||
extern consvar_t cv_triplesneaker, cv_triplebanana, cv_decabanana;
|
||||
extern consvar_t cv_tripleorbinaut, cv_quadorbinaut, cv_dualjawz;
|
||||
|
||||
extern consvar_t cv_karthud;
|
||||
//extern consvar_t cv_karthud;
|
||||
extern consvar_t cv_kartminimap;
|
||||
extern consvar_t cv_kartcheck;
|
||||
extern consvar_t cv_kartinvinsfx;
|
||||
|
|
|
@ -276,6 +276,7 @@ typedef enum
|
|||
k_waypoint, // Waypoints.
|
||||
k_starpostwp, // Temporarily stores player waypoint for... some reason. Used when respawning and finishing.
|
||||
k_respawn, // Timer for the DEZ laser respawn effect
|
||||
k_dropdash, // Charge up for respawn Drop Dash
|
||||
|
||||
k_throwdir, // Held dir of controls; 1 = forward, 0 = none, -1 = backward (was "player->heldDir")
|
||||
k_lapanimation, // Used to show the lap start wing logo animation
|
||||
|
@ -291,7 +292,8 @@ typedef enum
|
|||
k_driftend, // Drift has ended, used to adjust character angle after drift
|
||||
k_driftcharge, // Charge your drift so you can release a burst of speed
|
||||
k_driftboost, // Boost you get from drifting
|
||||
k_boostcharge, // Charge-up for boosting at the start of the race, or when dropping from respawn
|
||||
k_boostcharge, // Charge-up for boosting at the start of the race
|
||||
k_startboost, // Boost you get from start of race or respawn drop dash
|
||||
k_jmp, // In Mario Kart, letting go of the jump button stops the drift
|
||||
k_offroad, // In Super Mario Kart, going offroad has lee-way of about 1 second before you start losing speed
|
||||
k_pogospring, // Pogo spring bounce effect
|
||||
|
|
|
@ -7672,6 +7672,7 @@ static const char *const KARTSTUFF_LIST[] = {
|
|||
"WAYPOINT",
|
||||
"STARPOSTWP",
|
||||
"RESPAWN",
|
||||
"DROPDASH",
|
||||
|
||||
"THROWDIR",
|
||||
"LAPANIMATION",
|
||||
|
@ -7688,6 +7689,7 @@ static const char *const KARTSTUFF_LIST[] = {
|
|||
"DRIFTCHARGE",
|
||||
"DRIFTBOOST",
|
||||
"BOOSTCHARGE",
|
||||
"STARTBOOST",
|
||||
"JMP",
|
||||
"OFFROAD",
|
||||
"POGOSPRING",
|
||||
|
|
45
src/g_game.c
45
src/g_game.c
|
@ -2347,6 +2347,10 @@ void G_PlayerReborn(INT32 player)
|
|||
|
||||
// SRB2kart
|
||||
INT32 starpostwp;
|
||||
INT32 itemtype;
|
||||
INT32 itemamount;
|
||||
INT32 itemroulette;
|
||||
INT32 roulettetype;
|
||||
INT32 bumper;
|
||||
INT32 comebackpoints;
|
||||
INT32 wanted;
|
||||
|
@ -2404,10 +2408,39 @@ void G_PlayerReborn(INT32 player)
|
|||
pity = players[player].pity;
|
||||
|
||||
// SRB2kart
|
||||
starpostwp = players[player].kartstuff[k_starpostwp];
|
||||
bumper = players[player].kartstuff[k_bumper];
|
||||
comebackpoints = players[player].kartstuff[k_comebackpoints];
|
||||
wanted = players[player].kartstuff[k_wanted];
|
||||
if (leveltime <= starttime)
|
||||
{
|
||||
itemroulette = 0;
|
||||
roulettetype = 0;
|
||||
itemtype = 0;
|
||||
itemamount = 0;
|
||||
bumper = (G_BattleGametype() ? cv_kartbumpers.value : 0);
|
||||
comebackpoints = 0;
|
||||
wanted = 0;
|
||||
starpostwp = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
starpostwp = players[player].kartstuff[k_starpostwp];
|
||||
|
||||
itemroulette = (players[player].kartstuff[k_itemroulette] > 0 ? 1 : 0);
|
||||
roulettetype = players[player].kartstuff[k_roulettetype];
|
||||
|
||||
if (players[player].kartstuff[k_itemheld])
|
||||
{
|
||||
itemtype = 0;
|
||||
itemamount = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
itemtype = players[player].kartstuff[k_itemtype];
|
||||
itemamount = players[player].kartstuff[k_itemamount];
|
||||
}
|
||||
|
||||
bumper = players[player].kartstuff[k_bumper];
|
||||
comebackpoints = players[player].kartstuff[k_comebackpoints];
|
||||
wanted = players[player].kartstuff[k_wanted];
|
||||
}
|
||||
|
||||
p = &players[player];
|
||||
memset(p, 0, sizeof (*p));
|
||||
|
@ -2464,6 +2497,10 @@ void G_PlayerReborn(INT32 player)
|
|||
|
||||
// SRB2kart
|
||||
p->kartstuff[k_starpostwp] = starpostwp; // TODO: get these out of kartstuff, it causes desync
|
||||
p->kartstuff[k_itemroulette] = itemroulette;
|
||||
p->kartstuff[k_roulettetype] = roulettetype;
|
||||
p->kartstuff[k_itemtype] = itemtype;
|
||||
p->kartstuff[k_itemamount] = itemamount;
|
||||
p->kartstuff[k_bumper] = bumper;
|
||||
p->kartstuff[k_comebackpoints] = comebackpoints;
|
||||
p->kartstuff[k_comebacktimer] = comebacktime;
|
||||
|
|
|
@ -29,7 +29,7 @@ consvar_t cv_mousesens = {"mousesens", "35", CV_SAVE, mousesens_cons_t, NULL, 0,
|
|||
consvar_t cv_mousesens2 = {"mousesens2", "35", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mouseysens = {"mouseysens", "35", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mouseysens2 = {"mouseysens2", "35", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_controlperkey = {"controlperkey", "One", CV_SAVE, onecontrolperkey_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_controlperkey = {"controlperkey", "Several", CV_SAVE, onecontrolperkey_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
INT32 mousex, mousey;
|
||||
INT32 mlooky; // like mousey but with a custom sensitivity for mlook
|
||||
|
@ -1208,6 +1208,7 @@ static const char *gamecontrolname[num_gamecontrols] =
|
|||
"scores",
|
||||
"console",
|
||||
"pause",
|
||||
"systemmenu",
|
||||
"custom1",
|
||||
"custom2",
|
||||
"custom3",
|
||||
|
@ -1283,68 +1284,53 @@ void G_Controldefault(void)
|
|||
gamecontrol[gc_fire ][0] = KEY_SPACE;
|
||||
gamecontrol[gc_lookback ][0] = KEY_LSHIFT;
|
||||
|
||||
gamecontrol[gc_aimforward ][1] = KEY_HAT1+0;
|
||||
gamecontrol[gc_aimbackward][1] = KEY_HAT1+1;
|
||||
gamecontrol[gc_turnleft ][1] = KEY_HAT1+2;
|
||||
gamecontrol[gc_turnright ][1] = KEY_HAT1+3;
|
||||
gamecontrol[gc_accelerate ][1] = KEY_JOY1+0; // A
|
||||
gamecontrol[gc_drift ][1] = KEY_JOY1+1; // X
|
||||
gamecontrol[gc_lookback ][1] = KEY_JOY1+1; // X
|
||||
gamecontrol[gc_brake ][1] = KEY_JOY1+2; // B
|
||||
gamecontrol[gc_fire ][1] = KEY_JOY1+4; // LB
|
||||
gamecontrol[gc_lookback ][1] = KEY_JOY1+5; // RB
|
||||
gamecontrol[gc_fire ][1] = KEY_JOY1+4; // LB
|
||||
gamecontrol[gc_drift ][1] = KEY_JOY1+5; // RB
|
||||
|
||||
// Extra controls
|
||||
gamecontrol[gc_pause ][0] = KEY_PAUSE;
|
||||
gamecontrol[gc_console ][0] = KEY_CONSOLE;
|
||||
gamecontrol[gc_talkkey ][0] = 't';
|
||||
gamecontrol[gc_teamkey ][0] = 'y';
|
||||
//gamecontrol[gc_teamkey ][0] = 'y';
|
||||
gamecontrol[gc_scores ][0] = KEY_TAB;
|
||||
gamecontrol[gc_spectate ][0] = '\'';
|
||||
|
||||
gamecontrol[gc_scores ][1] = KEY_JOY1+6; // Back
|
||||
gamecontrol[gc_spectate ][1] = KEY_JOY1+7; // Start (This is sort of like MP's pause...?)
|
||||
|
||||
gamecontrol[gc_lookup ][0] = KEY_PGUP;
|
||||
gamecontrol[gc_lookdown ][0] = KEY_PGDN;
|
||||
gamecontrol[gc_centerview ][0] = KEY_END;
|
||||
gamecontrol[gc_camreset ][0] = KEY_HOME;
|
||||
gamecontrol[gc_camtoggle ][0] = KEY_BACKSPACE;
|
||||
|
||||
//gamecontrol[gc_viewpoint ][1] = KEY_JOY1+3; // Y
|
||||
gamecontrol[gc_pause ][1] = KEY_JOY1+6; // Back
|
||||
gamecontrol[gc_systemmenu ][0] = KEY_JOY1+7; // Start
|
||||
gamecontrol[gc_camtoggle ][1] = KEY_HAT1+0; // D-Pad Up
|
||||
//gamecontrol[gc_screenshot ][1] = KEY_HAT1+1; // D-Pad Down
|
||||
gamecontrol[gc_talkkey ][1] = KEY_HAT1+2; // D-Pad Left
|
||||
gamecontrol[gc_scores ][1] = KEY_HAT1+3; // D-Pad Right
|
||||
|
||||
// Player 2 controls
|
||||
gamecontrolbis[gc_aimforward ][0] = KEY_2HAT1+0;
|
||||
gamecontrolbis[gc_aimbackward][0] = KEY_2HAT1+1;
|
||||
gamecontrolbis[gc_turnleft ][0] = KEY_2HAT1+2;
|
||||
gamecontrolbis[gc_turnright ][0] = KEY_2HAT1+3;
|
||||
gamecontrolbis[gc_accelerate ][0] = KEY_2JOY1+0; // A
|
||||
gamecontrolbis[gc_drift ][0] = KEY_2JOY1+1; // X
|
||||
gamecontrolbis[gc_lookback ][0] = KEY_2JOY1+1; // X
|
||||
gamecontrolbis[gc_brake ][0] = KEY_2JOY1+2; // B
|
||||
gamecontrolbis[gc_fire ][0] = KEY_2JOY1+4; // LB
|
||||
gamecontrolbis[gc_lookback ][0] = KEY_2JOY1+5; // RB
|
||||
gamecontrolbis[gc_spectate ][0] = KEY_2JOY1+7; // Start
|
||||
gamecontrolbis[gc_drift ][0] = KEY_2JOY1+5; // RB
|
||||
|
||||
// Player 3 controls
|
||||
gamecontrol3[gc_aimforward ][0] = KEY_3HAT1+0;
|
||||
gamecontrol3[gc_aimbackward][0] = KEY_3HAT1+1;
|
||||
gamecontrol3[gc_turnleft ][0] = KEY_3HAT1+2;
|
||||
gamecontrol3[gc_turnright ][0] = KEY_3HAT1+3;
|
||||
gamecontrol3[gc_accelerate ][0] = KEY_3JOY1+0; // A
|
||||
gamecontrol3[gc_drift ][0] = KEY_3JOY1+1; // X
|
||||
gamecontrol3[gc_lookback ][0] = KEY_3JOY1+1; // X
|
||||
gamecontrol3[gc_brake ][0] = KEY_3JOY1+2; // B
|
||||
gamecontrol3[gc_fire ][0] = KEY_3JOY1+4; // LB
|
||||
gamecontrol3[gc_lookback ][0] = KEY_3JOY1+5; // RB
|
||||
gamecontrol3[gc_spectate ][0] = KEY_3JOY1+7; // Start
|
||||
gamecontrol3[gc_drift ][0] = KEY_3JOY1+5; // RB
|
||||
|
||||
// Player 4 controls
|
||||
gamecontrol4[gc_aimforward ][0] = KEY_4HAT1+0;
|
||||
gamecontrol4[gc_aimbackward][0] = KEY_4HAT1+1;
|
||||
gamecontrol4[gc_turnleft ][0] = KEY_4HAT1+2;
|
||||
gamecontrol4[gc_turnright ][0] = KEY_4HAT1+3;
|
||||
gamecontrol4[gc_accelerate ][0] = KEY_4JOY1+0; // A
|
||||
gamecontrol4[gc_drift ][0] = KEY_4JOY1+1; // X
|
||||
gamecontrol4[gc_lookback ][0] = KEY_4JOY1+1; // X
|
||||
gamecontrol4[gc_brake ][0] = KEY_4JOY1+2; // B
|
||||
gamecontrol4[gc_fire ][0] = KEY_4JOY1+4; // LB
|
||||
gamecontrol4[gc_lookback ][0] = KEY_4JOY1+5; // RB
|
||||
gamecontrol4[gc_spectate ][0] = KEY_4JOY1+7; // Start
|
||||
gamecontrol4[gc_drift ][0] = KEY_4JOY1+5; // RB
|
||||
}
|
||||
//#endif
|
||||
|
||||
|
|
|
@ -114,6 +114,7 @@ typedef enum
|
|||
gc_scores,
|
||||
gc_console,
|
||||
gc_pause,
|
||||
gc_systemmenu,
|
||||
gc_custom1, // Lua scriptable
|
||||
gc_custom2, // Lua scriptable
|
||||
gc_custom3, // Lua scriptable
|
||||
|
|
116
src/k_kart.c
116
src/k_kart.c
|
@ -1236,7 +1236,7 @@ void K_RespawnChecker(player_t *player)
|
|||
if (player->spectator)
|
||||
return;
|
||||
|
||||
if (player->kartstuff[k_respawn] > 3)
|
||||
if (player->kartstuff[k_respawn] > 1)
|
||||
{
|
||||
player->kartstuff[k_respawn]--;
|
||||
player->mo->momz = 0;
|
||||
|
@ -1274,26 +1274,39 @@ void K_RespawnChecker(player_t *player)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (player->kartstuff[k_respawn] > 0 && player->kartstuff[k_respawn] <= 3)
|
||||
else if (player->kartstuff[k_respawn] == 1)
|
||||
{
|
||||
if (!P_IsObjectOnGround(player->mo))
|
||||
{
|
||||
player->powers[pw_flashing] = 2;
|
||||
// If you tried to boost while in the air,
|
||||
// you lose your chance of boosting at all.
|
||||
|
||||
// Sal: That's stupid and prone to accidental usage.
|
||||
// Let's rip off Mania instead, and turn this into a Drop Dash!
|
||||
|
||||
if (cmd->buttons & BT_ACCELERATE)
|
||||
{
|
||||
player->powers[pw_flashing] = 0;
|
||||
player->kartstuff[k_respawn] = 0;
|
||||
}
|
||||
player->kartstuff[k_dropdash]++;
|
||||
else
|
||||
player->kartstuff[k_dropdash] = 0;
|
||||
|
||||
if (player->kartstuff[k_dropdash] == TICRATE/4)
|
||||
S_StartSound(player->mo, sfx_ddash);
|
||||
|
||||
if ((player->kartstuff[k_dropdash] >= TICRATE/4)
|
||||
&& (player->kartstuff[k_dropdash] & 1))
|
||||
player->mo->colorized = true;
|
||||
else
|
||||
player->mo->colorized = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
player->kartstuff[k_respawn]--;
|
||||
// Quick! You only have three tics to boost!
|
||||
if (cmd->buttons & BT_ACCELERATE)
|
||||
K_DoSneaker(player, true);
|
||||
if ((cmd->buttons & BT_ACCELERATE) && (player->kartstuff[k_dropdash] >= TICRATE/4))
|
||||
{
|
||||
S_StartSound(player->mo, sfx_s23c);
|
||||
player->kartstuff[k_startboost] = 50;
|
||||
}
|
||||
player->mo->colorized = false;
|
||||
player->kartstuff[k_dropdash] = 0;
|
||||
player->kartstuff[k_respawn] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1478,23 +1491,6 @@ static void K_GetKartBoostPower(player_t *player)
|
|||
else if (player->kartstuff[k_bananadrag] > TICRATE)
|
||||
boostpower = 4*boostpower/5;
|
||||
|
||||
if (player->kartstuff[k_growshrinktimer] > 0) // Grow
|
||||
{
|
||||
speedboost = max(speedboost, FRACUNIT/5); // + 20%
|
||||
}
|
||||
|
||||
if (player->kartstuff[k_invincibilitytimer]) // Invincibility
|
||||
{
|
||||
speedboost = max(speedboost, 3*(FRACUNIT/8)); // + 37.5%
|
||||
accelboost = max(accelboost, 3*FRACUNIT); // + 600%
|
||||
}
|
||||
|
||||
if (player->kartstuff[k_driftboost]) // Drift Boost
|
||||
{
|
||||
speedboost = max(speedboost, FRACUNIT/4); // + 25%
|
||||
accelboost = max(accelboost, 4*FRACUNIT); // + 400%
|
||||
}
|
||||
|
||||
if (player->kartstuff[k_sneakertimer]) // Sneaker
|
||||
{
|
||||
switch (gamespeed)
|
||||
|
@ -1512,6 +1508,29 @@ static void K_GetKartBoostPower(player_t *player)
|
|||
accelboost = max(accelboost, 8*FRACUNIT); // + 800%
|
||||
}
|
||||
|
||||
if (player->kartstuff[k_invincibilitytimer]) // Invincibility
|
||||
{
|
||||
speedboost = max(speedboost, 3*FRACUNIT/8); // + 37.5%
|
||||
accelboost = max(accelboost, 3*FRACUNIT); // + 300%
|
||||
}
|
||||
|
||||
if (player->kartstuff[k_growshrinktimer] > 0) // Grow
|
||||
{
|
||||
speedboost = max(speedboost, FRACUNIT/5); // + 20%
|
||||
}
|
||||
|
||||
if (player->kartstuff[k_driftboost]) // Drift Boost
|
||||
{
|
||||
speedboost = max(speedboost, FRACUNIT/4); // + 25%
|
||||
accelboost = max(accelboost, 4*FRACUNIT); // + 400%
|
||||
}
|
||||
|
||||
if (player->kartstuff[k_startboost]) // Startup Boost
|
||||
{
|
||||
speedboost = max(speedboost, FRACUNIT/4); // + 25%
|
||||
accelboost = max(accelboost, 6*FRACUNIT); // + 300%
|
||||
}
|
||||
|
||||
// don't average them anymore, this would make a small boost and a high boost less useful
|
||||
// just take the highest we want instead
|
||||
|
||||
|
@ -2713,9 +2732,10 @@ void K_DoSneaker(player_t *player, boolean doPFlag)
|
|||
player->kartstuff[k_sneakertimer] = sneakertime;
|
||||
|
||||
if (doPFlag)
|
||||
{
|
||||
player->pflags |= PF_ATTACKDOWN;
|
||||
|
||||
K_PlayTauntSound(player->mo);
|
||||
K_PlayTauntSound(player->mo);
|
||||
}
|
||||
|
||||
K_GetKartBoostPower(player);
|
||||
if (player->kartstuff[k_speedboost] > prevboost)
|
||||
|
@ -3337,6 +3357,9 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
if (player->kartstuff[k_driftboost])
|
||||
player->kartstuff[k_driftboost]--;
|
||||
|
||||
if (player->kartstuff[k_startboost])
|
||||
player->kartstuff[k_startboost]--;
|
||||
|
||||
if (player->kartstuff[k_invincibilitytimer])
|
||||
player->kartstuff[k_invincibilitytimer]--;
|
||||
|
||||
|
@ -4514,16 +4537,24 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
// Get an instant boost!
|
||||
else if (player->kartstuff[k_boostcharge] <= 50)
|
||||
{
|
||||
player->kartstuff[k_sneakertimer] = -((21*(player->kartstuff[k_boostcharge]*player->kartstuff[k_boostcharge]))/425)+131; // max time is 70, min time is 7; yay parabooolas
|
||||
if (!player->kartstuff[k_floorboost] || player->kartstuff[k_floorboost] == 3)
|
||||
player->kartstuff[k_startboost] = (50-player->kartstuff[k_boostcharge])+20;
|
||||
|
||||
if (player->kartstuff[k_boostcharge] <= 36)
|
||||
{
|
||||
if (player->kartstuff[k_sneakertimer] >= 70)
|
||||
S_StartSound(player->mo, sfx_s25f); // Special sound for the perfect start boost!
|
||||
else if (player->kartstuff[k_sneakertimer] >= sneakertime)
|
||||
S_StartSound(player->mo, sfx_cdfm01); // Sneaker boost sound for big boost
|
||||
else
|
||||
S_StartSound(player->mo, sfx_s23c); // Drift boost sound for small boost
|
||||
player->kartstuff[k_startboost] = 0;
|
||||
K_DoSneaker(player, false);
|
||||
player->kartstuff[k_sneakertimer] = 70; // PERFECT BOOST!!
|
||||
|
||||
if (!player->kartstuff[k_floorboost] || player->kartstuff[k_floorboost] == 3) // Let everyone hear this one
|
||||
S_StartSound(player->mo, sfx_s25f);
|
||||
}
|
||||
else if ((!player->kartstuff[k_floorboost] || player->kartstuff[k_floorboost] == 3) && P_IsLocalPlayer(player))
|
||||
{
|
||||
if (player->kartstuff[k_boostcharge] <= 40)
|
||||
S_StartSound(player->mo, sfx_cdfm01); // You were almost there!
|
||||
else
|
||||
S_StartSound(player->mo, sfx_s23c); // Nope, better luck next time.
|
||||
}
|
||||
}
|
||||
// You overcharged your engine? Those things are expensive!!!
|
||||
else if (player->kartstuff[k_boostcharge] > 50)
|
||||
|
@ -4733,6 +4764,8 @@ void K_CheckSpectateStatus(void)
|
|||
return;
|
||||
if (numingame < 2 || leveltime < starttime || mapreset) // Allow if the match hasn't started yet
|
||||
continue;
|
||||
if (leveltime > 20*TICRATE) // DON'T allow if the match is 20 seconds in
|
||||
return;
|
||||
if (G_RaceGametype() && players[i].laps) // DON'T allow if the race is at 2 laps
|
||||
return;
|
||||
continue;
|
||||
|
@ -5388,6 +5421,9 @@ static void K_drawKartItem(void)
|
|||
case KITEM_SAD: localpatch = kp_sadface[offset]; break;
|
||||
default: return;
|
||||
}
|
||||
|
||||
if (stplyr->kartstuff[k_itemheld] && !(leveltime & 1))
|
||||
localpatch = kp_nodraw;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
10
src/m_menu.c
10
src/m_menu.c
|
@ -1096,12 +1096,13 @@ static menuitem_t OP_MoveControlsMenu[] =
|
|||
{IT_CONTROL, NULL, "Talk key", M_ChangeControl, gc_talkkey },
|
||||
//{IT_CONTROL, NULL, "Team-Talk key", M_ChangeControl, gc_teamkey },
|
||||
{IT_CONTROL, NULL, "Rankings/Scores", M_ChangeControl, gc_scores },
|
||||
{IT_CONTROL, NULL, "Open/Close Menu (ESC)", M_ChangeControl, gc_systemmenu},
|
||||
{IT_CONTROL, NULL, "Pause", M_ChangeControl, gc_pause },
|
||||
{IT_CONTROL, NULL, "Console", M_ChangeControl, gc_console },
|
||||
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Gamepad Options...", &OP_Joystick1Def, 112},
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Spectator Controls...", &OP_SpectateControlsDef, 120},
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Custom Lua Actions...", &OP_CustomControlsDef, 128},
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Gamepad Options...", &OP_Joystick1Def, 120},
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Spectator Controls...", &OP_SpectateControlsDef, 128},
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Custom Lua Actions...", &OP_CustomControlsDef, 136},
|
||||
};
|
||||
|
||||
static menuitem_t OP_SpectateControlsMenu[] =
|
||||
|
@ -2476,11 +2477,14 @@ boolean M_Responder(event_t *ev)
|
|||
|
||||
if (ch == -1)
|
||||
return false;
|
||||
else if (ch == gamecontrol[gc_systemmenu][0]) // allow remappable ESC key
|
||||
ch = KEY_ESCAPE;
|
||||
|
||||
// F-Keys
|
||||
if (!menuactive)
|
||||
{
|
||||
noFurtherInput = true;
|
||||
|
||||
switch (ch)
|
||||
{
|
||||
case KEY_F1: // Help key
|
||||
|
|
10
src/p_mobj.c
10
src/p_mobj.c
|
@ -7022,7 +7022,15 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
break;
|
||||
}
|
||||
|
||||
mobj->tracer->flags2 &= ~MF2_DONTDRAW;
|
||||
if (mobj->target->player->kartstuff[k_itemheld])
|
||||
{
|
||||
if (leveltime & 1)
|
||||
mobj->tracer->flags2 &= ~MF2_DONTDRAW;
|
||||
else
|
||||
mobj->tracer->flags2 |= MF2_DONTDRAW;
|
||||
}
|
||||
else
|
||||
mobj->tracer->flags2 &= ~MF2_DONTDRAW;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -8394,8 +8394,8 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
// SRB2Kart: set camera panning
|
||||
if (player->kartstuff[k_drift] != 0)
|
||||
{
|
||||
fixed_t panmax = (camdist/5);
|
||||
pan = min(player->kartstuff[k_driftcharge]/2, K_GetKartDriftSparkValue(player)) * panmax / K_GetKartDriftSparkValue(player);
|
||||
fixed_t panmax = (dist/5);
|
||||
pan = FixedDiv(FixedMul(min((fixed_t)player->kartstuff[k_driftcharge], K_GetKartDriftSparkValue(player)), panmax), K_GetKartDriftSparkValue(player));
|
||||
if (pan > panmax)
|
||||
pan = panmax;
|
||||
if (player->kartstuff[k_drift] < 0)
|
||||
|
@ -9285,7 +9285,7 @@ void P_PlayerThink(player_t *player)
|
|||
#if 1
|
||||
// "Blur" a bit when you have speed shoes and are going fast enough
|
||||
if ((player->powers[pw_super] || player->powers[pw_sneakers]
|
||||
|| player->kartstuff[k_driftboost] || player->kartstuff[k_sneakertimer]) && !player->kartstuff[k_invincibilitytimer] // SRB2kart
|
||||
|| player->kartstuff[k_driftboost] || player->kartstuff[k_sneakertimer] || player->kartstuff[k_startboost]) && !player->kartstuff[k_invincibilitytimer] // SRB2kart
|
||||
&& (player->speed + abs(player->mo->momz)) > FixedMul(20*FRACUNIT,player->mo->scale))
|
||||
{
|
||||
mobj_t *gmobj = P_SpawnGhostMobj(player->mo);
|
||||
|
@ -9434,6 +9434,7 @@ void P_PlayerThink(player_t *player)
|
|||
if (!(player->pflags & PF_NIGHTSMODE
|
||||
|| player->kartstuff[k_hyudorotimer] // SRB2kart - fixes Hyudoro not flashing when it should.
|
||||
|| player->kartstuff[k_growshrinktimer] > 0 // Grow doesn't flash either.
|
||||
|| player->kartstuff[k_respawn] // Respawn timer (for drop dash effect)
|
||||
|| (G_BattleGametype() && player->kartstuff[k_bumper] <= 0 && player->kartstuff[k_comebacktimer])
|
||||
|| leveltime < starttime)) // Level intro
|
||||
{
|
||||
|
|
|
@ -811,6 +811,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
{"noooo1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"noooo2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"hogbom", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"ddash", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"dbgsal", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
|
||||
// SRB2kart - Skin sounds
|
||||
|
|
|
@ -883,6 +883,7 @@ typedef enum
|
|||
sfx_noooo1,
|
||||
sfx_noooo2,
|
||||
sfx_hogbom,
|
||||
sfx_ddash,
|
||||
sfx_dbgsal,
|
||||
|
||||
sfx_kwin,
|
||||
|
|
18
src/w_wad.c
18
src/w_wad.c
|
@ -769,6 +769,24 @@ static size_t W_RawReadLumpHeader(UINT16 wad, UINT16 lump, void *dest, size_t si
|
|||
fseek(handle, (long)(l->position + offset), SEEK_SET);
|
||||
bytesread = fread(dest, 1, size, handle);
|
||||
|
||||
#if 1 // we're fucking sick of this
|
||||
if (bytesread < 67) // http://garethrees.org/2007/11/14/pngcrush/
|
||||
return bytesread;
|
||||
|
||||
#define sigcheck ((UINT8 *)dest)
|
||||
if (sigcheck[0] == 0x89
|
||||
&& sigcheck[1] == 0x50
|
||||
&& sigcheck[2] == 0x4e
|
||||
&& sigcheck[3] == 0x47
|
||||
&& sigcheck[4] == 0x0d
|
||||
&& sigcheck[5] == 0x0a
|
||||
&& sigcheck[6] == 0x1a
|
||||
&& sigcheck[7] == 0x0a)
|
||||
I_Error("W_Wad: Tried to cache a .PNG - have you tried converting to Doom or Flat (raw) image formats?");
|
||||
#undef sigcheck
|
||||
|
||||
#endif
|
||||
|
||||
return bytesread;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue