Merge branch 'master' into sonicitems

This commit is contained in:
TehRealSalt 2018-06-07 19:39:45 -04:00
commit 9b3751b30c
46 changed files with 2030 additions and 1227 deletions

View file

@ -67,7 +67,7 @@ CV_PossibleValue_t karthud_cons_t[] = {
{0, "Off"}, {1, "Default"}, {2, "SNES"}, {3, "MK64"},
{0, NULL}};
CV_PossibleValue_t kartspeed_cons_t[] = {
{0, "Relaxed"}, {1, "Standard"}, {2, "Turbo"},
{0, "Easy"}, {1, "Normal"}, {2, "Hard"},
{0, NULL}};
#define COM_BUF_SIZE 8192 // command buffer size

View file

@ -1319,7 +1319,7 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime)
else
netbuffer->u.serverinfo.iszone = 0;
netbuffer->u.serverinfo.actnum = mapheaderinfo[gamemap-1]->actnum;
netbuffer->u.serverinfo.actnum = 0; //mapheaderinfo[gamemap-1]->actnum
p = PutFileNeeded();
@ -1636,15 +1636,16 @@ static void CL_LoadReceivedSavegame(void)
if (P_LoadNetGame())
{
const INT32 actnum = mapheaderinfo[gamemap-1]->actnum;
CONS_Printf(M_GetText("Map is now \"%s"), G_BuildMapName(gamemap));
if (strcmp(mapheaderinfo[gamemap-1]->lvlttl, ""))
if (strlen(mapheaderinfo[gamemap-1]->lvlttl) > 0)
{
CONS_Printf(": %s", mapheaderinfo[gamemap-1]->lvlttl);
if (!(mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE))
if (strlen(mapheaderinfo[gamemap-1]->zonttl) > 0)
CONS_Printf(" %s", mapheaderinfo[gamemap-1]->zonttl);
else if (!(mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE))
CONS_Printf(M_GetText(" ZONE"));
if (actnum > 0)
CONS_Printf(" %2d", actnum);
if (strlen(mapheaderinfo[gamemap-1]->actnum) > 0)
CONS_Printf(" %s", mapheaderinfo[gamemap-1]->actnum);
}
CONS_Printf("\"\n");
}

View file

@ -702,7 +702,7 @@ void D_SRB2Loop(void)
else if (rendertimeout < entertic) // in case the server hang or netsplit
{
// Lagless camera! Yay!
/*
/* Not yay, it ruins Kart's drift :y
if (gamestate == GS_LEVEL && netgame)
{
if (camera.chase)
@ -812,11 +812,6 @@ void D_StartTitle(void)
CON_ToggleOff();
// Reset the palette
#ifdef HWRENDER
if (rendermode == render_opengl)
HWR_SetPaletteColor(0);
else
#endif
if (rendermode != render_none)
V_SetPaletteLump("PLAYPAL");
}
@ -1325,7 +1320,7 @@ void D_SRB2Main(void)
CONS_Printf("R_Init(): Init SRB2 refresh daemon.\n");
R_Init();
// setting up sound
// setting up sound
if (dedicated)
{
nosound = true;

View file

@ -220,7 +220,7 @@ static CV_PossibleValue_t competitionboxes_cons_t[] = {{0, "Normal"}, {1, "Rando
static CV_PossibleValue_t matchboxes_cons_t[] = {{0, "Normal"}, {1, "Random"}, {2, "Non-Random"},
{3, "None"}, {0, NULL}};
//static CV_PossibleValue_t chances_cons_t[] = {{0, "MIN"}, {9, "MAX"}, {0, NULL}};
static CV_PossibleValue_t chances_cons_t[] = {{0, "MIN"}, {9, "MAX"}, {0, NULL}};
static CV_PossibleValue_t match_scoring_cons_t[] = {{0, "Normal"}, {1, "Classic"}, {0, NULL}};
static CV_PossibleValue_t pause_cons_t[] = {{0, "Server"}, {1, "All"}, {0, NULL}};
@ -315,7 +315,7 @@ consvar_t cv_matchboxes = {"matchboxes", "Normal", CV_NETVAR|CV_CHEAT, matchboxe
consvar_t cv_specialrings = {"specialrings", "On", CV_NETVAR, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_powerstones = {"powerstones", "On", CV_NETVAR, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
/*consvar_t cv_recycler = {"tv_recycler", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_recycler = {"tv_recycler", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_teleporters = {"tv_teleporter", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_superring = {"tv_superring", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_supersneakers = {"tv_supersneaker", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
@ -326,10 +326,9 @@ consvar_t cv_ringshield = {"tv_ringshield", "5", CV_NETVAR|CV_CHEAT, chanc
consvar_t cv_forceshield = {"tv_forceshield", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_bombshield = {"tv_bombshield", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_1up = {"tv_1up", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_eggmanbox = {"tv_eggman", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};*/
consvar_t cv_eggmanbox = {"tv_eggman", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
// SRB2kart
consvar_t cv_sneaker = {"sneaker", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_rocketsneaker = {"rocketsneaker", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_invincibility = {"invincibility", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
@ -357,7 +356,7 @@ consvar_t cv_kartminimap = {"kartminimap", "4", CV_SAVE, kartminimap_cons_t, NUL
consvar_t cv_kartcheck = {"kartcheck", "Yes", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t kartstarsfx_cons_t[] = {{0, "Music"}, {1, "SMK"}, {0, NULL}};
consvar_t cv_kartstarsfx = {"kartstarsfx", "SMK", CV_SAVE, kartstarsfx_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_kartspeed = {"kartspeed", "Standard", CV_NETVAR|CV_CALL|CV_NOINIT, kartspeed_cons_t, KartSpeed_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_kartspeed = {"kartspeed", "Normal", CV_NETVAR|CV_CALL|CV_NOINIT, kartspeed_cons_t, KartSpeed_OnChange, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t kartballoons_cons_t[] = {{1, "MIN"}, {12, "MAX"}, {0, NULL}};
consvar_t cv_kartballoons = {"kartballoons", "3", CV_NETVAR|CV_CHEAT, kartballoons_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_kartfrantic = {"kartfrantic", "Off", CV_NETVAR|CV_CHEAT|CV_CALL|CV_NOINIT, CV_OnOff, KartFrantic_OnChange, 0, NULL, NULL, 0, 0, NULL};
@ -374,13 +373,6 @@ consvar_t cv_kartdebugamount = {"kartdebugamount", "1", CV_NETVAR|CV_CHEAT, kart
static CV_PossibleValue_t votetime_cons_t[] = {{10, "MIN"}, {3600, "MAX"}, {0, NULL}};
consvar_t cv_votetime = {"votetime", "20", CV_NETVAR, votetime_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t cv_collideminimum_cons_t[] = {{1, "MIN"}, {16384, "MAX"}, {0, NULL}};
consvar_t cv_collideminimum = {"collide_minspeed", "25", CV_NETVAR, cv_collideminimum_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t cv_collidesoundnum_cons_t[] = {{1, "MIN"}, {1208, "MAX"}, {0, NULL}};
consvar_t cv_collidesoundnum = {"collide_soundnum", "231", CV_NETVAR, cv_collidesoundnum_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_collidesounds = {"collide_sounds", "Yes", CV_NETVAR, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
//
consvar_t cv_ringslinger = {"ringslinger", "No", CV_NETVAR|CV_NOSHOWHELP|CV_CALL|CV_CHEAT, CV_YesNo,
Ringslinger_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_gravity = {"gravity", "0.8", CV_RESTRICT|CV_FLOAT|CV_CALL, NULL, Gravity_OnChange, 0, NULL, NULL, 0, 0, NULL};
@ -615,7 +607,7 @@ void D_RegisterServerCommands(void)
CV_RegisterVar(&cv_competitionboxes);
CV_RegisterVar(&cv_matchboxes);
/*CV_RegisterVar(&cv_recycler);
CV_RegisterVar(&cv_recycler);
CV_RegisterVar(&cv_teleporters);
CV_RegisterVar(&cv_superring);
CV_RegisterVar(&cv_supersneakers);
@ -626,7 +618,7 @@ void D_RegisterServerCommands(void)
CV_RegisterVar(&cv_forceshield);
CV_RegisterVar(&cv_bombshield);
CV_RegisterVar(&cv_1up);
CV_RegisterVar(&cv_eggmanbox);*/
CV_RegisterVar(&cv_eggmanbox);
K_RegisterKartStuff(); // SRB2kart
@ -1982,13 +1974,18 @@ void D_SetupVote(void)
SendNetXCmd(XD_SETUPVOTE, buf, p - buf);
}
void D_ModifyClientVote(SINT8 voted)
void D_ModifyClientVote(SINT8 voted, UINT8 splitplayer)
{
char buf[1];
char *p = buf;
WRITESINT8(p, voted);
SendNetXCmd(XD_MODIFYVOTE, &buf, 1);
if (splitplayer > 0) // Don't actually send anything for splitscreen
votes[splitplayer] = voted;
else
{
WRITESINT8(p, voted);
SendNetXCmd(XD_MODIFYVOTE, &buf, 1);
}
}
void D_PickVote(void)
@ -3242,6 +3239,8 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
P_CheckSurvivors();
else if (G_BattleGametype())
K_CheckBalloons(); // SRB2Kart
else if (G_RaceGametype())
P_CheckRacers(); // also SRB2Kart
}
//
@ -4528,10 +4527,20 @@ static void Command_Showmap_f(void)
{
if (gamestate == GS_LEVEL)
{
if (mapheaderinfo[gamemap-1]->actnum)
CONS_Printf("%s (%d): %s %d\n", G_BuildMapName(gamemap), gamemap, mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->actnum);
if (strlen(mapheaderinfo[gamemap-1]->zonttl) > 0)
{
if (strlen(mapheaderinfo[gamemap-1]->actnum) > 0)
CONS_Printf("%s (%d): %s %s %s\n", G_BuildMapName(gamemap), gamemap, mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->zonttl, mapheaderinfo[gamemap-1]->actnum);
else
CONS_Printf("%s (%d): %s %s\n", G_BuildMapName(gamemap), gamemap, mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->zonttl);
}
else
CONS_Printf("%s (%d): %s\n", G_BuildMapName(gamemap), gamemap, mapheaderinfo[gamemap-1]->lvlttl);
{
if (strlen(mapheaderinfo[gamemap-1]->actnum) > 0)
CONS_Printf("%s (%d): %s %s\n", G_BuildMapName(gamemap), gamemap, mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->actnum);
else
CONS_Printf("%s (%d): %s\n", G_BuildMapName(gamemap), gamemap, mapheaderinfo[gamemap-1]->lvlttl);
}
}
else
CONS_Printf(M_GetText("You must be in a level to use this.\n"));

View file

@ -103,10 +103,10 @@ extern consvar_t cv_pause;
extern consvar_t cv_restrictskinchange, cv_allowteamchange, cv_respawntime;
/*extern consvar_t cv_teleporters, cv_superring, cv_supersneakers, cv_invincibility;
extern consvar_t cv_teleporters, cv_superring, cv_supersneakers, cv_invincibility;
extern consvar_t cv_jumpshield, cv_watershield, cv_ringshield, cv_forceshield, cv_bombshield;
extern consvar_t cv_1up, cv_eggmanbox;
extern consvar_t cv_recycler;*/
extern consvar_t cv_recycler;
// SRB2kart items
extern consvar_t cv_sneaker, cv_rocketsneaker, cv_invincibility, cv_banana;
@ -129,12 +129,7 @@ extern consvar_t cv_speedometer;
extern consvar_t cv_votetime;
extern consvar_t cv_collideminimum;
extern consvar_t cv_collidesoundnum;
extern consvar_t cv_collidesounds;
extern consvar_t cv_kartdebugitem, cv_kartdebugamount;
//
extern consvar_t cv_itemfinder;
@ -255,7 +250,7 @@ void Command_Retry_f(void);
void D_GameTypeChanged(INT32 lastgametype); // not a real _OnChange function anymore
void D_MapChange(INT32 pmapnum, INT32 pgametype, boolean pultmode, boolean presetplayers, INT32 pdelay, boolean pskipprecutscene, boolean pfromlevelselect);
void D_SetupVote(void);
void D_ModifyClientVote(SINT8 voted);
void D_ModifyClientVote(SINT8 voted, UINT8 splitplayer);
void D_PickVote(void);
void ObjectPlace_OnChange(void);
boolean IsPlayerAdmin(INT32 playernum);

View file

@ -293,8 +293,15 @@ typedef enum
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
k_brakestop, // Wait until you've made a complete stop for a few tics before letting brake go in reverse.
k_itemroulette, // Used for the roulette when deciding what item to give you (was "pw_kartitem")
k_roulettetype, // Used for the roulette, for deciding type (currently only used for Battle, to give you better items from Karma items)
// Item held stuff
k_itemtype, // KITEM_ constant for item number
k_itemamount, // Amount of said item
k_itemheld, // Are you holding an item? 1 = normal hold, 2 = rotation hold
// Some items use timers for their duration or effects
k_attractiontimer, // Duration of Lightning Shield's item-break and item box pull
@ -306,19 +313,14 @@ typedef enum
k_squishedtimer, // Squished frame timer
k_rocketsneakertimer, // Rocket Sneaker duration timer
k_invincibilitytimer, // Invincibility timer
k_eggmanheld, // Eggman monitor held, separate from itemtype so it doesn't stop you from getting items
k_deathsentence, // 30 seconds to live... (SPB murder timer (not actually 30 sec, I just couldn't help the FF reference :p))
k_eggmanheld, // Eggman monitor held, separate from k_itemheld so it doesn't stop you from getting items
k_spinouttimer, // Spin-out from a banana peel or oil slick (was "pw_bananacam")
k_justbumped, // Prevent players from endlessly bumping into each other
k_poweritemtimer, // Battle mode, how long before you're allowed another power item (Invincibility, Grow)
k_comebacktimer, // Battle mode, how long before you become a bomb after death
k_sadtimer, // How long you've been sad
// Each item needs its own power slot, for the HUD and held use
// *** ADDING A NEW ITEM? ADD IT TO K_DoHyudoroSteal PLEASE!! -Salt ***
k_itemtype, // KITEM_ constant for item number
k_itemamount, // Amount of said item
k_itemheld, // Are you holding an item? 1 = normal hold, 2 = rotation hold
// Battle Mode vars
k_balloon, // Number of balloons left
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

View file

@ -25,18 +25,13 @@
typedef enum
{
BT_ACCELERATE = 1, // Accelerate
BT_DRIFT = 1<<2, // Drift (direction is cmd->angleturn)
BT_DRIFT = 1<<2, // Drift (direction is cmd->driftturn)
BT_BRAKE = 1<<3, // Brake
BT_ATTACK = 1<<4, // Use Item
BT_FORWARD = 1<<5, // Aim Item Forward
BT_BACKWARD = 1<<6, // Aim Item Backward
//BT_SPECTATE = 1<<7, // Toggle Spectate
// Want more button space? Help get rid of this hack :V
BT_DRIFTLEFT = 1<<7, // Drift left hack
BT_DRIFTRIGHT = 1<<8, // Drift right hack
// free: 1<<9 to 1<<12
// free: 1<<7 to 1<<12
// Lua garbage
BT_CUSTOM1 = 1<<13,
@ -64,6 +59,7 @@ typedef struct
INT16 angleturn; // <<16 for angle delta - saved as 1 byte into demos
INT16 aiming; // vertical aiming, see G_BuildTicCmd
UINT16 buttons;
INT16 driftturn; // SRB2Kart: Used for getting drift turn speed
} ATTRPACK ticcmd_t;
#if defined(_MSC_VER)

View file

@ -1136,10 +1136,12 @@ static void readlevelheader(MYFILE *f, INT32 num)
}
else if (fastcmp(word, "ACT"))
{
if (i >= 0 && i < 20) // 0 for no act number, TTL1 through TTL19
/*if (i >= 0 && i < 20) // 0 for no act number, TTL1 through TTL19
mapheaderinfo[num-1]->actnum = (UINT8)i;
else
deh_warning("Level header %d: invalid act number %d", num, i);
deh_warning("Level header %d: invalid act number %d", num, i);*/
deh_strlcpy(mapheaderinfo[num-1]->actnum, word2,
sizeof(mapheaderinfo[num-1]->actnum), va("Level header %d: actnum", num));
}
else if (fastcmp(word, "NEXTLEVEL"))
{
@ -6241,7 +6243,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_DRIFTSMOKE4",
"S_DRIFTSMOKE5",
// Magnet Burst
// Lightning Shield Burst
// Sneaker Fire Trail
"S_KARTFIRE1",
@ -7294,9 +7296,13 @@ static const char *const MOBJEFLAG_LIST[] = {
"JUSTSTEPPEDDOWN", // used for ramp sectors
"VERTICALFLIP", // Vertically flip sprite/allow upside-down physics
"GOOWATER", // Goo water
"\x01", // free: 1<<7 (name un-matchable)
"JUSTBOUNCEDWALL", // SRB2Kart: Mobj already bounced off a wall this tic
"SPRUNG", // Mobj was already sprung this tic
"APPLYPMOMZ", // Platform movement
"DRAWONLYFORP1", // SRB2Kart: Splitscreen sprite draw flags
"DRAWONLYFORP2",
"DRAWONLYFORP3",
"DRAWONLYFORP4",
NULL
};
@ -7553,8 +7559,14 @@ static const char *const KARTSTUFF_LIST[] = {
"JMP",
"OFFROAD",
"POGOSPRING",
"BRAKESTOP",
"ITEMROULETTE",
"ROULETTETYPE",
"ITEMTYPE",
"ITEMAMOUNT",
"ITEMHELD",
"ATTRACTIONTIMER",
"HYUDOROTIMER",
@ -7565,19 +7577,17 @@ static const char *const KARTSTUFF_LIST[] = {
"SQUISHEDTIMER",
"ROCKETSNEAKERTIMER",
"INVINCIBILITYTIMER",
"DEATHSENTENCE",
"EGGMANHELD",
"SPINOUTTIMER",
"JUSTBUMPED",
"POWERITEMTIMER",
"COMEBACKTIMER",
"SADTIMER",
"ITEMTYPE",
"ITEMAMOUNT",
"ITEMHELD",
"BALLOON",
"COMEBACKPOINTS",
"COMEBACKMODE"
"COMEBACKMODE",
};
static const char *const HUDITEMS_LIST[] = {
@ -7999,9 +8009,6 @@ struct {
{"BT_ATTACK",BT_ATTACK},
{"BT_FORWARD",BT_FORWARD},
{"BT_BACKWARD",BT_BACKWARD},
//{"BT_SPECTATE",BT_SPECTATE},
{"BT_DRIFTLEFT",BT_DRIFTLEFT},
{"BT_DRIFTRIGHT",BT_DRIFTRIGHT},
{"BT_CUSTOM1",BT_CUSTOM1}, // Lua customizable
{"BT_CUSTOM2",BT_CUSTOM2}, // Lua customizable
{"BT_CUSTOM3",BT_CUSTOM3}, // Lua customizable

View file

@ -220,7 +220,7 @@ typedef struct
char lvlttl[22]; ///< Level name without "Zone". (21 character limit instead of 32, 21 characters can display on screen max anyway)
char subttl[33]; ///< Subtitle for level
char zonttl[22]; ///< "ZONE" replacement name
UINT8 actnum; ///< Act number or 0 for none.
char actnum[3]; ///< SRB2Kart: Now a 2 character long string.
UINT16 typeoflevel; ///< Combination of typeoflevel flags.
INT16 nextlevel; ///< Map number of next level, or 1100-1102 to end.
char musname[7]; ///< Music track to play. "" for no music.
@ -445,6 +445,10 @@ extern boolean franticitems;
extern boolean mirrormode;
extern boolean comeback;
extern tic_t instaitemcooldown;
extern tic_t spbincoming;
extern UINT8 spbplayer;
extern boolean legitimateexit;
extern boolean comebackshowninfo;
extern tic_t curlap, bestlap;

View file

@ -242,7 +242,7 @@ INT32 cheats; //for multiplayer cheat commands
// SRB2Kart
// Cvars that we don't want changed mid-game
UINT8 gamespeed; // Game's current speed (or difficulty, or cc, or etc); 0-2 for relaxed, standard, & turbo
UINT8 gamespeed; // Game's current speed (or difficulty, or cc, or etc); 0 for easy, 1 for normal, 2 for hard
boolean mirrormode; // Mirror Mode currently enabled?
boolean franticitems; // Frantic items currently enabled?
boolean comeback; // Battle Mode's karma comeback is on/off
@ -252,6 +252,11 @@ INT16 votelevels[4]; // Levels that were rolled by the host
SINT8 votes[MAXPLAYERS]; // Each player's vote
SINT8 pickedvote; // What vote the host rolls
// Server-sided variables
tic_t instaitemcooldown; // Cooldown before any more lightning/blue shell is awarded
tic_t spbincoming; // Timer before blue shell hits, can switch targets at this point
UINT8 spbplayer; // Player num that used the last blue shell
// Client-sided variables (NEVER use in anything that needs to be synced with other players)
boolean legitimateexit; // Did this client actually finish the match?
boolean comebackshowninfo; // Have you already seen the "ATTACK OR PROTECT" message?
@ -1150,16 +1155,15 @@ angle_t localangle, localangle2, localangle3, localangle4;
boolean camspin, camspin2, camspin3, camspin4;
static fixed_t forwardmove[2] = {25<<FRACBITS>>16, 50<<FRACBITS>>16};
static fixed_t sidemove[2] = {25<<FRACBITS>>16, 50<<FRACBITS>>16}; // faster!
static fixed_t sidemove[2] = {2<<FRACBITS>>16, 4<<FRACBITS>>16};
static fixed_t angleturn[3] = {400, 800, 200}; // + slow turn
void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
{
boolean forcestrafe = false;
INT32 laim, th, tspeed, forward, side, axis; //i
const INT32 speed = 1;
// these ones used for multiple conditions
boolean turnleft, turnright, invertmouse, mouseaiming, lookaxis, analog, analogjoystickmove, gamepadjoystickmove, kbl, rd;
boolean turnleft, turnright, invertmouse, mouseaiming, lookaxis, analogjoystickmove, gamepadjoystickmove, kbl, rd;
player_t *player;
camera_t *thiscam;
angle_t lang;
@ -1231,7 +1235,6 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
lookaxis = cv_lookaxis2.value;
analogjoystickmove = cv_usejoystick2.value && !Joystick2.bGamepadStyle;
gamepadjoystickmove = cv_usejoystick2.value && Joystick2.bGamepadStyle;
analog = cv_analog2.value;
break;
case 3:
mouseaiming = false;
@ -1239,7 +1242,6 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
lookaxis = cv_lookaxis3.value;
analogjoystickmove = cv_usejoystick3.value && !Joystick3.bGamepadStyle;
gamepadjoystickmove = cv_usejoystick3.value && Joystick3.bGamepadStyle;
analog = cv_analog3.value;
break;
case 4:
mouseaiming = false;
@ -1247,7 +1249,6 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
lookaxis = cv_lookaxis4.value;
analogjoystickmove = cv_usejoystick4.value && !Joystick4.bGamepadStyle;
gamepadjoystickmove = cv_usejoystick4.value && Joystick4.bGamepadStyle;
analog = cv_analog4.value;
break;
case 1:
default:
@ -1256,7 +1257,6 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
lookaxis = cv_lookaxis.value;
analogjoystickmove = cv_usejoystick.value && !Joystick.bGamepadStyle;
gamepadjoystickmove = cv_usejoystick.value && Joystick.bGamepadStyle;
analog = cv_analog.value;
break;
}
@ -1292,49 +1292,66 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
else
tspeed = speed;
cmd->driftturn = 0;
// let movement keys cancel each other out
if (analog) // Analog
if (turnright && !(turnleft))
{
if (turnright)
cmd->angleturn = (INT16)(cmd->angleturn - angleturn[tspeed]);
if (turnleft)
cmd->angleturn = (INT16)(cmd->angleturn + angleturn[tspeed]);
cmd->angleturn = (INT16)(cmd->angleturn - angleturn[tspeed]);
cmd->driftturn = (INT16)(cmd->driftturn - angleturn[tspeed]);
}
else if (turnleft && !(turnright))
{
cmd->angleturn = (INT16)(cmd->angleturn + angleturn[tspeed]);
cmd->driftturn = (INT16)(cmd->driftturn + angleturn[tspeed]);
}
if (analog || twodlevel
|| (player->mo && (player->mo->flags2 & MF2_TWOD))
|| (!demoplayback && (player->climbing
|| (player->pflags & PF_NIGHTSMODE)
|| (player->pflags & PF_SLIDING)
|| (player->pflags & PF_FORCESTRAFE)))) // Analog
forcestrafe = true;
if (analogjoystickmove && axis != 0)
{
// JOYAXISRANGE should be 1023 (divide by 1024)
cmd->angleturn = (INT16)(cmd->angleturn - ((axis * angleturn[1]) >> 10)); // ANALOG!
cmd->driftturn = (INT16)(cmd->driftturn - ((axis * angleturn[1]) >> 10));
}
if (forcestrafe) // Analog
// Specator mouse turning
if (player->spectator)
{
cmd->angleturn = (INT16)(cmd->angleturn - (mousex*(mirrormode ? -1 : 1)*8));
cmd->driftturn = (INT16)(cmd->driftturn - (mousex*(mirrormode ? -1 : 1)*8));
}
// Bounce pad strafing
if (!demoplayback && ((player->pflags & PF_FORCESTRAFE) || (player->kartstuff[k_pogospring])))
{
if (turnright)
side += sidemove[speed];
side += sidemove[1];
if (turnleft)
side -= sidemove[speed];
side -= sidemove[1];
if (analogjoystickmove && axis != 0)
{
// JOYAXISRANGE is supposed to be 1023 (divide by 1024)
side += ((axis * sidemove[1]) >> 10);
side += ((axis * sidemove[0]) >> 10);
}
}
else
{
if (turnright && !(turnleft))
cmd->angleturn = (INT16)(cmd->angleturn - angleturn[tspeed]);
else if (turnleft && !(turnright))
cmd->angleturn = (INT16)(cmd->angleturn + angleturn[tspeed]);
if (analogjoystickmove && axis != 0)
{
// JOYAXISRANGE should be 1023 (divide by 1024)
cmd->angleturn = (INT16)(cmd->angleturn - ((axis * angleturn[1]) >> 10)); // ANALOG!
}
}
//{ SRB2kart - Drift support
// limit turning to angleturn[1] to stop mouselook letting you look too fast
if (cmd->angleturn > angleturn[1])
cmd->angleturn = angleturn[1];
else if (cmd->angleturn < -angleturn[1])
cmd->angleturn = -angleturn[1];
if (cmd->driftturn > angleturn[1])
cmd->driftturn = angleturn[1];
else if (cmd->driftturn < -angleturn[1])
cmd->driftturn = -angleturn[1];
if (player->mo)
cmd->angleturn = K_GetKartTurnValue(player, cmd->angleturn);
// SRB2kart - no additional angle if not moving
if ((player->mo && player->speed > 0) || (leveltime > 140 && cmd->buttons & BT_ACCELERATE && cmd->buttons & BT_BRAKE) || (player->spectator || objectplacing))
lang += (cmd->angleturn<<16);
if (player->spectator || objectplacing) // SRB2Kart: spectators need special controls
{
@ -1392,7 +1409,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
if (InputDown(gc_fire, ssplayer) || (cv_usejoystick.value && axis > 0))
cmd->buttons |= BT_ATTACK;
// drift button
// drift with any button/key
axis = JoyAxis(AXISDRIFT, ssplayer);
if (InputDown(gc_drift, ssplayer) || (cv_usejoystick.value && axis > 0))
cmd->buttons |= BT_DRIFT;
@ -1405,6 +1422,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
if (InputDown(gc_custom3, ssplayer))
cmd->buttons |= BT_CUSTOM3;
// Reset camera
if (InputDown(gc_camreset, ssplayer))
{
if (thiscam->chase && !rd)
@ -1414,7 +1432,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
else
rd = false;
// player aiming shit, ahhhh...
// spectator aiming shit, ahhhh...
{
INT32 player_invert = invertmouse ? -1 : 1;
INT32 screen_invert =
@ -1463,15 +1481,13 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
cmd->aiming = G_ClipAimingPitch(&laim);
}
if (player->spectator)
cmd->angleturn = (INT16)(cmd->angleturn - (mousex*(mirrormode ? -1 : 1)*8));
mousex = mousey = mlooky = 0;
if (forward > MAXPLMOVE)
forward = MAXPLMOVE;
else if (forward < -MAXPLMOVE)
forward = -MAXPLMOVE;
if (side > MAXPLMOVE)
side = MAXPLMOVE;
else if (side < -MAXPLMOVE)
@ -1479,86 +1495,20 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
// No additional acceleration when moving forward/backward and strafing simultaneously.
// do this AFTER we cap to MAXPLMOVE so people can't find ways to cheese around this.
if (!forcestrafe && forward && side)
// SRB2Kart: We don't need this; we WANT bounce strafing to plain stack on top of normal movement.
/*if (!bouncestrafe && forward && side)
{
forward = FixedMul(forward, 3*FRACUNIT/4);
side = FixedMul(side, 3*FRACUNIT/4);
}
}*/
//Silly hack to make 2d mode *somewhat* playable with no chasecam.
if ((twodlevel || (player->mo && player->mo->flags2 & MF2_TWOD)) && !thiscam->chase)
{
INT32 temp = forward;
forward = side;
side = temp;
}
if (cmd->buttons & BT_BRAKE && !forward) // Sal: If you're not accelerating, but going forward, then you should just lose your momentum. Request from Sev
{
cmd->forwardmove = (SINT8)(cmd->forwardmove / 2);
cmd->sidemove = (SINT8)(cmd->sidemove / 2);
}
else
if (forward || side)
{
cmd->forwardmove = (SINT8)(cmd->forwardmove + forward);
if (mirrormode)
cmd->sidemove = (SINT8)(cmd->sidemove - side);
else
cmd->sidemove = (SINT8)(cmd->sidemove + side);
cmd->sidemove = (SINT8)(cmd->sidemove + side);
}
if (ssplayer == 2 && player->bot == 1) {
if (!player->powers[pw_tailsfly] && (cmd->forwardmove || cmd->sidemove || cmd->buttons))
{
player->bot = 2; // A player-controlled bot. Returns to AI when it respawns.
//CV_SetValue(&cv_analog2, true);
}
else
{
G_CopyTiccmd(cmd, I_BaseTiccmd2(), 1); // empty, or external driver
B_BuildTiccmd(player, cmd);
}
}
//{ SRB2kart - Drift support
axis = JoyAxis(AXISTURN, ssplayer);
if (mirrormode)
axis = -axis;
// TODO: Remove this hack please :(
if (cmd->angleturn > 0) // Drifting to the left
cmd->buttons |= BT_DRIFTLEFT;
else
cmd->buttons &= ~BT_DRIFTLEFT;
if (cmd->angleturn < 0) // Drifting to the right
cmd->buttons |= BT_DRIFTRIGHT;
else
cmd->buttons &= ~BT_DRIFTRIGHT;
//}
if (analog) {
cmd->angleturn = (INT16)(thiscam->angle >> 16);
if (player->awayviewtics)
cmd->angleturn = (INT16)(player->awayviewmobj->angle >> 16);
}
else
{
// limit turning to angleturn[1] to stop mouselook letting you look too fast
if (cmd->angleturn > angleturn[1])
cmd->angleturn = angleturn[1];
else if (cmd->angleturn < -angleturn[1])
cmd->angleturn = -angleturn[1];
if (player->mo)
cmd->angleturn = K_GetKartTurnValue(player, cmd->angleturn);
// SRB2kart - no additional angle if not moving
if ((player->mo && player->speed > 0) || (leveltime > 140 && cmd->buttons & BT_ACCELERATE && cmd->buttons & BT_BRAKE) || (player->spectator || objectplacing))
lang += (cmd->angleturn<<16);
cmd->angleturn = (INT16)(lang >> 16);
}
cmd->angleturn = (INT16)(lang >> 16);
if (!hu_stopped)
{
@ -2481,15 +2431,10 @@ void G_PlayerReborn(INT32 player)
mapmusname[6] = 0;
mapmusflags = mapheaderinfo[gamemap-1]->mustrack & MUSIC_TRACKMASK;
}
//SRB2kart - leveltime stuff
if (leveltime > 157)
{
S_ChangeMusic(mapmusname, mapmusflags, true);
if (p->laps == (unsigned)(cv_numlaps.value - 1))
S_SpeedMusic(1.2f);
}
}
P_RestoreMusic(p);
if (leveltime > 157 && !p->spectator)
p->kartstuff[k_lakitu] = 48; // Lakitu Spawner
@ -2867,11 +2812,11 @@ void G_DoReborn(INT32 playernum)
player_t *player = &players[playernum];
boolean starpost = false;
if (modeattacking)
/*if (modeattacking) // Not needed for SRB2Kart.
{
M_EndModeAttackRun();
return;
}
}*/
// Make sure objectplace is OFF when you first start the level!
OP_ResetObjectplace();
@ -3209,9 +3154,12 @@ INT16 G_RandMap(INT16 tolflags, INT16 pprevmap, boolean dontadd, boolean ignoreb
else
{
ix = okmaps[M_RandomKey(numokmaps)];
for (bufx = NUMMAPS; bufx > 0; bufx--)
randmapbuffer[bufx] = randmapbuffer[bufx-1];
randmapbuffer[0] = ix;
if (!dontadd)
{
for (bufx = NUMMAPS; bufx > 0; bufx--)
randmapbuffer[bufx] = randmapbuffer[bufx-1];
randmapbuffer[0] = ix;
}
}
Z_Free(okmaps);
@ -3663,6 +3611,7 @@ void G_LoadGameData(void)
// Saves the main data file, which stores information such as emblems found, etc.
void G_SaveGameData(boolean force)
{
const boolean wasmodified = modifiedgame;
size_t length;
INT32 i, j;
UINT8 btemp;
@ -3679,8 +3628,9 @@ void G_SaveGameData(boolean force)
return;
}
if (modifiedgame && !savemoddata
&& !force) // SRB2Kart: for enabling unlocks online in modified servers
if (force) // SRB2Kart: for enabling unlocks online, even if the game is modified
modifiedgame = savemoddata; // L-let's just sort of... hack around the cheat protection, because I'm too worried about just removing it @@;
else if (modifiedgame && !savemoddata)
{
free(savebuffer);
save_p = savebuffer = NULL;
@ -3779,6 +3729,9 @@ void G_SaveGameData(boolean force)
FIL_WriteFile(va(pandf, srb2home, gamedatafilename), savebuffer, length);
free(savebuffer);
save_p = savebuffer = NULL;
if (force) // Eeeek, I'm sorry for my sins!
modifiedgame = wasmodified;
}
#define VERSIONSIZE 16
@ -4146,10 +4099,10 @@ char *G_BuildMapTitle(INT32 mapnum)
{
size_t len = 1;
const char *zonetext = NULL;
const INT32 actnum = mapheaderinfo[mapnum-1]->actnum;
const char *actnum = NULL;
len += strlen(mapheaderinfo[mapnum-1]->lvlttl);
if (strcmp(mapheaderinfo[mapnum-1]->zonttl, ""))
if (strlen(mapheaderinfo[mapnum-1]->zonttl) > 0)
{
zonetext = M_GetText(mapheaderinfo[mapnum-1]->zonttl);
len += strlen(zonetext) + 1; // ' ' + zonetext
@ -4159,14 +4112,17 @@ char *G_BuildMapTitle(INT32 mapnum)
zonetext = M_GetText("ZONE");
len += strlen(zonetext) + 1; // ' ' + zonetext
}
if (actnum > 0)
len += 1 + 11; // ' ' + INT32
if (strlen(mapheaderinfo[mapnum-1]->actnum) > 0)
{
actnum = M_GetText(mapheaderinfo[mapnum-1]->actnum);
len += strlen(actnum) + 1; // ' ' + actnum
}
title = Z_Malloc(len, PU_STATIC, NULL);
sprintf(title, "%s", mapheaderinfo[mapnum-1]->lvlttl);
if (zonetext) sprintf(title + strlen(title), " %s", zonetext);
if (actnum > 0) sprintf(title + strlen(title), " %d", actnum);
if (actnum) sprintf(title + strlen(title), " %s", actnum);
}
return title;
@ -4191,6 +4147,7 @@ char *G_BuildMapTitle(INT32 mapnum)
#define ZT_ANGLE 0x04
#define ZT_BUTTONS 0x08
#define ZT_AIMING 0x10
#define ZT_DRIFT 0x20
#define DEMOMARKER 0x80 // demoend
static ticcmd_t oldcmd;
@ -4248,6 +4205,7 @@ ticcmd_t *G_MoveTiccmd(ticcmd_t* dest, const ticcmd_t* src, const size_t n)
dest[i].angleturn = SHORT(src[i].angleturn);
dest[i].aiming = (INT16)SHORT(src[i].aiming);
dest[i].buttons = (UINT16)SHORT(src[i].buttons);
dest[i].driftturn = (INT16)SHORT(src[i].driftturn);
}
return dest;
}
@ -4271,6 +4229,8 @@ void G_ReadDemoTiccmd(ticcmd_t *cmd, INT32 playernum)
oldcmd.buttons = (oldcmd.buttons & (BT_FORWARD|BT_BACKWARD)) | (READUINT16(demo_p) & ~(BT_FORWARD|BT_BACKWARD));
if (ziptic & ZT_AIMING)
oldcmd.aiming = READINT16(demo_p);
if (ziptic & ZT_DRIFT)
oldcmd.driftturn = READINT16(demo_p);
G_CopyTiccmd(cmd, &oldcmd, 1);
@ -4327,6 +4287,13 @@ void G_WriteDemoTiccmd(ticcmd_t *cmd, INT32 playernum)
ziptic |= ZT_AIMING;
}
if (cmd->driftturn != oldcmd.driftturn)
{
WRITEINT16(demo_p,cmd->driftturn);
oldcmd.driftturn = cmd->driftturn;
ziptic |= ZT_DRIFT;
}
*ziptic_p = ziptic;
// attention here for the ticcmd size!
@ -4699,6 +4666,8 @@ void G_GhostTicker(void)
g->p += 2;
if (ziptic & ZT_AIMING)
g->p += 2;
if (ziptic & ZT_DRIFT)
g->p += 2;
// Grab ghost data.
ziptic = READUINT8(g->p);

View file

@ -1197,6 +1197,7 @@ static const char *gamecontrolname[num_gamecontrols] =
"brake",
"fire",
"lookback",
"camreset",
"camtoggle",
"spectate",
"lookup",

View file

@ -2905,8 +2905,8 @@ static boolean HWR_CheckBBox(fixed_t *bspcoord)
py2 = bspcoord[checkcoord[boxpos][3]];
// check clip list for an open space
angle1 = R_PointToAngle(px1, py1) - dup_viewangle;
angle2 = R_PointToAngle(px2, py2) - dup_viewangle;
angle1 = R_PointToAngle2(dup_viewx>>1, dup_viewy>>1, px1>>1, py1>>1) - dup_viewangle;
angle2 = R_PointToAngle2(dup_viewx>>1, dup_viewy>>1, px2>>1, py2>>1) - dup_viewangle;
span = angle1 - angle2;
@ -4236,6 +4236,9 @@ static void HWR_SplitSprite(gr_vissprite_t *spr)
i = 0;
temp = FLOAT_TO_FIXED(realtop);
if (spr->mobj->frame & FF_FULLBRIGHT)
lightlevel = 255;
#ifdef ESLOPE
for (i = 1; i < sector->numlights; i++)
{
@ -4243,14 +4246,16 @@ static void HWR_SplitSprite(gr_vissprite_t *spr)
: sector->lightlist[i].height;
if (h <= temp)
{
lightlevel = *list[i-1].lightlevel;
if (!(spr->mobj->frame & FF_FULLBRIGHT))
lightlevel = *list[i-1].lightlevel;
colormap = list[i-1].extra_colormap;
break;
}
}
#else
i = R_GetPlaneLight(sector, temp, false);
lightlevel = *list[i].lightlevel;
if (!(spr->mobj->frame & FF_FULLBRIGHT))
lightlevel = *list[i].lightlevel;
colormap = list[i].extra_colormap;
#endif
@ -4265,7 +4270,8 @@ static void HWR_SplitSprite(gr_vissprite_t *spr)
// even if we aren't changing colormap or lightlevel, we still need to continue drawing down the sprite
if (!(list[i].flags & FF_NOSHADE) && (list[i].flags & FF_CUTSPRITES))
{
lightlevel = *list[i].lightlevel;
if (!(spr->mobj->frame & FF_FULLBRIGHT))
lightlevel = *list[i].lightlevel;
colormap = list[i].extra_colormap;
}
@ -5386,7 +5392,7 @@ static void HWR_ProjectSprite(mobj_t *thing)
if (thing->skin && thing->sprite == SPR_PLAY) // This thing is a player!
{
if (thing->colorized)
vis->colormap = R_GetTranslationColormap(TC_RAINBOW, thing->color, GTC_CACHE);
vis->colormap = R_GetTranslationColormap(TC_STARMAN, thing->color, GTC_CACHE);
else
{
size_t skinnum = (skin_t*)thing->skin-skins;
@ -5396,7 +5402,7 @@ static void HWR_ProjectSprite(mobj_t *thing)
else
{
if (vis->mobj && vis->mobj->colorized)
vis->colormap = R_GetTranslationColormap(TC_RAINBOW, vis->mobj->color ? vis->mobj->color : SKINCOLOR_CYAN, GTC_CACHE);
vis->colormap = R_GetTranslationColormap(TC_STARMAN, vis->mobj->color ? vis->mobj->color : SKINCOLOR_CYAN, GTC_CACHE);
else
vis->colormap = R_GetTranslationColormap(TC_DEFAULT, vis->mobj->color ? vis->mobj->color : SKINCOLOR_CYAN, GTC_CACHE);
}

View file

@ -1208,7 +1208,7 @@ static void HWR_CreateBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch,
}
// starman support, could theoretically support boss ones too
if (skinnum == TC_RAINBOW)
if (skinnum == TC_STARMAN)
{
while (size--)
{
@ -1490,7 +1490,7 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
if (spr->mobj->skin && spr->mobj->sprite == SPR_PLAY)
{
if (spr->mobj->colorized)
skinnum = TC_RAINBOW;
skinnum = TC_STARMAN;
else
{
skinnum = (INT32)((skin_t*)spr->mobj->skin-skins);

View file

@ -55,11 +55,11 @@ char sprnames[NUMSPRITES + 1][5] =
"GWLR","SRBA","SRBB","SRBC","SRBD","SRBE","SRBF","SRBG","SRBH","SRBI",
"SRBJ","SRBK","SRBL","SRBM","SRBN","SRBO",
//SRB2kart Sprites
"SPRG","BSPR","RNDM","KFRE","KINV","KINF","DRIF","DSMO","FITM","BANA",
"GSHE","JAWZ","SSMN","KRBM","BLIG","LIGH","SINK","SITR","KBLN","LAKI",
"POKE","AUDI","DECO","DOOD","SNES","GBAS","SPRS","BUZB","CHOM","SACO",
"CRAB","SHAD","BUMP","FLEN","CLAS","PSHW","ARRO","ITEM","ITMI","ITMN",
"PBOM"
"SPRG","BSPR","RNDM","RPOP","KFRE","KINV","KINF","DRIF","DSMO","FITM",
"BANA","GSHE","JAWZ","SSMN","KRBM","BLIG","LIGH","SINK","SITR","KBLN",
"LAKI","POKE","AUDI","DECO","DOOD","SNES","GBAS","SPRS","BUZB","CHOM",
"SACO","CRAB","SHAD","BUMP","FLEN","CLAS","PSHW","ARRO","ITEM","ITMI",
"ITMN","PBOM"
};
// Doesn't work with g++, needs actionf_p1 (don't modify this comment)
@ -2566,10 +2566,10 @@ state_t states[NUMSTATES] =
{SPR_RNDM, 23, 3, {NULL}, 0, 0, S_RANDOMITEM1}, // S_RANDOMITEM24
{SPR_RNDM, 0, 1, {A_ItemPop}, 0, 0, S_NULL}, // S_DEADRANDOMITEM
{SPR_RNDM, FF_FULLBRIGHT|24, 5, {NULL}, 0, 0, S_RANDOMITEMPOP2}, // S_RANDOMITEMPOP1
{SPR_RNDM, FF_FULLBRIGHT|25, 5, {NULL}, 0, 0, S_RANDOMITEMPOP3}, // S_RANDOMITEMPOP2
{SPR_RNDM, FF_FULLBRIGHT|26, 5, {NULL}, 0, 0, S_RANDOMITEMPOP4}, // S_RANDOMITEMPOP3
{SPR_RNDM, FF_FULLBRIGHT|27, 5, {NULL}, 0, 0, S_NULL}, // S_RANDOMITEMPOP4
{SPR_RPOP, FF_FULLBRIGHT, 5, {NULL}, 0, 0, S_RANDOMITEMPOP2}, // S_RANDOMITEMPOP1
{SPR_RPOP, FF_FULLBRIGHT|1, 5, {NULL}, 0, 0, S_RANDOMITEMPOP3}, // S_RANDOMITEMPOP2
{SPR_RPOP, FF_FULLBRIGHT|2, 5, {NULL}, 0, 0, S_RANDOMITEMPOP4}, // S_RANDOMITEMPOP3
{SPR_RPOP, FF_FULLBRIGHT|3, 5, {NULL}, 0, 0, S_NULL}, // S_RANDOMITEMPOP4
{SPR_DRIF, 0, 2, {NULL}, 0, 0, S_DRIFTSPARK2}, // S_DRIFTSPARK1
{SPR_DRIF, 1, 2, {NULL}, 0, 0, S_DRIFTSPARK3}, // S_DRIFTSPARK2
@ -2722,7 +2722,7 @@ state_t states[NUMSTATES] =
{SPR_BLIG, 1, 2, {NULL}, 0, 0, S_BLUELIGHTNING3}, // S_BLUELIGHTNING2
{SPR_BLIG, 2, 2, {NULL}, 0, 0, S_BLUELIGHTNING4}, // S_BLUELIGHTNING3
{SPR_BLIG, 3, 2, {NULL}, 0, 0, S_NULL}, // S_BLUELIGHTNING4
{SPR_SSMN, 3, 1, {A_MineExplode}, MT_BLUEEXPLOSION, 0, S_NULL}, // S_BLUEEXPLODE
{SPR_BOMB, 0, 1, {A_MineExplode}, MT_BLUEEXPLOSION, 0, S_NULL}, // S_BLUEEXPLODE
{SPR_LIGH, 0, 2, {NULL}, 0, 0, S_LIGHTNING2}, // S_LIGHTNING1
{SPR_LIGH, 1, 2, {NULL}, 0, 0, S_LIGHTNING3}, // S_LIGHTNING2
@ -14242,30 +14242,30 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_RANDOMITEM
2000, // doomednum
S_RANDOMITEM1, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
sfx_None, // seesound
0, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
sfx_None, // painsound
S_NULL, // meleestate
S_NULL, // missilestate
2000, // doomednum
S_RANDOMITEM1, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
sfx_None, // seesound
0, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
sfx_None, // painsound
S_NULL, // meleestate
S_NULL, // missilestate
S_DEADRANDOMITEM, // deathstate
S_NULL, // xdeathstate
sfx_pop, // deathsound
60*FRACUNIT, // speed
36*FRACUNIT, // radius
36*FRACUNIT, // height
0, // display offset
100, // mass
S_NULL, // xdeathstate
sfx_kc2e, // deathsound
60*FRACUNIT, // speed
36*FRACUNIT, // radius
36*FRACUNIT, // height
0, // display offset
100, // mass
MT_RANDOMITEMPOP, // damage
sfx_None, // activesound
sfx_None, // activesound
MF_SLIDEME|MF_SPECIAL|MF_NOGRAVITY|MF_NOCLIPHEIGHT, // flags
S_NULL // raisestate
S_NULL // raisestate
},
{ // MT_RANDOMITEMPOP
@ -14545,7 +14545,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // seestate
sfx_tossed, // seesound
8, // reactiontime
sfx_tink, // attacksound
sfx_mario1, // attacksound
S_NULL, // painstate
0, // painchance
sfx_None, // painsound
@ -14682,7 +14682,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
105, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
320*FRACUNIT, // painchance
288*FRACUNIT, // painchance
sfx_None, // painsound
S_NULL, // meleestate
S_NULL, // missilestate
@ -15020,7 +15020,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
100, // mass
1, // damage
sfx_None, // activesound
MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags
MF_NOBLOCKMAP|MF_NOCLIPHEIGHT|MF_NOCLIPTHING|MF_NOGRAVITY|MF_SCENERY, // flags
S_NULL // raisestate
},

View file

@ -163,8 +163,8 @@ void A_RandomStateRange();
void A_DualAction();
void A_RemoteAction();
void A_ToggleFlameJet();
void A_ItemPop(); // SRB2kart
void A_JawzChase(); // SRB2kart
void A_ItemPop(); // SRB2kart
void A_JawzChase(); // SRB2kart
void A_MineExplode(); // SRB2kart
void A_OrbitNights();
void A_GhostMe();
@ -579,6 +579,7 @@ typedef enum sprite
SPR_BSPR, // Blue Diagonal Spring
SPR_RNDM, // Random Item Box
SPR_RPOP, // Random Item Box Pop
SPR_KFRE, // Sneaker fire trail
SPR_KINV, // Invincibility sparkle trail
SPR_KINF, // Invincibility flash

File diff suppressed because it is too large Load diff

View file

@ -1185,7 +1185,7 @@ static int mapheaderinfo_get(lua_State *L)
else if (fastcmp(field,"zonttl"))
lua_pushstring(L, header->zonttl);
else if (fastcmp(field,"actnum"))
lua_pushinteger(L, header->actnum);
lua_pushstring(L, header->actnum);
else if (fastcmp(field,"typeoflevel"))
lua_pushinteger(L, header->typeoflevel);
else if (fastcmp(field,"nextlevel"))

View file

@ -733,6 +733,8 @@ static int ticcmd_get(lua_State *L)
lua_pushinteger(L, cmd->aiming);
else if (fastcmp(field,"buttons"))
lua_pushinteger(L, cmd->buttons);
else if (fastcmp(field,"driftturn"))
lua_pushinteger(L, cmd->driftturn);
else
return NOFIELD;
@ -759,6 +761,8 @@ static int ticcmd_set(lua_State *L)
cmd->aiming = (INT16)luaL_checkinteger(L, 3);
else if (fastcmp(field,"buttons"))
cmd->buttons = (UINT16)luaL_checkinteger(L, 3);
else if (fastcmp(field,"driftturn"))
cmd->driftturn = (INT16)luaL_checkinteger(L, 3);
else
return NOFIELD;

View file

@ -32,95 +32,80 @@ conditionset_t conditionSets[MAXCONDITIONSETS];
// Default Emblem locations
emblem_t emblemlocations[MAXEMBLEMS] =
{
// -- MAP01: GREEN HILLS --
// Time: 1:30.00
{ET_TIME, 0,0,0, 1, 'T', SKINCOLOR_GREY, 90*TICRATE, "", 0},
// -- MAP02: NORTHERN DISTRICT --
// Time: x:xx.xx
{ET_TIME, 0,0,0, 2, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
// -- MAP03: SUNBEAM PARADISE --
// Time: x:xx.xx
{ET_TIME, 0,0,0, 3, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
// -- MAP04: PIPE SPEEDWAY --
// Time: x:xx.xx
{ET_TIME, 0,0,0, 4, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
// -- MAP05: DARKVILE GARDEN --
// Time: x:xx.xx
{ET_TIME, 0,0,0, 5, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
// -- MAP06: MEGABLOCK CASTLE --
// Time: x:xx.xx
{ET_TIME, 0,0,0, 6, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
// -- MAP07: MIDNIGHT MEADOW --
// Time: x:xx.xx
{ET_TIME, 0,0,0, 7, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
// -- MAP11: HILL TOP --
// Time: x:xx.xx
{ET_TIME, 0,0,0, 11, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
// -- MAP13: SAPPHIRE COAST --
// Time: x:xx.xx
{ET_TIME, 0,0,0, 13, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
// -- MAP15: BLUE MOUNTAIN --
// Time: x:xx.xx
{ET_TIME, 0,0,0, 15, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
// -- MAP19: CASINO RESORT --
// Time: x:xx.xx
{ET_TIME, 0,0,0, 19, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
// -- MAP21: SILVERCLOUD ISLAND --
// Time: x:xx.xx
{ET_TIME, 0,0,0, 21, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
// -- MAP25: CANYON RUSH --
// Time: x:xx.xx
{ET_TIME, 0,0,0, 25, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
// -- MAP26: CLOUD CRADLE K --
// Time: x:xx.xx
{ET_TIME, 0,0,0, 26, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
// -- MAP27: TOXIC PALACE --
// Time: x:xx.xx
{ET_TIME, 0,0,0, 27, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
// -- MAP30: ANCIENT TOMB --
// Time: x:xx.xx
{ET_TIME, 0,0,0, 30, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
// -- MAP31: SUB-ZERO PEAK --
// Time: x:xx.xx
{ET_TIME, 0,0,0, 31, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
// -- MAP32: VIRTUAL HIGHWAY --
// Time: x:xx.xx
{ET_TIME, 0,0,0, 32, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
// -- MAP33: EGGMAN'S NIGHTCLUB --
// Time: x:xx.xx
{ET_TIME, 0,0,0, 37, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
// -- MAP61: GBA RAINBOW ROAD --
// Time: x:xx.xx
{ET_TIME, 0,0,0, 61, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
// -- MAP70: SONIC SPEEDWAY --
// Time: x:xx.xx
{ET_TIME, 0,0,0, 70, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
// -- MAP72: AURORA ATOLL --
// Time: x:xx.xx
{ET_TIME, 0,0,0, 72, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
// -- MAP79: BARREN BADLANDS --
// Time: 2:30.00
{ET_TIME, 0,0,0, 79, 'T', SKINCOLOR_GREY, 150*TICRATE, "", 0},
// SILVER TIME TROPHIES
{ET_TIME, 0,0,0, 1, 'T', SKINCOLOR_GREY, 90*TICRATE, "", 0}, // Green Hills Zone - Time: 1:30
{ET_TIME, 0,0,0, 2, 'T', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Pipe Speedway Zone - Time: 1:50
{ET_TIME, 0,0,0, 3, 'T', SKINCOLOR_GREY, 135*TICRATE, "", 0}, // Dark Race - 2:15
{ET_TIME, 0,0,0, 4, 'T', SKINCOLOR_GREY, 105*TICRATE, "", 0}, // Darkvile Garden Zone - 1:45
{ET_TIME, 0,0,0, 5, 'T', SKINCOLOR_GREY, 140*TICRATE, "", 0}, // Northern District Zone - 2:20
{ET_TIME, 0,0,0, 6, 'T', SKINCOLOR_GREY, 120*TICRATE, "", 0}, // Sonic Speedway Zone - 2:00
{ET_TIME, 0,0,0, 7, 'T', SKINCOLOR_GREY, 120*TICRATE, "", 0}, // Egg Zeppelin Zone - 2:00
{ET_TIME, 0,0,0, 8, 'T', SKINCOLOR_GREY, 95*TICRATE, "", 0}, // Hill Top Zone - 1:35
{ET_TIME, 0,0,0, 9, 'T', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Sunbeam Paradise Zone - 1:50
{ET_TIME, 0,0,0, 10, 'T', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Diamond Square Zone - 1:50
{ET_TIME, 0,0,0, 11, 'T', SKINCOLOR_GREY, 150*TICRATE, "", 0}, // Misty Maze Zone - 2:30
{ET_TIME, 0,0,0, 12, 'T', SKINCOLOR_GREY, 120*TICRATE, "", 0}, // Midnight Meadow Zone - 2:00
{ET_TIME, 0,0,0, 13, 'T', SKINCOLOR_GREY, 130*TICRATE, "", 0}, // Megablock Castle Zone - 2:10
{ET_TIME, 0,0,0, 14, 'T', SKINCOLOR_GREY, 150*TICRATE, "", 0}, // Sub-Zero Peak Zone - 2:30
{ET_TIME, 0,0,0, 15, 'T', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Sapphire Coast Zone - 1:50
{ET_TIME, 0,0,0, 16, 'T', SKINCOLOR_GREY, 140*TICRATE, "", 0}, // Silvercloud Island Zone - 2:20
{ET_TIME, 0,0,0, 17, 'T', SKINCOLOR_GREY, 135*TICRATE, "", 0}, // Petroleum Refinery Zone - 2:15
{ET_TIME, 0,0,0, 18, 'T', SKINCOLOR_GREY, 130*TICRATE, "", 0}, // Canyon Rush Zone - 2:10
{ET_TIME, 0,0,0, 19, 'T', SKINCOLOR_GREY, 160*TICRATE, "", 0}, // Blue Mountain Zone - 2:40
{ET_TIME, 0,0,0, 20, 'T', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Casino Resort Zone - 1:50
{ET_TIME, 0,0,0, 21, 'T', SKINCOLOR_GREY, 105*TICRATE, "", 0}, // Desert Palace Zone - 1:45
{ET_TIME, 0,0,0, 22, 'T', SKINCOLOR_GREY, 165*TICRATE, "", 0}, // Red Barrage Area - 2:45
{ET_TIME, 0,0,0, 23, 'T', SKINCOLOR_GREY, 105*TICRATE, "", 0}, // Vanilla Hotel Zone - 1:45
{ET_TIME, 0,0,0, 24, 'T', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Twinkle Cart - 1:50
{ET_TIME, 0,0,0, 25, 'T', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Pleasure Castle - 1:50
{ET_TIME, 0,0,0, 26, 'T', SKINCOLOR_GREY, 140*TICRATE, "", 0}, // Aurora Atoll Zone - 2:20
{ET_TIME, 0,0,0, 27, 'T', SKINCOLOR_GREY, 130*TICRATE, "", 0}, // Barren Badlands Zone - 2:10
{ET_TIME, 0,0,0, 28, 'T', SKINCOLOR_GREY, 155*TICRATE, "", 0}, // Toxic Palace Zone - 2:35
{ET_TIME, 0,0,0, 29, 'T', SKINCOLOR_GREY, 130*TICRATE, "", 0}, // Ancient Tomb Zone - 2:10
{ET_TIME, 0,0,0, 30, 'T', SKINCOLOR_GREY, 120*TICRATE, "", 0}, // Cloud Cradle Zone K - 2:00
{ET_TIME, 0,0,0, 31, 'T', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Kodachrome Void Zone - 1:50
{ET_TIME, 0,0,0, 32, 'T', SKINCOLOR_GREY, 140*TICRATE, "", 0}, // Egg Quarters - 2:20
{ET_TIME, 0,0,0, 33, 'T', SKINCOLOR_GREY, 115*TICRATE, "", 0}, // Boiling Bedrock Zone - 1:55
{ET_TIME, 0,0,0, 34, 'T', SKINCOLOR_GREY, 140*TICRATE, "", 0}, // Virtual Highway Zone - 2:20
{ET_TIME, 0,0,0, 35, 'T', SKINCOLOR_GREY, 120*TICRATE, "", 0}, // Eggman's Nightclub Zone - 2:00
{ET_TIME, 0,0,0, 36, 'T', SKINCOLOR_GREY, 90*TICRATE, "", 0}, // KKR Ganbare Dochu 2 - 1:30
{ET_TIME, 0,0,0, 37, 'T', SKINCOLOR_GREY, 80*TICRATE, "", 0}, // CK Chao Circuit 1 - 1:20
{ET_TIME, 0,0,0, 38, 'T', SKINCOLOR_GREY, 130*TICRATE, "", 0}, // CK Chao Circuit 2 - 2:10
{ET_TIME, 0,0,0, 39, 'T', SKINCOLOR_GREY, 100*TICRATE, "", 0}, // CK Cloud Tops 2 - 1:40
{ET_TIME, 0,0,0, 40, 'T', SKINCOLOR_GREY, 130*TICRATE, "", 0}, // CK Regal Raceway - 2:10
{ET_TIME, 0,0,0, 41, 'T', SKINCOLOR_GREY, 130*TICRATE, "", 0}, // SM Dimension Heist - 2:10
{ET_TIME, 0,0,0, 42, 'T', SKINCOLOR_GREY, 100*TICRATE, "", 0}, // SRB2 Frozen Night - 1:40
{ET_TIME, 0,0,0, 43, 'T', SKINCOLOR_GREY, 100*TICRATE, "", 0}, // MKSC Sky Garden - 1:40
{ET_TIME, 0,0,0, 44, 'T', SKINCOLOR_GREY, 95*TICRATE, "", 0}, // MKDS Peach Gardens - 1:35
{ET_TIME, 0,0,0, 45, 'T', SKINCOLOR_GREY, 105*TICRATE, "", 0}, // MKSC Rainbow Road - 1:45
{ET_TIME, 0,0,0, 46, 'T', SKINCOLOR_GREY, 70*TICRATE, "", 0}, // SMK Mario Circuit 1 - 1:10
{ET_TIME, 0,0,0, 47, 'T', SKINCOLOR_GREY, 90*TICRATE, "", 0}, // SMK Donut Plains 1 - 1:30
{ET_TIME, 0,0,0, 48, 'T', SKINCOLOR_GREY, 75*TICRATE, "", 0}, // SMK Ghost Valley 2 - 1:15
{ET_TIME, 0,0,0, 49, 'T', SKINCOLOR_GREY, 105*TICRATE, "", 0}, // SMK Mario Circuit 3 - 1:45
{ET_TIME, 0,0,0, 50, 'T', SKINCOLOR_GREY, 130*TICRATE, "", 0} // SMK Rainbow Road - 2:10
// GOLD DEV TIME TROPHIES
// ...none yet!
};
// Default Extra Emblems
extraemblem_t extraemblems[MAXEXTRAEMBLEMS] =
{
{"Experienced Driver", "Play 50 Matches", 10, 'X', SKINCOLOR_BLUE, 0},
{"Experienced Driver", "Play 100 Matches", 10, 'X', SKINCOLOR_BLUE, 0},
};
// Default Unlockables
unlockable_t unlockables[MAXUNLOCKABLES] =
{
// Name, Objective, Menu Height, ConditionSet, Unlock Type, Variable, NoCecho, NoChecklist
/* 01 */ {"SNES Cup", "Collect 5 Emblems", 0, 1, SECRET_NONE, 0, false, false, 0},
/* 02 */ {"Chaotic Kart Cup", "Collect 15 Emblems", 0, 2, SECRET_NONE, 0, false, false, 0},
/* 01 */ {"Egg Cup", "", 0, 1, SECRET_NONE, 0, false, false, 0},
/* 02 */ {"SMK Cup", "", 0, 2, SECRET_NONE, 0, false, false, 0},
/* 03 */ {"Chao Cup", "", 0, 3, SECRET_NONE, 0, false, false, 0},
/* 03 */ {"Record Attack", "", 0, -1, SECRET_RECORDATTACK, 0, true, true, 0},
/* 04 */ {"Record Attack", "", 0, -1, SECRET_RECORDATTACK, 0, true, true, 0},
};
// Default number of emblems and extra emblems
INT32 numemblems = 23;
INT32 numemblems = 50;
INT32 numextraemblems = 1;
// DEFAULT CONDITION SETS FOR SRB2KART:
@ -132,12 +117,16 @@ void M_SetupDefaultConditionSets(void)
M_AddRawCondition(1, 1, UC_TOTALEMBLEMS, 5, 0, 0);
M_AddRawCondition(1, 2, UC_MATCHESPLAYED, 10, 0, 0);
// -- 2: Collect 15 emblems OR play 30 matches
// -- 2: Collect 15 emblems OR play 25 matches
M_AddRawCondition(2, 1, UC_TOTALEMBLEMS, 15, 0, 0);
M_AddRawCondition(2, 2, UC_MATCHESPLAYED, 30, 0, 0);
M_AddRawCondition(2, 2, UC_MATCHESPLAYED, 25, 0, 0);
// -- 10: Play 50 matches
M_AddRawCondition(10, 1, UC_TOTALEMBLEMS, 50, 0, 0);
// -- 3: Collect 30 emblems OR play 50 matches
M_AddRawCondition(3, 1, UC_TOTALEMBLEMS, 30, 0, 0);
M_AddRawCondition(3, 2, UC_MATCHESPLAYED, 50, 0, 0);
// -- 10: Play 100 matches
M_AddRawCondition(10, 1, UC_MATCHESPLAYED, 100, 0, 0);
}
void M_AddRawCondition(UINT8 set, UINT8 id, conditiontype_t c, INT32 r, INT16 x1, INT16 x2)

View file

@ -33,7 +33,9 @@
*/
fixed_t FixedMul(fixed_t a, fixed_t b)
{
return (fixed_t)((((INT64)a * b) ) / FRACUNIT);
// Need to cast to unsigned before shifting to avoid undefined behaviour
// for negative integers
return (fixed_t)(((UINT64)((INT64)a * b)) >> FRACBITS);
}
#endif //__USE_C_FIXEDMUL__

View file

@ -3371,17 +3371,17 @@ static void M_DrawPauseMenu(void)
// Draw any and all emblems at the top.
M_DrawMapEmblems(gamemap, 272, 28);
if (mapheaderinfo[gamemap-1]->zonttl)
if (strlen(mapheaderinfo[gamemap-1]->zonttl) > 0)
{
if (mapheaderinfo[gamemap-1]->actnum != 0)
V_DrawString(40, 28, V_YELLOWMAP, va("%s %s %d", mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->zonttl, mapheaderinfo[gamemap-1]->actnum));
if (strlen(mapheaderinfo[gamemap-1]->actnum) > 0)
V_DrawString(40, 28, V_YELLOWMAP, va("%s %s %s", mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->zonttl, mapheaderinfo[gamemap-1]->actnum));
else
V_DrawString(40, 28, V_YELLOWMAP, va("%s %s", mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->zonttl));
}
else
{
if (mapheaderinfo[gamemap-1]->actnum != 0)
V_DrawString(40, 28, V_YELLOWMAP, va("%s %d", mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->actnum));
if (strlen(mapheaderinfo[gamemap-1]->actnum) > 0)
V_DrawString(40, 28, V_YELLOWMAP, va("%s %s", mapheaderinfo[gamemap-1]->lvlttl, mapheaderinfo[gamemap-1]->actnum));
else
V_DrawString(40, 28, V_YELLOWMAP, mapheaderinfo[gamemap-1]->lvlttl);
}
@ -4896,7 +4896,7 @@ static void M_ReadSavegameInfo(UINT32 slot)
else
{
strcpy(savegameinfo[slot].levelname, mapheaderinfo[(fake-1) & 8191]->lvlttl);
savegameinfo[slot].actnum = mapheaderinfo[(fake-1) & 8191]->actnum;
savegameinfo[slot].actnum = 0; //mapheaderinfo[(fake-1) & 8191]->actnum
}
#ifdef SAVEGAMES_OTHERVERSIONS
@ -5308,10 +5308,11 @@ static void M_Statistics(INT32 choice)
if (!mapheaderinfo[i] || mapheaderinfo[i]->lvlttl[0] == '\0')
continue;
if (!(mapheaderinfo[i]->typeoflevel & TOL_SP) || (mapheaderinfo[i]->menuflags & LF2_HIDEINSTATS))
if (!(mapheaderinfo[i]->typeoflevel & TOL_RACE) // TOL_SP
|| (mapheaderinfo[i]->menuflags & LF2_HIDEINSTATS))
continue;
if (!mapvisited[i])
if (M_MapLocked(i+1)) // !mapvisited[i]
continue;
statsMapList[j++] = i;
@ -5346,10 +5347,20 @@ static void M_DrawStatsMaps(int location)
mnum = statsMapList[i];
M_DrawMapEmblems(mnum+1, 292, y);
if (mapheaderinfo[mnum]->actnum != 0)
V_DrawString(20, y, V_YELLOWMAP, va("%s %d", mapheaderinfo[mnum]->lvlttl, mapheaderinfo[mnum]->actnum));
if (strlen(mapheaderinfo[gamemap-1]->zonttl) > 0)
{
if (strlen(mapheaderinfo[gamemap-1]->actnum) > 0)
V_DrawString(20, y, V_YELLOWMAP, va("%s %s %s", mapheaderinfo[mnum]->lvlttl, mapheaderinfo[mnum]->zonttl, mapheaderinfo[mnum]->actnum));
else
V_DrawString(20, y, V_YELLOWMAP, va("%s %s", mapheaderinfo[mnum]->lvlttl, mapheaderinfo[mnum]->zonttl));
}
else
V_DrawString(20, y, V_YELLOWMAP, mapheaderinfo[mnum]->lvlttl);
{
if (strlen(mapheaderinfo[gamemap-1]->actnum) > 0)
V_DrawString(20, y, V_YELLOWMAP, va("%s %s", mapheaderinfo[mnum]->lvlttl, mapheaderinfo[mnum]->actnum));
else
V_DrawString(20, y, V_YELLOWMAP, mapheaderinfo[mnum]->lvlttl);
}
y += 8;

View file

@ -679,9 +679,9 @@ static void M_PNGText(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png
if (gamestate == GS_LEVEL && mapheaderinfo[gamemap-1]->lvlttl[0] != '\0')
snprintf(lvlttltext, 48, "%s%s%s",
mapheaderinfo[gamemap-1]->lvlttl,
(strlen(mapheaderinfo[gamemap-1]->zonttl) > 0) ? mapheaderinfo[gamemap-1]->zonttl : // SRB2kart
(strlen(mapheaderinfo[gamemap-1]->zonttl) > 0) ? va(" %s",mapheaderinfo[gamemap-1]->zonttl) : // SRB2kart
((mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE) ? "" : " ZONE"),
(mapheaderinfo[gamemap-1]->actnum > 0) ? va(" %d",mapheaderinfo[gamemap-1]->actnum) : "");
(strlen(mapheaderinfo[gamemap-1]->actnum) > 0) ? va(" %s",mapheaderinfo[gamemap-1]->actnum) : "");
else
snprintf(lvlttltext, 48, "Unknown");

View file

@ -187,8 +187,8 @@ void A_RandomStateRange(mobj_t *actor);
void A_DualAction(mobj_t *actor);
void A_RemoteAction(mobj_t *actor);
void A_ToggleFlameJet(mobj_t *actor);
void A_ItemPop(mobj_t *actor); // SRB2kart
void A_JawzChase(mobj_t *actor); // SRB2kart
void A_ItemPop(mobj_t *actor); // SRB2kart
void A_JawzChase(mobj_t *actor); // SRB2kart
void A_MineExplode(mobj_t *actor); // SRB2kart
void A_OrbitNights(mobj_t *actor);
void A_GhostMe(mobj_t *actor);
@ -2604,9 +2604,8 @@ void A_MonitorPop(mobj_t *actor)
case MT_QUESTIONBOX: // Random!
{
mobjtype_t spawnchance[256];
INT32 numchoices = 0/*, i = 0*/;
INT32 numchoices = 0, i = 0;
/*
#define QUESTIONBOXCHANCES(type, cvar) \
for (i = cvar.value; i; --i) spawnchance[numchoices++] = type
@ -2624,7 +2623,6 @@ for (i = cvar.value; i; --i) spawnchance[numchoices++] = type
QUESTIONBOXCHANCES(MT_RECYCLETV, cv_recycler);
#undef QUESTIONBOXCHANCES
*/
if (numchoices == 0)
{

View file

@ -2090,6 +2090,7 @@ void T_EachTimeThinker(levelspecthink_t *eachtime)
boolean floortouch = false;
fixed_t bottomheight, topheight;
msecnode_t *node;
ffloor_t *rover;
for (i = 0; i < MAXPLAYERS; i++)
{
@ -2137,6 +2138,19 @@ void T_EachTimeThinker(levelspecthink_t *eachtime)
{
targetsec = &sectors[targetsecnum];
// Find the FOF corresponding to the control linedef
for (rover = targetsec->ffloors; rover; rover = rover->next)
{
if (rover->master == sec->lines[i])
break;
}
if (!rover) // This should be impossible, but don't complain if it is the case somehow
continue;
if (!(rover->flags & FF_EXISTS)) // If the FOF does not "exist", we pretend that nobody's there
continue;
for (j = 0; j < MAXPLAYERS; j++)
{
if (!playeringame[j])

View file

@ -1200,7 +1200,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
{
// blatant reuse of a variable that's normally unused in circuit
if (!player->tossdelay)
S_StartSound(toucher, sfx_lose);
S_StartSound(toucher, sfx_s26d);
player->tossdelay = 3;
return;
}
@ -3102,9 +3102,11 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
player->kartstuff[k_sneakertimer] = 0;
// Thunder
if (damage == 64 && player != source->player)
// Size Down
if (damage == 64)
{
if (player == source->player)
return false;
// Don't flip out while super!
if (!player->kartstuff[k_invincibilitytimer] && player->kartstuff[k_growshrinktimer] <= 0)
{
@ -3112,7 +3114,6 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
K_SpinPlayer(player, source);
// Start shrinking!
S_StartSound(player->mo, sfx_kc59);
player->mo->destscale = 6*(mapheaderinfo[gamemap-1]->mobj_scale)/8;
player->kartstuff[k_growshrinktimer] -= (100+20*(16-(player->kartstuff[k_position])));
}
@ -3125,20 +3126,18 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_LIGHTNING);
return true;
}
else if (damage == 64 && player == source->player)
return false;
// Blue Thunder
if (damage == 65 && player->kartstuff[k_position] == 1)
// Self-Propelled Bomb
if (damage == 65)
{
if (player == source->player)
return false;
// Just need to do this now! Being thrown upwards is done by the explosion.
P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_BLUELIGHTNING);
blueexplode = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_BLUEEXPLOSION);
P_SetTarget(&blueexplode->target, source);
return true;
}
else if (damage == 65 && player->kartstuff[k_position] > 1)
return false;
//}
// Sudden-Death mode

View file

@ -1649,40 +1649,64 @@ static boolean PIT_CheckThing(mobj_t *thing)
if (thing->player->kartstuff[k_balloon] <= 0 || tmthing->player->kartstuff[k_balloon] <= 0)
{
if (thing->player->kartstuff[k_comebackmode] == 0
&& tmthing->player->kartstuff[k_balloon] > 0)
&& (tmthing->player->kartstuff[k_balloon] > 0
&& !tmthing->player->powers[pw_flashing]))
{
mobj_t *boom = P_SpawnMobj(thing->x, thing->y, thing->z, MT_BOOMPARTICLE);
boom->scale = thing->scale;
boom->destscale = thing->scale;
boom->momz = 5*FRACUNIT;
if (thing->player->skincolor)
boom->color = thing->player->skincolor;
else
boom->color = SKINCOLOR_RED;
S_StartSound(boom, sfx_s3k4e);
K_ExplodePlayer(tmthing->player, thing);
thing->player->kartstuff[k_comebacktimer] = comebacktime;
return true;
}
else if (tmthing->player->kartstuff[k_comebackmode] == 0
&& thing->player->kartstuff[k_balloon] > 0)
&& (thing->player->kartstuff[k_balloon] > 0
&& !thing->player->powers[pw_flashing]))
{
mobj_t *boom = P_SpawnMobj(tmthing->x, tmthing->y, tmthing->z, MT_BOOMPARTICLE);
boom->scale = tmthing->scale;
boom->destscale = tmthing->scale;
boom->momz = 5*FRACUNIT;
if (tmthing->player->skincolor)
boom->color = tmthing->player->skincolor;
else
boom->color = SKINCOLOR_RED;
S_StartSound(boom, sfx_s3k4e);
K_ExplodePlayer(thing->player, tmthing);
tmthing->player->kartstuff[k_comebacktimer] = comebacktime;
return true;
}
else if (thing->player->kartstuff[k_comebackmode] == 1
&& (tmthing->player->kartstuff[k_balloon] > 0 && P_CanPickupItem(tmthing->player, true)))
&& (tmthing->player->kartstuff[k_balloon] > 0
&& P_CanPickupItem(tmthing->player, true)))
{
thing->player->kartstuff[k_comebackmode] = 0;
thing->player->kartstuff[k_comebackpoints]++;
if (netgame && cv_hazardlog.value)
CONS_Printf(M_GetText("%s gave an item to %s.\n"), player_names[thing->player-players], player_names[tmthing->player-players]);
tmthing->player->kartstuff[k_itemroulette] = 1;
tmthing->player->kartstuff[k_roulettetype] = 1;
if (thing->player->kartstuff[k_comebackpoints] >= 3)
K_StealBalloon(thing->player, tmthing->player, true);
thing->player->kartstuff[k_comebacktimer] = comebacktime;
return true;
}
else if (tmthing->player->kartstuff[k_comebackmode] == 1
&& (thing->player->kartstuff[k_balloon] > 0 && P_CanPickupItem(thing->player, true)))
&& (thing->player->kartstuff[k_balloon] > 0
&& P_CanPickupItem(thing->player, true)))
{
tmthing->player->kartstuff[k_comebackmode] = 0;
tmthing->player->kartstuff[k_comebackpoints]++;
if (netgame && cv_hazardlog.value)
CONS_Printf(M_GetText("%s gave an item to %s.\n"), player_names[tmthing->player-players], player_names[thing->player-players]);
thing->player->kartstuff[k_itemroulette] = 1;
thing->player->kartstuff[k_roulettetype] = 1;
if (tmthing->player->kartstuff[k_comebackpoints] >= 3)
K_StealBalloon(tmthing->player, thing->player, true);
tmthing->player->kartstuff[k_comebacktimer] = comebacktime;
@ -3843,6 +3867,12 @@ void P_BounceMove(mobj_t *mo)
//INT32 hitcount;
fixed_t mmomx = 0, mmomy = 0;
if (mo->eflags & MFE_JUSTBOUNCEDWALL)
{
P_SlideMove(mo, true);
return;
}
slidemo = mo;
//hitcount = 0;
@ -3971,12 +4001,12 @@ bounceback:
fx->eflags &= ~MFE_VERTICALFLIP;
fx->scale = mo->scale;
if (cv_collidesounds.value == 1)
S_StartSound(mo, cv_collidesoundnum.value);
S_StartSound(mo, sfx_s3k49);
}
}
P_HitBounceLine(bestslideline); // clip the moves
P_HitBounceLine(bestslideline);
mo->eflags |= MFE_JUSTBOUNCEDWALL;
mo->momx = tmxmove;
mo->momy = tmymove;

View file

@ -2891,6 +2891,12 @@ static void P_PlayerZMovement(mobj_t *mo)
mo->momx = mo->momx/2;
mo->momy = mo->momy/2;
}
if (mo->player->cmd.buttons & BT_BRAKE && !(mo->player->cmd.forwardmove)) // FURTHER slowdown if you're braking.
{
mo->momx = mo->momx/2;
mo->momy = mo->momy/2;
}
}
if (mo->health)
@ -6116,7 +6122,7 @@ static boolean P_AddShield(mobj_t *thing)
}
if (shield != SH_FORCE)
{ // Regular shields check for themselves only
{ // Regular shields check for themselves only
if ((shieldtype_t)(thing->target->player->powers[pw_shield] & SH_NOSTACK) != shield)
{
P_RemoveMobj(thing);
@ -6153,7 +6159,6 @@ void P_RunOverlays(void)
if (!mo->target)
continue;
if (!splitscreen /*&& rendermode != render_soft*/)
{
angle_t viewingangle;
@ -6259,6 +6264,26 @@ void P_RunShadows(void)
else
mobj->flags2 &= ~MF2_DONTDRAW;
if (mobj->target->eflags & MFE_DRAWONLYFORP1) // groooooaann...
mobj->eflags |= MFE_DRAWONLYFORP1;
else
mobj->eflags &= ~MFE_DRAWONLYFORP1;
if (mobj->target->eflags & MFE_DRAWONLYFORP2)
mobj->eflags |= MFE_DRAWONLYFORP2;
else
mobj->eflags &= ~MFE_DRAWONLYFORP2;
if (mobj->target->eflags & MFE_DRAWONLYFORP3)
mobj->eflags |= MFE_DRAWONLYFORP3;
else
mobj->eflags &= ~MFE_DRAWONLYFORP3;
if (mobj->target->eflags & MFE_DRAWONLYFORP4)
mobj->eflags |= MFE_DRAWONLYFORP4;
else
mobj->eflags &= ~MFE_DRAWONLYFORP4;
// First scale to the same radius
P_SetScale(mobj, FixedDiv(mobj->target->radius, mobj->info->radius));
@ -6408,7 +6433,7 @@ void P_MobjThinker(mobj_t *mobj)
P_SetTarget(&mobj->tracer, NULL);
mobj->flags2 &= ~MF2_PUSHED;
mobj->eflags &= ~MFE_SPRUNG;
mobj->eflags &= ~(MFE_SPRUNG|MFE_JUSTBOUNCEDWALL);
tmfloorthing = tmhitthing = NULL;
@ -6521,10 +6546,7 @@ void P_MobjThinker(mobj_t *mobj)
// Don't touch my fuse!
return;
case MT_OVERLAY:
if ((!mobj->target)
|| ((mobj->state == &states[S_INVULNFLASH1] || mobj->state == &states[S_INVULNFLASH2] // SRB2kart: BAD HACK X_X
|| mobj->state == &states[S_INVULNFLASH3] || mobj->state == &states[S_INVULNFLASH4])
&& mobj->target->player && mobj->target->player->kartstuff[k_invincibilitytimer] == 0))
if (!mobj->target)
{
P_RemoveMobj(mobj);
return;
@ -6563,7 +6585,7 @@ void P_MobjThinker(mobj_t *mobj)
if (G_BattleGametype() && mobj->target->player->kartstuff[k_balloon] <= 0)
kartspeed = 1;
dsone = 26*4 + kartspeed*2 + (9 - mobj->target->player->kartweight);
dsone = (26*4 + kartspeed*2 + (9 - mobj->target->player->kartweight))*8;
dstwo = dsone*2;
if (mobj->target->player->kartstuff[k_driftcharge] < dsone)
@ -6574,27 +6596,46 @@ void P_MobjThinker(mobj_t *mobj)
if (mobj->target->player->kartstuff[k_hyudorotimer] > 0)
{
if ((mobj->target->player == &players[displayplayer]
|| (splitscreen && mobj->target->player == &players[secondarydisplayplayer])
|| (splitscreen > 1 && mobj->target->player == &players[thirddisplayplayer])
|| (splitscreen > 2 && mobj->target->player == &players[fourthdisplayplayer]))
|| (!(mobj->target->player == &players[displayplayer]
|| (splitscreen && mobj->target->player == &players[secondarydisplayplayer])
|| (splitscreen > 1 && mobj->target->player == &players[thirddisplayplayer])
|| (splitscreen > 2 && mobj->target->player == &players[fourthdisplayplayer]))
&& (mobj->target->player->kartstuff[k_hyudorotimer] < 1*TICRATE/2 || mobj->target->player->kartstuff[k_hyudorotimer] > hyudorotime-(1*TICRATE/2))))
if (splitscreen)
{
if (leveltime & 1)
mobj->flags2 |= MF2_DONTDRAW;
else
mobj->flags2 &= ~MF2_DONTDRAW;
if (mobj->target->player->kartstuff[k_hyudorotimer] >= (1*TICRATE/2) && mobj->target->player->kartstuff[k_hyudorotimer] <= hyudorotime-(1*TICRATE/2))
{
if (mobj->target->player == &players[secondarydisplayplayer])
mobj->eflags |= MFE_DRAWONLYFORP2;
else if (mobj->target->player == &players[thirddisplayplayer] && splitscreen > 1)
mobj->eflags |= MFE_DRAWONLYFORP3;
else if (mobj->target->player == &players[fourthdisplayplayer] && splitscreen > 2)
mobj->eflags |= MFE_DRAWONLYFORP4;
else
mobj->eflags |= MFE_DRAWONLYFORP1;
}
else
mobj->eflags &= ~(MFE_DRAWONLYFORP1|MFE_DRAWONLYFORP2|MFE_DRAWONLYFORP3|MFE_DRAWONLYFORP4);
}
else
mobj->flags2 |= MF2_DONTDRAW;
{
if (mobj->target->player == &players[displayplayer]
|| (mobj->target->player != &players[displayplayer]
&& (mobj->target->player->kartstuff[k_hyudorotimer] < (1*TICRATE/2) || mobj->target->player->kartstuff[k_hyudorotimer] > hyudorotime-(1*TICRATE/2))))
{
if (leveltime & 1)
mobj->flags2 |= MF2_DONTDRAW;
else
mobj->flags2 &= ~MF2_DONTDRAW;
}
else
mobj->flags2 |= MF2_DONTDRAW;
}
}
else if (mobj->target->player->kartstuff[k_hyudorotimer] == 0)
{
mobj->flags2 &= ~MF2_DONTDRAW;
mobj->eflags &= ~(MFE_DRAWONLYFORP1|MFE_DRAWONLYFORP2|MFE_DRAWONLYFORP3|MFE_DRAWONLYFORP4);
}
// Actor's distance from its Target, or Radius.
@ -6772,7 +6813,7 @@ void P_MobjThinker(mobj_t *mobj)
}
break;
case MT_BATTLEBALLOON:
if (mobj->health > 0 && mobj->target && mobj->target->player && mobj->target->player->mo
if (mobj->health > 0 && mobj->target && mobj->target->player
&& mobj->target->player->health > 0 && !mobj->target->player->spectator)
{
fixed_t rad = 32*mobj->target->scale;
@ -6803,6 +6844,26 @@ void P_MobjThinker(mobj_t *mobj)
offz = mobj->target->height / 5;
}
if (mobj->target->eflags & MFE_DRAWONLYFORP1) // groooooaann...
mobj->eflags |= MFE_DRAWONLYFORP1;
else
mobj->eflags &= ~MFE_DRAWONLYFORP1;
if (mobj->target->eflags & MFE_DRAWONLYFORP2)
mobj->eflags |= MFE_DRAWONLYFORP2;
else
mobj->eflags &= ~MFE_DRAWONLYFORP2;
if (mobj->target->eflags & MFE_DRAWONLYFORP3)
mobj->eflags |= MFE_DRAWONLYFORP3;
else
mobj->eflags &= ~MFE_DRAWONLYFORP3;
if (mobj->target->eflags & MFE_DRAWONLYFORP4)
mobj->eflags |= MFE_DRAWONLYFORP4;
else
mobj->eflags &= ~MFE_DRAWONLYFORP4;
if (mobj->target->flags2 & MF2_DONTDRAW)
mobj->flags2 |= MF2_DONTDRAW;
else
@ -8113,7 +8174,7 @@ void P_MobjThinker(mobj_t *mobj)
mobj->tracer->y, mobj->tracer->floorz, SPLATDRAWMODE_SHADE);
#endif
break;
/*case MT_SPARKLETRAIL:
case MT_SPARKLETRAIL:
if (!mobj->target)
{
P_RemoveMobj(mobj);
@ -8121,7 +8182,7 @@ void P_MobjThinker(mobj_t *mobj)
}
mobj->color = mobj->target->color;
mobj->colorized = mobj->target->colorized;
break;*/
break;
case MT_SPINFIRE:
case MT_SNEAKERTRAIL:
if (mobj->eflags & MFE_VERTICALFLIP)
@ -9214,7 +9275,8 @@ void P_SpawnPrecipitation(void)
subsector_t *precipsector = NULL;
precipmobj_t *rainmo = NULL;
if (dedicated || !cv_precipdensity.value || curWeather == PRECIP_NONE)
if (dedicated || !cv_precipdensity.value || curWeather == PRECIP_NONE
|| netgame) // SRB2Kart
return;
// Use the blockmap to narrow down our placing patterns

View file

@ -233,11 +233,17 @@ typedef enum
MFE_VERTICALFLIP = 1<<5,
// Goo water
MFE_GOOWATER = 1<<6,
// free: to and including 1<<7
// SRB2Kart: The mobj just hit & bounced off a wall, this is cleared on next frame
MFE_JUSTBOUNCEDWALL = 1<<7,
// Mobj was already sprung this tic
MFE_SPRUNG = 1<<8,
// Platform movement
MFE_APPLYPMOMZ = 1<<9,
// SRB2Kart: Splitscreen sprite display; very wasteful but I couldn't think of another way to do it...
MFE_DRAWONLYFORP1 = 1<<10,
MFE_DRAWONLYFORP2 = 1<<11,
MFE_DRAWONLYFORP3 = 1<<12,
MFE_DRAWONLYFORP4 = 1<<13,
// free: to and including 1<<15
} mobjeflag_t;
@ -360,7 +366,7 @@ typedef struct mobj_s
struct pslope_s *standingslope; // The slope that the object is standing on (shouldn't need synced in savegames, right?)
#endif
boolean colorized; // Whether the mobj uses the starman colormap
boolean colorized; // Whether the mobj uses the rainbow colormap
// WARNING: New fields must be added separately to savegame and Lua.
} mobj_t;

View file

@ -3248,11 +3248,17 @@ static void P_NetArchiveMisc(void)
WRITEUINT32(save_p, hidetime);
// SRB2kart
WRITEINT32(save_p, numgotboxes);
WRITEUINT8(save_p, gamespeed);
WRITEUINT8(save_p, mirrormode);
WRITEUINT8(save_p, franticitems);
WRITEUINT8(save_p, comeback);
WRITEUINT32(save_p, instaitemcooldown);
WRITEUINT32(save_p, spbincoming);
WRITEUINT8(save_p, spbplayer);
// Is it paused?
if (paused)
WRITEUINT8(save_p, 0x2f);
@ -3339,11 +3345,17 @@ static inline boolean P_NetUnArchiveMisc(void)
hidetime = READUINT32(save_p);
// SRB2kart
numgotboxes = READINT32(save_p);
gamespeed = READUINT8(save_p);
mirrormode = (boolean)READUINT8(save_p);
franticitems = (boolean)READUINT8(save_p);
comeback = (boolean)READUINT8(save_p);
instaitemcooldown = READUINT32(save_p);
spbincoming = READUINT32(save_p);
spbplayer = READUINT8(save_p);
// Is it paused?
if (READUINT8(save_p) == 0x2f)
paused = true;

View file

@ -179,8 +179,8 @@ static void P_ClearSingleMapHeaderInfo(INT16 i)
mapheaderinfo[num]->subttl[0] = '\0';
DEH_WriteUndoline("ZONETITLE", mapheaderinfo[num]->zonttl, UNDO_NONE); // SRB2kart
mapheaderinfo[num]->zonttl[0] = '\0';
DEH_WriteUndoline("ACT", va("%d", mapheaderinfo[num]->actnum), UNDO_NONE);
mapheaderinfo[num]->actnum = 0;
DEH_WriteUndoline("ACT", mapheaderinfo[num]->actnum, UNDO_NONE); // SRB2kart
mapheaderinfo[num]->actnum[0] = '\0';
DEH_WriteUndoline("TYPEOFLEVEL", va("%d", mapheaderinfo[num]->typeoflevel), UNDO_NONE);
mapheaderinfo[num]->typeoflevel = 0;
DEH_WriteUndoline("NEXTLEVEL", va("%d", mapheaderinfo[num]->nextlevel), UNDO_NONE);
@ -2561,11 +2561,6 @@ boolean P_SetupLevel(boolean skipprecip)
// Reset the palette
#ifdef HWRENDER
if (rendermode == render_opengl)
HWR_SetPaletteColor(0);
else
#endif
if (rendermode != render_none)
V_SetPaletteLump("PLAYPAL");
@ -2679,19 +2674,19 @@ boolean P_SetupLevel(boolean skipprecip)
}
// Print "SPEEDING OFF TO [ZONE] [ACT 1]..."
if (rendermode != render_none)
/*if (rendermode != render_none)
{
// Don't include these in the fade!
char tx[64];
V_DrawSmallString(1, 191, V_ALLOWLOWERCASE, M_GetText("Speeding off to..."));
snprintf(tx, 63, "%s%s%s",
mapheaderinfo[gamemap-1]->lvlttl,
(strlen(mapheaderinfo[gamemap-1]->zonttl) > 0) ? mapheaderinfo[gamemap-1]->zonttl : // SRB2kart
(strlen(mapheaderinfo[gamemap-1]->zonttl) > 0) ? va(" %s",mapheaderinfo[gamemap-1]->zonttl) : // SRB2kart
((mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE) ? "" : " ZONE"),
(mapheaderinfo[gamemap-1]->actnum > 0) ? va(", Act %d",mapheaderinfo[gamemap-1]->actnum) : "");
(strlen(mapheaderinfo[gamemap-1]->actnum) > 0) ? va(", Act %s",mapheaderinfo[gamemap-1]->actnum) : "");
V_DrawSmallString(1, 195, V_ALLOWLOWERCASE, tx);
I_UpdateNoVsync();
}
}*/
#ifdef HAVE_BLUA
LUA_InvalidateLevel();
@ -2985,20 +2980,32 @@ boolean P_SetupLevel(boolean skipprecip)
}*/
// SRB2Kart: map load variables
if (modeattacking)
if (modeattacking) // Just play it safe and set everything
{
gamespeed = 2;
else if (G_BattleGametype())
gamespeed = 0;
else
gamespeed = cv_kartspeed.value;
if (G_BattleGametype())
mirrormode = false;
franticitems = false;
comeback = true;
}
else
mirrormode = cv_kartmirror.value;
{
if (G_BattleGametype())
gamespeed = 0;
else
gamespeed = cv_kartspeed.value;
franticitems = cv_kartfrantic.value;
comeback = cv_kartcomeback.value;
if (G_BattleGametype())
mirrormode = false;
else
mirrormode = cv_kartmirror.value;
franticitems = cv_kartfrantic.value;
comeback = cv_kartcomeback.value;
}
instaitemcooldown = 0;
spbincoming = 0;
spbplayer = 0;
// clear special respawning que
iquehead = iquetail = 0;
@ -3036,7 +3043,7 @@ boolean P_SetupLevel(boolean skipprecip)
if (!(netgame || multiplayer || demoplayback || demorecording || metalrecording || modeattacking || players[consoleplayer].lives <= 0)
&& (!modifiedgame || savemoddata) && cursaveslot >= 0 && !ultimatemode
&& !(mapheaderinfo[gamemap-1]->menuflags & LF2_HIDEINMENU)
&& (!G_IsSpecialStage(gamemap)) && gamemap != lastmapsaved && (mapheaderinfo[gamemap-1]->actnum < 2 || gamecomplete))
&& (!G_IsSpecialStage(gamemap)) && gamemap != lastmapsaved && (/*mapheaderinfo[gamemap-1]->actnum < 2 ||*/ gamecomplete))
G_SaveGame((UINT32)cursaveslot);
if (savedata.lives > 0)
@ -3107,7 +3114,7 @@ boolean P_AddWadFile(const char *wadfilename, char **firstmapname)
if ((numlumps = W_LoadWadFile(wadfilename)) == INT16_MAX)
{
CONS_Printf(M_GetText("Errors occured while loading %s; not added.\n"), wadfilename);
CONS_Printf(M_GetText("Errors occurred while loading %s; not added.\n"), wadfilename);
return false;
}
else wadnum = (UINT16)(numwadfiles-1);

View file

@ -4201,7 +4201,7 @@ DoneSection2:
{
// blatant reuse of a variable that's normally unused in circuit
if (!player->tossdelay)
S_StartSound(player->mo, sfx_lose);
S_StartSound(player->mo, sfx_s26d);
player->tossdelay = 3;
}
@ -4210,7 +4210,9 @@ DoneSection2:
if (P_IsLocalPlayer(player))
{
// SRB2kart 200117
if (!splitscreen)
if (splitscreen)
S_ChangeMusicInternal("karwin", true);
else
{
if (player->kartstuff[k_position] == 1)
S_ChangeMusicInternal("karwin", true);
@ -4219,14 +4221,13 @@ DoneSection2:
else
S_ChangeMusicInternal("karok", true);
}
else
S_ChangeMusicInternal("karok", true);
//
//HU_SetCEchoFlags(0);
//HU_SetCEchoDuration(5);
//HU_DoCEcho("FINISHED!");
}
if (player->kartstuff[k_position] == 1)
S_StartSound(NULL, sfx_s253);
else if (P_IsLocalPlayer(player))
S_StartSound(NULL, sfx_s24f);
P_DoPlayerExit(player);
}
}
@ -6721,6 +6722,7 @@ void T_Scroll(scroll_t *s)
line_t *line;
size_t i;
INT32 sect;
ffloor_t *rover;
case sc_side: // scroll wall texture
side = sides + s->affectee;
@ -6762,6 +6764,19 @@ void T_Scroll(scroll_t *s)
sector_t *psec;
psec = sectors + sect;
// Find the FOF corresponding to the control linedef
for (rover = psec->ffloors; rover; rover = rover->next)
{
if (rover->master == sec->lines[i])
break;
}
if (!rover) // This should be impossible, but don't complain if it is the case somehow
continue;
if (!(rover->flags & FF_EXISTS)) // If the FOF does not "exist", we pretend that nobody's there
continue;
for (node = psec->touching_thinglist; node; node = node->m_thinglist_next)
{
thing = node->m_thing;
@ -6825,6 +6840,19 @@ void T_Scroll(scroll_t *s)
sector_t *psec;
psec = sectors + sect;
// Find the FOF corresponding to the control linedef
for (rover = psec->ffloors; rover; rover = rover->next)
{
if (rover->master == sec->lines[i])
break;
}
if (!rover) // This should be impossible, but don't complain if it is the case somehow
continue;
if (!(rover->flags & FF_EXISTS)) // If the FOF does not "exist", we pretend that nobody's there
continue;
for (node = psec->touching_thinglist; node; node = node->m_thinglist_next)
{
thing = node->m_thing;

View file

@ -608,7 +608,8 @@ void P_Ticker(boolean run)
}
// Keep track of how long they've been playing!
totalplaytime++;
if (!demoplayback) // Don't increment if a demo is playing.
totalplaytime++;
if (!useNightsSS && G_IsSpecialStage(gamemap))
P_DoSpecialStageStuff();
@ -676,6 +677,38 @@ void P_Ticker(boolean run)
if (countdown2)
countdown2--;
if (spbincoming && --spbincoming <= 0)
{
UINT8 best = 0;
SINT8 hurtthisguy = -1;
spbincoming = 0;
for (i = 0; i < MAXPLAYERS; i++)
{
if (!playeringame[i] || players[i].spectator)
continue;
if (!players[i].mo)
continue;
if (players[i].exiting)
continue;
if (best <= 0 || players[i].kartstuff[k_position] < best)
{
best = players[i].kartstuff[k_position];
hurtthisguy = i;
}
}
if (hurtthisguy != -1)
players[hurtthisguy].kartstuff[k_deathsentence] = TICRATE+1;
}
if (instaitemcooldown)
instaitemcooldown--;
if (quake.time)
{
fixed_t ir = quake.intensity>>1;

View file

@ -1041,6 +1041,10 @@ void P_AddPlayerScore(player_t *player, UINT32 amount)
{
UINT32 oldscore;
#if 1
return; // Nope, still don't need this for Battle even
#endif
if (player->bot)
player = &players[consoleplayer];
@ -1161,44 +1165,39 @@ void P_RestoreMusic(player_t *player)
S_SpeedMusic(1.0f);
// SRB2kart - We have some different powers than vanilla, some of which tweak the music.
if (!player->exiting)
if (splitscreen != 0 && G_RaceGametype()
&& (players[consoleplayer].exiting
|| players[secondarydisplayplayer].exiting
|| players[thirddisplayplayer].exiting
|| players[fourthdisplayplayer].exiting))
S_ChangeMusicInternal("karwin", true);
else if (splitscreen == 0 && G_RaceGametype() && player->exiting)
{
// Item - Grow
if (player->kartstuff[k_growshrinktimer] > 1)
S_ChangeMusicInternal("kgrow", true);
// Item - Star
else if (player->kartstuff[k_invincibilitytimer] > 1)
S_ChangeMusicInternal("kinvnc", false);
// Event - Final Lap
else if (player->laps == (UINT8)(cv_numlaps.value - 1))
{
S_SpeedMusic(1.2f);
S_ChangeMusic(mapmusname, mapmusflags, true);
}
if (player->kartstuff[k_position] == 1)
S_ChangeMusicInternal("karwin", true);
else if (K_IsPlayerLosing(player))
S_ChangeMusicInternal("karlos", true);
else
S_ChangeMusic(mapmusname, mapmusflags, true);
}
/* SRB2kart - old stuff
if (player->powers[pw_super] && !(mapheaderinfo[gamemap-1]->levelflags & LF_NOSSMUSIC))
S_ChangeMusicInternal("supers", true);
else if (player->powers[pw_invulnerability] > 1)
S_ChangeMusicInternal((mariomode) ? "minvnc" : "invinc", false);
else if (player->powers[pw_sneakers] > 1 && !player->powers[pw_super])
{
if (mapheaderinfo[gamemap-1]->levelflags & LF_SPEEDMUSIC)
{
S_SpeedMusic(1.4f);
S_ChangeMusic(mapmusname, mapmusflags, true);
}
else
S_ChangeMusicInternal("shoes", true);
S_ChangeMusicInternal("karok", true);
}
else
S_ChangeMusic(mapmusname, mapmusflags, true);
*/
{
// Item - Grow
if (player->kartstuff[k_growshrinktimer] > 1 && player->playerstate == PST_LIVE)
S_ChangeMusicInternal("kgrow", true);
// Item - Invincibility
else if (player->kartstuff[k_invincibilitytimer] > 1 && player->playerstate == PST_LIVE)
S_ChangeMusicInternal("kinvnc", false);
else if (leveltime > 157)
{
// Event - Final Lap
if (G_RaceGametype() && player->laps >= (UINT8)(cv_numlaps.value - 1))
S_SpeedMusic(1.2f);
S_ChangeMusic(mapmusname, mapmusflags, true);
}
else
S_StopMusic();
}
}
//
@ -1763,6 +1762,9 @@ boolean P_InSpaceSector(mobj_t *mo) // Returns true if you are in space
for (rover = sector->ffloors; rover; rover = rover->next)
{
if (!(rover->flags & FF_EXISTS))
continue;
if (GETSECSPECIAL(rover->master->frontsector->special, 1) != SPACESPECIAL)
continue;
#ifdef ESLOPE
@ -1977,6 +1979,12 @@ static void P_CheckBouncySectors(player_t *player)
for (rover = node->m_sector->ffloors; rover; rover = rover->next)
{
if (!(rover->flags & FF_EXISTS))
continue; // FOFs should not be bouncy if they don't even "exist"
if (GETSECSPECIAL(rover->master->frontsector->special, 1) != 15)
continue; // this sector type is required for FOFs to be bouncy
topheight = P_GetFOFTopZ(player->mo, node->m_sector, rover, player->mo->x, player->mo->y, NULL);
bottomheight = P_GetFOFBottomZ(player->mo, node->m_sector, rover, player->mo->x, player->mo->y, NULL);
@ -1990,7 +1998,6 @@ static void P_CheckBouncySectors(player_t *player)
&& oldz + player->mo->height > P_GetFOFBottomZ(player->mo, node->m_sector, rover, oldx, oldy, NULL))
top = false;
if (GETSECSPECIAL(rover->master->frontsector->special, 1) == 15)
{
fixed_t linedist;
@ -2297,12 +2304,12 @@ static void P_CheckInvincibilityTimer(player_t *player)
//if (mariomode && !player->powers[pw_super]) // SRB2kart
player->mo->color = (UINT8)(1 + (leveltime % (MAXSKINCOLORS-1)));
/*if (leveltime % (TICRATE/7) == 0)
if (leveltime % (TICRATE/7) == 0)
{
mobj_t *sparkle = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_IVSP);
sparkle->destscale = player->mo->scale;
P_SetScale(sparkle, player->mo->scale);
}*/
}
// Resume normal music stuff.
if (player->powers[pw_invulnerability] == 1 || player->kartstuff[k_invincibilitytimer] == 1)
@ -4678,7 +4685,6 @@ static void P_3dMovement(player_t *player)
angle_t movepushangle, movepushsideangle; // Analog
//INT32 topspeed, acceleration, thrustfactor;
fixed_t movepushforward = 0, movepushside = 0;
INT32 mforward = 0, mbackward = 0;
angle_t dangle; // replaces old quadrants bits
//boolean dangleflip = false; // SRB2kart - toaster
//fixed_t normalspd = FixedMul(player->normalspeed, player->mo->scale);
@ -4766,12 +4772,6 @@ static void P_3dMovement(player_t *player)
//dangleflip = true;
}
// now use it to determine direction!
if (dangle <= ANGLE_45) // angles 0-45 or 315-360
mforward = 1; // going forwards
else if (dangle >= ANGLE_135) // angles 135-225
mbackward = 1; // going backwards
// anything else will leave both at 0, so no need to do anything else
//{ SRB2kart 220217 - Toaster Code for misplaced thrust
@ -4797,104 +4797,13 @@ static void P_3dMovement(player_t *player)
cmd->forwardmove = 0;
// Do not let the player control movement if not onground.
onground = P_IsObjectOnGround(player->mo);
// SRB2Kart: shhhhhhh don't question me, pogo springs and speed bumps are supposed to control like you're on the ground :p
if (player->kartstuff[k_pogospring])
onground = true;
// SRB2Kart: feather and speed bumps are supposed to control like you're on the ground
onground = (P_IsObjectOnGround(player->mo) || (player->kartstuff[k_pogospring]));
player->aiming = cmd->aiming<<FRACBITS;
// Set the player speeds.
/*if (player->pflags & PF_SLIDING)
{
normalspd = FixedMul(36<<FRACBITS, player->mo->scale);
thrustfactor = 5;
acceleration = 96 + (FixedDiv(player->speed, player->mo->scale)>>FRACBITS) * 40;
topspeed = normalspd;
}
else if (player->bot)
{ // Bot steals player 1's stats
normalspd = FixedMul(players[consoleplayer].normalspeed, player->mo->scale);
thrustfactor = players[consoleplayer].thrustfactor;
acceleration = players[consoleplayer].accelstart + (FixedDiv(player->speed, player->mo->scale)>>FRACBITS) * players[consoleplayer].acceleration;
if (player->powers[pw_tailsfly])
topspeed = normalspd/2;
else if (player->mo->eflags & (MFE_UNDERWATER|MFE_GOOWATER))
{
topspeed = normalspd/2;
acceleration = 2*acceleration/3;
}
else
topspeed = normalspd;
}
else if (player->powers[pw_super] || player->powers[pw_sneakers] || player->kartstuff[k_invincibilitytimer] || player->kartstuff[k_sneakertimer])
{
if (player->powers[pw_sneakers] && (player->kartstuff[k_growshrinktimer] > 0 || player->kartstuff[k_sneakertimer] > 0 || player->kartstuff[k_invincibilitytimer] > 0))
thrustfactor = player->thrustfactor*3;
else
thrustfactor = player->thrustfactor*2;
acceleration = player->accelstart/2 + (FixedDiv(player->speed, player->mo->scale)>>FRACBITS) * player->acceleration/2;
if (player->powers[pw_tailsfly])
topspeed = normalspd;
else if (player->mo->eflags & (MFE_UNDERWATER|MFE_GOOWATER))
{
topspeed = normalspd;
acceleration = 2*acceleration/3;
}
if (cmd->forwardmove < 0)
topspeed = 5<<16;
else
topspeed = (normalspd * 3)/2; //> 60<<16 ? 60<<16 : normalspd * 2;
}
else
{
thrustfactor = player->thrustfactor;
acceleration = player->accelstart + (FixedDiv(player->speed, player->mo->scale)>>FRACBITS) * player->acceleration;
if (player->powers[pw_tailsfly])
topspeed = normalspd/2;
else if (player->mo->eflags & (MFE_UNDERWATER|MFE_GOOWATER))
{
topspeed = normalspd/2;
acceleration = 2*acceleration/3;
}
if (cmd->forwardmove < 0)
topspeed = 5<<16;
else
topspeed = normalspd;
}
// Better maneuverability while flying
//if(player->powers[pw_tailsfly])
//{
// thrustfactor = player->thrustfactor*2;
// acceleration = player->accelstart + (FixedDiv(player->speed, player->mo->scale)>>FRACBITS) * player->acceleration;
//}
if (player->mo->movefactor != FRACUNIT) // Friction-scaled acceleration...
acceleration = FixedMul(acceleration<<FRACBITS, player->mo->movefactor)>>FRACBITS;
*/
// Forward movement
if (player->climbing)
{
if (cmd->forwardmove)
{
P_SetObjectMomZ(player->mo, FixedDiv(cmd->forwardmove*FRACUNIT, 10*FRACUNIT), false);
if (player->powers[pw_super] && ALL7EMERALDS(player->powers[pw_emeralds]))
player->mo->momz *= 2;
}
}
else if (!analogmove
//&& cmd->forwardmove != 0
&& !(player->pflags & PF_GLIDING || player->exiting
|| (P_PlayerInPain(player) && !onground)))
if (!(player->exiting || (P_PlayerInPain(player) && !onground)))
{
//movepushforward = cmd->forwardmove * (thrustfactor * acceleration);
movepushforward = K_3dKartMovement(player, onground, cmd->forwardmove);
@ -4903,25 +4812,14 @@ static void P_3dMovement(player_t *player)
if (!onground)
movepushforward >>= 2; // proper air movement
// Allow a bit of movement while spinning
if (player->pflags & PF_SPINNING)
{
if ((mforward && cmd->forwardmove > 0) || (mbackward && cmd->forwardmove < 0))
movepushforward = 0;
else if (!(player->pflags & PF_STARTDASH))
movepushforward = FixedDiv(movepushforward, 16*FRACUNIT);
else
movepushforward = 0;
}
// don't need to account for scale here with kart accel code
//movepushforward = FixedMul(movepushforward, player->mo->scale);
if (player->mo->movefactor != FRACUNIT) // Friction-scaled acceleration...
movepushforward = FixedMul(movepushforward, player->mo->movefactor);
//if (mforward && cmd->forwardmove < 0) // SRB2kart - braking isn't instant
// movepushforward /= 32;
if (cmd->buttons & BT_BRAKE && !cmd->forwardmove) // SRB2kart - braking isn't instant
movepushforward /= 64;
#ifdef ESLOPE
totalthrust.x += P_ReturnThrustX(player->mo, movepushangle, movepushforward);
@ -4934,91 +4832,14 @@ static void P_3dMovement(player_t *player)
{
K_MomentumToFacing(player);
}
// Sideways movement
if (player->climbing)
if (cmd->sidemove != 0 && !(player->exiting || (P_PlayerInPain(player))))
{
if (player->powers[pw_super] && ALL7EMERALDS(player->powers[pw_emeralds]))
P_InstaThrust(player->mo, player->mo->angle-ANGLE_90, FixedMul(FixedDiv(cmd->sidemove*FRACUNIT, 5*FRACUNIT), player->mo->scale));
else
P_InstaThrust(player->mo, player->mo->angle-ANGLE_90, FixedMul(FixedDiv(cmd->sidemove*FRACUNIT, 10*FRACUNIT), player->mo->scale));
}
// Analog movement control
else if (analogmove)
{
if (!(player->pflags & PF_GLIDING || player->exiting || P_PlayerInPain(player)))
{
angle_t controldirection;
// Calculate the angle at which the controls are pointing
// to figure out the proper mforward and mbackward.
// (Why was it so complicated before? ~Red)
controldirection = R_PointToAngle2(0, 0, cmd->forwardmove*FRACUNIT, -cmd->sidemove*FRACUNIT)+movepushangle;
//movepushforward = max(abs(cmd->sidemove), abs(cmd->forwardmove)) * (thrustfactor * acceleration);
movepushforward = K_3dKartMovement(player, onground, max(abs(cmd->sidemove), abs(cmd->forwardmove)));
// allow very small movement while in air for gameplay
if (!onground)
movepushforward >>= 2; // proper air movement
// Allow a bit of movement while spinning
if (player->pflags & PF_SPINNING)
{
// Stupid little movement prohibitor hack
// that REALLY shouldn't belong in analog code.
if ((mforward && cmd->forwardmove > 0) || (mbackward && cmd->forwardmove < 0))
movepushforward = 0;
else if (!(player->pflags & PF_STARTDASH))
movepushforward = FixedDiv(movepushforward, 16*FRACUNIT);
else
movepushforward = 0;
}
movepushsideangle = controldirection;
// don't need to account for scale here with kart accel code
//movepushforward = FixedMul(movepushforward, player->mo->scale);
//if (mforward && cmd->forwardmove < 0) // SRB2kart - braking isn't instant
// movepushforward /= 32;
#ifdef ESLOPE
totalthrust.x += P_ReturnThrustX(player->mo, controldirection, movepushforward);
totalthrust.y += P_ReturnThrustY(player->mo, controldirection, movepushforward);
#else
P_Thrust(player->mo, controldirection, movepushforward);
#endif
}
}
else if (cmd->sidemove && !(player->pflags & PF_GLIDING) && !player->exiting && !P_PlayerInPain(player))
{
//movepushside = cmd->sidemove * (thrustfactor * acceleration);
if (cmd->sidemove > 0)
movepushside = K_3dKartMovement(player, onground, 50);
movepushside = (cmd->sidemove * FRACUNIT/128) + FixedDiv(player->speed, K_GetKartSpeed(player, true));
else
movepushside = -(K_3dKartMovement(player, onground, 50));
if (!onground)
{
movepushside >>= 2;
// Reduce movepushslide even more if over "max" flight speed
if (player->powers[pw_tailsfly] && player->speed > K_GetKartSpeed(player, true)) //topspeed)
movepushside >>= 2;
}
// Allow a bit of movement while spinning
if (player->pflags & PF_SPINNING)
{
if (!(player->pflags & PF_STARTDASH))
movepushside = FixedDiv(movepushside,16*FRACUNIT);
else
movepushside = 0;
}
// Finally move the player now that his speed/direction has been decided.
// don't need to account for scale here with kart accel code
//movepushside = FixedMul(movepushside, player->mo->scale);
movepushside = (cmd->sidemove * FRACUNIT/128) - FixedDiv(player->speed, K_GetKartSpeed(player, true));
#ifdef ESLOPE
totalthrust.x += P_ReturnThrustX(player->mo, movepushsideangle, movepushside);
@ -6490,13 +6311,13 @@ void P_ElementalFireTrail(player_t *player)
}
}
static void P_SkidStuff(player_t *player)
/*static void P_SkidStuff(player_t *player)
{
fixed_t pmx = player->rmomx + player->cmomx;
fixed_t pmy = player->rmomy + player->cmomy;
// Knuckles glides into the dirt.
/* // SRB2kart - don't need
// SRB2kart - don't need
if (player->pflags & PF_GLIDING && player->skidtime)
{
// Fell off a ledge...
@ -6534,7 +6355,7 @@ static void P_SkidStuff(player_t *player)
}
}
// Skidding!
else*/if (onground && !(player->mo->eflags & MFE_GOOWATER) && !(player->pflags & (PF_JUMPED|PF_SPINNING|PF_SLIDING)) && !(player->charflags & SF_NOSKID))
elseif (onground && !(player->mo->eflags & MFE_GOOWATER) && !(player->pflags & (PF_JUMPED|PF_SPINNING|PF_SLIDING)) && !(player->charflags & SF_NOSKID))
{
if (player->skidtime)
{
@ -6581,7 +6402,7 @@ static void P_SkidStuff(player_t *player)
S_StopSound(player->mo);
}
}
}
}*/
//
// P_MovePlayer
@ -6756,7 +6577,7 @@ static void P_MovePlayer(player_t *player)
if (maptol & TOL_2D)
runspd = FixedMul(runspd, 2*FRACUNIT/3);
P_SkidStuff(player);
//P_SkidStuff(player);
/////////////////////////
// MOVEMENT ANIMATIONS //
@ -7103,8 +6924,6 @@ static void P_MovePlayer(player_t *player)
// SRB2kart - Drifting smoke and fire
if ((player->kartstuff[k_drift] != 0 || player->kartstuff[k_sneakertimer] > 0) && onground && (leveltime & 1))
K_SpawnDriftTrail(player);
if (player->kartstuff[k_invincibilitytimer] > 0)
K_SpawnSparkleTrail(player);
/* // SRB2kart - nadah
// If the player isn't on the ground, make sure they aren't in a "starting dash" position.
@ -8151,12 +7970,31 @@ static void P_DeathThink(player_t *player)
{
if (player->deadtimer != gameovertics)
;
// Restore the other player's music once we're dead for long enough
// Restore the first available player's music once we're dead for long enough
// -- that is, as long as they aren't dead too
else if (player == &players[displayplayer] && players[secondarydisplayplayer].lives > 0)
P_RestoreMusic(&players[secondarydisplayplayer]);
else if (player == &players[secondarydisplayplayer] && players[displayplayer].lives > 0)
P_RestoreMusic(&players[displayplayer]);
else
{
INT32 i;
for (i = 0; i < 4; i++)
{
if (i > splitscreen)
break;
if (i == 0 && player != &players[displayplayer] && players[displayplayer].lives > 0)
P_RestoreMusic(&players[displayplayer]);
else if (i == 1 && player != &players[secondarydisplayplayer] && players[secondarydisplayplayer].lives > 0)
P_RestoreMusic(&players[secondarydisplayplayer]);
else if (i == 2 && player != &players[thirddisplayplayer] && players[thirddisplayplayer].lives > 0)
P_RestoreMusic(&players[thirddisplayplayer]);
else if (i == 3 && player != &players[fourthdisplayplayer] && players[fourthdisplayplayer].lives > 0)
P_RestoreMusic(&players[fourthdisplayplayer]);
else
continue;
break;
}
}
}
}
@ -8300,6 +8138,9 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
subsector_t *newsubsec;
fixed_t f1, f2;
if (player->exiting) // SRB2Kart: Leave the camera behind while exiting, for dramatic effect!
return true;
cameranoclip = (player->pflags & (PF_NOCLIP|PF_NIGHTSMODE)) || (player->mo->flags & (MF_NOCLIP|MF_NOCLIPHEIGHT)); // Noclipping player camera noclips too!!
if (!(player->climbing || (player->pflags & PF_NIGHTSMODE) || player->playerstate == PST_DEAD))
@ -9698,7 +9539,7 @@ void P_PlayerThink(player_t *player)
// Flash player after being hit.
if (!(player->pflags & PF_NIGHTSMODE))
{
// SRB2kart - fixes boo not flashing when it should. Grow doesn't flash either. Flashing is local.
// SRB2kart - fixes Hyudoro not flashing when it should. Grow doesn't flash either. Flashing is local.
if ((player == &players[displayplayer]
|| (splitscreen && player == &players[secondarydisplayplayer])
|| (splitscreen > 1 && player == &players[thirddisplayplayer])
@ -10114,3 +9955,4 @@ void P_PlayerAfterThink(player_t *player)
K_KartPlayerAfterThink(player);
}

View file

@ -855,7 +855,7 @@ static void R_AddPolyObjects(subsector_t *sub)
drawseg_t *firstseg;
static void R_Subsector(size_t num)
static void R_Subsector(size_t num, UINT8 ssplayer)
{
INT32 count, floorlightlevel, ceilinglightlevel, light;
seg_t *line;
@ -1213,7 +1213,7 @@ static void R_Subsector(size_t num)
// Either you must pass the fake sector and handle validcount here, on the
// real sector, or you must account for the lighting in some other way,
// like passing it as an argument.
R_AddSprites(sub->sector, (floorlightlevel+ceilinglightlevel)/2);
R_AddSprites(sub->sector, (floorlightlevel+ceilinglightlevel)/2, ssplayer);
firstseg = NULL;
@ -1419,7 +1419,7 @@ INT32 R_GetPlaneLight(sector_t *sector, fixed_t planeheight, boolean underside)
//
// killough 5/2/98: reformatted, removed tail recursion
void R_RenderBSPNode(INT32 bspnum)
void R_RenderBSPNode(INT32 bspnum, UINT8 ssplayer)
{
node_t *bsp;
INT32 side;
@ -1430,7 +1430,7 @@ void R_RenderBSPNode(INT32 bspnum)
// Decide which side the view point is on.
side = R_PointOnSide(viewx, viewy, bsp);
// Recursively divide front space.
R_RenderBSPNode(bsp->children[side]);
R_RenderBSPNode(bsp->children[side], ssplayer);
// Possibly divide back space.
@ -1448,5 +1448,5 @@ void R_RenderBSPNode(INT32 bspnum)
portalcullsector = NULL;
}
R_Subsector(bspnum == -1 ? 0 : bspnum & ~NF_SUBSECTOR);
R_Subsector(bspnum == -1 ? 0 : bspnum & ~NF_SUBSECTOR, ssplayer);
}

View file

@ -37,7 +37,7 @@ extern INT32 doorclosed;
void R_ClearClipSegs(void);
void R_PortalClearClipSegs(INT32 start, INT32 end);
void R_ClearDrawSegs(void);
void R_RenderBSPNode(INT32 bspnum);
void R_RenderBSPNode(INT32 bspnum, UINT8 ssplayer);
void R_AddPortal(INT32 line1, INT32 line2, INT32 x1, INT32 x2);
#ifdef POLYOBJECTS

View file

@ -38,4 +38,4 @@ extern drawseg_t *firstseg;
void SplitScreen_OnChange(void);
#endif // __R_LOCAL__
#endif // __R_LOCAL__

View file

@ -1335,6 +1335,18 @@ void R_RenderPlayerView(player_t *player)
{
portal_pair *portal;
const boolean skybox = (skyboxmo[0] && cv_skybox.value);
UINT8 ssplayer;
if (player == &players[secondarydisplayplayer] && splitscreen)
ssplayer = 2;
else if (player == &players[thirddisplayplayer] && splitscreen > 1)
ssplayer = 3;
else if (player == &players[fourthdisplayplayer] && splitscreen > 2)
ssplayer = 4;
else if (splitscreen)
ssplayer = 1;
else
ssplayer = 0;
if (cv_homremoval.value && player == &players[displayplayer]) // if this is display player 1
{
@ -1371,7 +1383,7 @@ void R_RenderPlayerView(player_t *player)
R_ClearVisibleFloorSplats();
#endif
R_RenderBSPNode((INT32)numnodes - 1);
R_RenderBSPNode((INT32)numnodes - 1, ssplayer);
R_ClipSprites();
R_DrawPlanes();
#ifdef FLOORSPLATS
@ -1404,7 +1416,7 @@ void R_RenderPlayerView(player_t *player)
mytotal = 0;
ProfZeroTimer();
#endif
R_RenderBSPNode((INT32)numnodes - 1);
R_RenderBSPNode((INT32)numnodes - 1, ssplayer);
R_ClipSprites();
#ifdef TIMING
RDMSR(0x10, &mycount);
@ -1429,7 +1441,7 @@ void R_RenderPlayerView(player_t *player)
validcount++;
R_RenderBSPNode((INT32)numnodes - 1);
R_RenderBSPNode((INT32)numnodes - 1, ssplayer);
R_ClipSprites();
//R_DrawPlanes();
//R_DrawMasked();

View file

@ -29,6 +29,7 @@
#include "d_netfil.h" // blargh. for nameonly().
#include "m_cheat.h" // objectplace
#include "k_kart.h" // SRB2kart
#include "p_local.h" // stplyr
#ifdef HWRENDER
#include "hardware/hw_md2.h"
#endif
@ -1675,7 +1676,7 @@ static void R_ProjectPrecipitationSprite(precipmobj_t *thing)
// R_AddSprites
// During BSP traversal, this adds sprites by sector.
//
void R_AddSprites(sector_t *sec, INT32 lightlevel)
void R_AddSprites(sector_t *sec, INT32 lightlevel, UINT8 ssplayer)
{
mobj_t *thing;
precipmobj_t *precipthing; // Tails 08-25-2002
@ -1718,6 +1719,25 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel)
if (thing->sprite == SPR_NULL || thing->flags2 & MF2_DONTDRAW)
continue;
if (splitscreen)
{
if (thing->eflags & MFE_DRAWONLYFORP1)
if (ssplayer != 1)
continue;
if (thing->eflags & MFE_DRAWONLYFORP2)
if (ssplayer != 2)
continue;
if (thing->eflags & MFE_DRAWONLYFORP3 && splitscreen > 1)
if (ssplayer != 3)
continue;
if (thing->eflags & MFE_DRAWONLYFORP4 && splitscreen > 2)
if (ssplayer != 4)
continue;
}
approx_dist = P_AproxDistance(viewx-thing->x, viewy-thing->y);
if (approx_dist <= limit_dist)
@ -1728,8 +1748,31 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel)
{
// Draw everything in sector, no checks
for (thing = sec->thinglist; thing; thing = thing->snext)
if (!(thing->sprite == SPR_NULL || thing->flags2 & MF2_DONTDRAW))
R_ProjectSprite(thing);
{
if (thing->sprite == SPR_NULL || thing->flags2 & MF2_DONTDRAW)
continue;
if (splitscreen)
{
if (thing->eflags & MFE_DRAWONLYFORP1)
if (ssplayer != 1)
continue;
if (thing->eflags & MFE_DRAWONLYFORP2)
if (ssplayer != 2)
continue;
if (thing->eflags & MFE_DRAWONLYFORP3 && splitscreen > 1)
if (ssplayer != 3)
continue;
if (thing->eflags & MFE_DRAWONLYFORP4 && splitscreen > 2)
if (ssplayer != 4)
continue;
}
R_ProjectSprite(thing);
}
}
// Someone seriously wants infinite draw distance for precipitation?

View file

@ -55,7 +55,7 @@ void R_DelSpriteDefs(UINT16 wadnum);
#endif
//SoM: 6/5/2000: Light sprites correctly!
void R_AddSprites(sector_t *sec, INT32 lightlevel);
void R_AddSprites(sector_t *sec, INT32 lightlevel, UINT8 ssplayer);
void R_InitSprites(void);
void R_ClearSprites(void);
void R_ClipSprites(void);

View file

@ -751,7 +751,7 @@ void S_StartSound(const void *origin, sfxenum_t sfx_id)
if (sound_disabled)
return;
if (true) // Sounds change in Mario mode! // SRB2kart - every sound is mario.
if (mariomode) // Sounds change in Mario mode!
{
switch (sfx_id)
{
@ -764,9 +764,9 @@ void S_StartSound(const void *origin, sfxenum_t sfx_id)
case sfx_thok:
sfx_id = sfx_mario7;
break;
case sfx_pop:
sfx_id = sfx_mkitem; // SRB2kart
break;
// case sfx_pop:
// sfx_id = sfx_mkitem; // SRB2kart
// break;
case sfx_jump:
sfx_id = sfx_mario6;
break;
@ -1438,7 +1438,7 @@ void S_StartSoundName(void *mo, const char *soundname)
/// ------------------------
#ifdef MUSICSLOT_COMPATIBILITY
const char *compat_special_music_slots[21] =
const char *compat_special_music_slots[16] =
{
"titles", // 1036 title screen
"read_m", // 1037 intro

View file

@ -700,6 +700,14 @@ static void Impl_HandleMouseButtonEvent(SDL_MouseButtonEvent evt, Uint32 type)
SDL_memset(&event, 0, sizeof(event_t));
// Ignore the event if the mouse is not actually focused on the window.
// This can happen if you used the mouse to restore keyboard focus;
// this apparently makes a mouse button down event but not a mouse button up event,
// resulting in whatever key was pressed down getting "stuck" if we don't ignore it.
// -- Monster Iestyn (28/05/18)
if (SDL_GetMouseFocus() != window)
return;
/// \todo inputEvent.button.which
if (USE_MOUSEINPUT)
{

View file

@ -264,6 +264,139 @@ sfxinfo_t S_sfx[NUMSFX] =
{"brakrl", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"brakrx", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
// Sonic 1 sounds
{"s1a0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1a1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1a2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1a3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1a4", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1a5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1a6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1a7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1a8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1a9", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1aa", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1ab", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1ac", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1ad", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1ae", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1af", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1b0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1b1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1b2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1b3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1b4", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1b5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1b6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1b7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1b8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1b9", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1ba", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1bb", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1bc", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1bd", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1be", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1bf", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1c0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1c1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1c2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1c3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1c4", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1c5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1c6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1c7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1c8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1c9", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1ca", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1cb", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1cc", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1cd", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1ce", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s1cf", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
// Sonic 2 sounds
{"s220", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s221", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s222", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s223", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s224", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s225", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s226", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s227", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s228", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s229", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s22a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s22b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s22c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s22d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s22e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s22f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s230", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s231", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s232", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s233", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s234", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s235", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s236", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s237", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s238", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s239", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s23a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s23b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s23c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s23d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s23e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s23f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s240", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s241", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s242", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s243", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s244", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s245", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s246", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s247", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s248", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s249", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s24a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s24b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s24c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s24d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s24e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s24f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Normal finish
{"s250", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s251", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s252", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s253", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // 1st place finish
{"s254", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s255", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s256", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s257", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s258", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s259", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s25a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s25b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s25c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s25d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s25e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s25f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s260", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s261", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s262", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s263", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s264", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s265", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s266", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s267", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s268", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s269", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s26a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s26b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s26c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s26d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Missed checkpoint
{"s26e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s26f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s270", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
// S3&K sounds
{"s3k33", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k34", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
@ -287,7 +420,7 @@ sfxinfo_t S_sfx[NUMSFX] =
{"s3k46", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k47", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k48", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k49", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k49", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart bump sound
{"s3k4a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k4b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k4c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
@ -466,6 +599,174 @@ sfxinfo_t S_sfx[NUMSFX] =
{"s3kdbs", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kdbl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
// 3D Blast sounds (the "missing" ones are direct copies of S3K's, no minor differences what-so-ever)
{"3db06", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"3db09", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"3db14", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"3db16", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
// Sonic CD sounds
{"cdfm00", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm01", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm02", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm03", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm04", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm05", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm06", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm07", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm08", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm09", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm10", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm11", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm12", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm13", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm14", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm15", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm16", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm17", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm18", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm19", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm20", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm21", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm22", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm23", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm24", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm25", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm26", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm27", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm28", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm29", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm30", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm31", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm32", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm33", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm34", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm35", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm36", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm37", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm38", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm39", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm40", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm41", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm42", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm43", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm44", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm45", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm46", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm47", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm48", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm49", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm50", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm51", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm52", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm53", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm54", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm55", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm56", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm57", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm58", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm59", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm60", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm61", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm62", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm63", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm64", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm65", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm66", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm67", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm68", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm69", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm70", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm71", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm72", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm73", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm74", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm75", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm76", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm77", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm78", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm79", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdpcm0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdpcm1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdpcm2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdpcm3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdpcm4", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdpcm5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdpcm6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdpcm7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdpcm8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdpcm9", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
// Knuckles Chaotix sounds
{"kc2a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc2b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc2c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc2d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc2e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc2f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Pogo Spring
{"kc30", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc31", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc32", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc33", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc34", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc35", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc36", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc37", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc38", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc39", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Voting roulette
{"kc3a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc3b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc3c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc3d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc3e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc3f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc40", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc41", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc42", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Unlock everything cheat
{"kc43", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc44", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc45", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc46", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc47", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc48", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Vote picked
{"kc49", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc4a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Voting beep
{"kc4b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc4c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc4d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc4e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc4f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc50", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc51", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc52", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc53", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc54", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc55", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc56", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc57", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc58", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc59", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Shrink
{"kc5a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Grow
{"kc5b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc5c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc5d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc5e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc5f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc60", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc61", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc62", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc63", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc64", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc65", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc66", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc67", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc68", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc69", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc6b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc6c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc6d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc6e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
// SRB2kart
{"lkt1", true, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"lkt2", true, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR},
@ -505,76 +806,6 @@ sfxinfo_t S_sfx[NUMSFX] =
{"boing", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"smkinv", false, 140, 16, -1, NULL, 0, -1, -1, LUMPERROR},
// Knuckles Chaotix sounds
{"kc2a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc2b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc2c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc2d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc2e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc2f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Pogo Spring
{"kc30", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc31", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc32", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc33", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc34", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc35", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc36", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc37", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc38", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc39", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Voting beep
{"kc3a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc3b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc3c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc3d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc3e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc3f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc40", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc41", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc42", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc43", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc44", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc45", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc46", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc47", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc48", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Voting pick
{"kc49", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc4a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc4b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc4c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc4d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc4e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc4f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc50", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc51", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc52", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc53", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc54", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc55", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc56", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc57", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc58", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc59", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Shrink
{"kc5a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Grow
{"kc5b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc5c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc5d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc5e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc5f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc60", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc61", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc62", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc63", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc64", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc65", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc66", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc67", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc68", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc69", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc6b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc6c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc6d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc6e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
// SRB2kart - Skin sounds
{"kwin", false, 64, 0, -1, NULL, 0, SKSWIN, -1, LUMPERROR},
{"klose", false, 64, 0, -1, NULL, 0, SKSLOSE, -1, LUMPERROR},

View file

@ -336,6 +336,139 @@ typedef enum
sfx_brakrl, // Rocket launcher
sfx_brakrx, // Rocket explodes
// S1 sounds
sfx_s1a0,
sfx_s1a1,
sfx_s1a2,
sfx_s1a3,
sfx_s1a4,
sfx_s1a5,
sfx_s1a6,
sfx_s1a7,
sfx_s1a8,
sfx_s1a9,
sfx_s1aa,
sfx_s1ab,
sfx_s1ac,
sfx_s1ad,
sfx_s1ae,
sfx_s1af,
sfx_s1b0,
sfx_s1b1,
sfx_s1b2,
sfx_s1b3,
sfx_s1b4,
sfx_s1b5,
sfx_s1b6,
sfx_s1b7,
sfx_s1b8,
sfx_s1b9,
sfx_s1ba,
sfx_s1bb,
sfx_s1bc,
sfx_s1bd,
sfx_s1be,
sfx_s1bf,
sfx_s1c0,
sfx_s1c1,
sfx_s1c2,
sfx_s1c3,
sfx_s1c4,
sfx_s1c5,
sfx_s1c6,
sfx_s1c7,
sfx_s1c8,
sfx_s1c9,
sfx_s1ca,
sfx_s1cb,
sfx_s1cc,
sfx_s1cd,
sfx_s1ce,
sfx_s1cf,
// S2 sounds
sfx_s220,
sfx_s221,
sfx_s222,
sfx_s223,
sfx_s224,
sfx_s225,
sfx_s226,
sfx_s227,
sfx_s228,
sfx_s229,
sfx_s22a,
sfx_s22b,
sfx_s22c,
sfx_s22d,
sfx_s22e,
sfx_s22f,
sfx_s230,
sfx_s231,
sfx_s232,
sfx_s233,
sfx_s234,
sfx_s235,
sfx_s236,
sfx_s237,
sfx_s238,
sfx_s239,
sfx_s23a,
sfx_s23b,
sfx_s23c,
sfx_s23d,
sfx_s23e,
sfx_s23f,
sfx_s240,
sfx_s241,
sfx_s242,
sfx_s243,
sfx_s244,
sfx_s245,
sfx_s246,
sfx_s247,
sfx_s248,
sfx_s249,
sfx_s24a,
sfx_s24b,
sfx_s24c,
sfx_s24d,
sfx_s24e,
sfx_s24f,
sfx_s250,
sfx_s251,
sfx_s252,
sfx_s253,
sfx_s254,
sfx_s255,
sfx_s256,
sfx_s257,
sfx_s258,
sfx_s259,
sfx_s25a,
sfx_s25b,
sfx_s25c,
sfx_s25d,
sfx_s25e,
sfx_s25f,
sfx_s260,
sfx_s261,
sfx_s262,
sfx_s263,
sfx_s264,
sfx_s265,
sfx_s266,
sfx_s267,
sfx_s268,
sfx_s269,
sfx_s26a,
sfx_s26b,
sfx_s26c,
sfx_s26d,
sfx_s26e,
sfx_s26f,
sfx_s270,
// S3&K sounds
sfx_s3k33,
sfx_s3k34,
@ -538,44 +671,103 @@ typedef enum
sfx_s3kdbs,
sfx_s3kdbl,
// SRB2kart
sfx_lkt1,
sfx_lkt2,
sfx_lkt3,
sfx_kart1,
sfx_kart2,
sfx_kart3,
sfx_mlap,
sfx_sboost,
sfx_mush,
sfx_kinvnc,
sfx_kgrow,
sfx_bomb,
sfx_bomb2,
sfx_peel,
sfx_slip,
sfx_fake,
sfx_grnshl,
sfx_redshl,
sfx_shbrk,
sfx_mkdrft,
sfx_mkslid,
sfx_mkitem,
sfx_mkitm1,
sfx_mkitm2,
sfx_mkitm3,
sfx_mkitm4,
sfx_mkitm5,
sfx_mkitm6,
sfx_mkitm7,
sfx_mkitm8,
sfx_mkitmF,
sfx_clash,
sfx_tossed,
sfx_shelit,
sfx_vroom,
sfx_boing,
sfx_smkinv,
// 3DB sounds
sfx_3db06,
sfx_3db09,
sfx_3db14,
sfx_3db16,
// SCD sounds
sfx_cdfm00,
sfx_cdfm01,
sfx_cdfm02,
sfx_cdfm03,
sfx_cdfm04,
sfx_cdfm05,
sfx_cdfm06,
sfx_cdfm07,
sfx_cdfm08,
sfx_cdfm09,
sfx_cdfm10,
sfx_cdfm11,
sfx_cdfm12,
sfx_cdfm13,
sfx_cdfm14,
sfx_cdfm15,
sfx_cdfm16,
sfx_cdfm17,
sfx_cdfm18,
sfx_cdfm19,
sfx_cdfm20,
sfx_cdfm21,
sfx_cdfm22,
sfx_cdfm23,
sfx_cdfm24,
sfx_cdfm25,
sfx_cdfm26,
sfx_cdfm27,
sfx_cdfm28,
sfx_cdfm29,
sfx_cdfm30,
sfx_cdfm31,
sfx_cdfm32,
sfx_cdfm33,
sfx_cdfm34,
sfx_cdfm35,
sfx_cdfm36,
sfx_cdfm37,
sfx_cdfm38,
sfx_cdfm39,
sfx_cdfm40,
sfx_cdfm41,
sfx_cdfm42,
sfx_cdfm43,
sfx_cdfm44,
sfx_cdfm45,
sfx_cdfm46,
sfx_cdfm47,
sfx_cdfm48,
sfx_cdfm49,
sfx_cdfm50,
sfx_cdfm51,
sfx_cdfm52,
sfx_cdfm53,
sfx_cdfm54,
sfx_cdfm55,
sfx_cdfm56,
sfx_cdfm57,
sfx_cdfm58,
sfx_cdfm59,
sfx_cdfm60,
sfx_cdfm61,
sfx_cdfm62,
sfx_cdfm63,
sfx_cdfm64,
sfx_cdfm65,
sfx_cdfm66,
sfx_cdfm67,
sfx_cdfm68,
sfx_cdfm69,
sfx_cdfm70,
sfx_cdfm71,
sfx_cdfm72,
sfx_cdfm73,
sfx_cdfm74,
sfx_cdfm75,
sfx_cdfm76,
sfx_cdfm77,
sfx_cdfm78,
sfx_cdfm79,
sfx_cdpcm0,
sfx_cdpcm1,
sfx_cdpcm2,
sfx_cdpcm3,
sfx_cdpcm4,
sfx_cdpcm5,
sfx_cdpcm6,
sfx_cdpcm7,
sfx_cdpcm8,
sfx_cdpcm9,
// KC sounds
sfx_kc2a,
@ -647,6 +839,45 @@ typedef enum
sfx_kc6d,
sfx_kc6e,
// SRB2kart
sfx_lkt1,
sfx_lkt2,
sfx_lkt3,
sfx_kart1,
sfx_kart2,
sfx_kart3,
sfx_mlap,
sfx_sboost,
sfx_mush,
sfx_kinvnc,
sfx_kgrow,
sfx_bomb,
sfx_bomb2,
sfx_peel,
sfx_slip,
sfx_fake,
sfx_grnshl,
sfx_redshl,
sfx_shbrk,
sfx_mkdrft,
sfx_mkslid,
sfx_mkitem,
sfx_mkitm1,
sfx_mkitm2,
sfx_mkitm3,
sfx_mkitm4,
sfx_mkitm5,
sfx_mkitm6,
sfx_mkitm7,
sfx_mkitm8,
sfx_mkitmF,
sfx_clash,
sfx_tossed,
sfx_shelit,
sfx_vroom,
sfx_boing,
sfx_smkinv,
sfx_kwin,
sfx_klose,
sfx_slow,

View file

@ -77,7 +77,7 @@ static patch_t *race1;
static patch_t *race2;
static patch_t *race3;
static patch_t *racego;
static patch_t *ttlnum;
//static patch_t *ttlnum;
static patch_t *nightslink;
static patch_t *count5;
static patch_t *count4;
@ -216,17 +216,17 @@ void ST_doPaletteStuff(void)
else
palette = 0;
#ifdef HWRENDER
if (rendermode == render_opengl)
palette = 0; // No flashpals here in OpenGL
#endif
palette = min(max(palette, 0), 13);
if (palette != st_palette)
{
st_palette = palette;
#ifdef HWRENDER
if (rendermode == render_opengl)
HWR_SetPaletteColor(0);
else
#endif
if (rendermode != render_none)
{
V_SetPaletteLump(GetPalette()); // Reset the palette
@ -753,7 +753,7 @@ static void ST_drawLevelTitle(void)
char *lvlttl = mapheaderinfo[gamemap-1]->lvlttl;
char *subttl = mapheaderinfo[gamemap-1]->subttl;
char *zonttl = mapheaderinfo[gamemap-1]->zonttl; // SRB2kart
INT32 actnum = mapheaderinfo[gamemap-1]->actnum;
char *actnum = mapheaderinfo[gamemap-1]->actnum;
INT32 lvlttlxpos;
INT32 subttlxpos = BASEVIDWIDTH/2;
INT32 ttlnumxpos;
@ -765,11 +765,8 @@ static void ST_drawLevelTitle(void)
if (!(timeinmap > 2 && timeinmap-3 < 110))
return;
if (actnum > 0)
{
ttlnum = W_CachePatchName(va("TTL%.2d", actnum), PU_CACHE);
lvlttlxpos = ((BASEVIDWIDTH/2) - (V_LevelNameWidth(lvlttl)/2)) - SHORT(ttlnum->width);
}
if (strlen(actnum) > 0)
lvlttlxpos = ((BASEVIDWIDTH/2) - (V_LevelNameWidth(lvlttl)/2)) - V_LevelNameWidth(actnum);
else
lvlttlxpos = ((BASEVIDWIDTH/2) - (V_LevelNameWidth(lvlttl)/2));
@ -801,8 +798,8 @@ static void ST_drawLevelTitle(void)
default: zoney = 104; lvlttly = 80; break;
}
if (actnum)
V_DrawScaledPatch(ttlnumxpos, zoney, 0, ttlnum);
if (strlen(actnum) > 0)
V_DrawLevelTitle(ttlnumxpos+12, zoney, 0, actnum);
V_DrawLevelTitle(lvlttlxpos, lvlttly, 0, lvlttl);

View file

@ -1774,7 +1774,7 @@ void V_DrawLevelTitle(INT32 x, INT32 y, INT32 option, const char *string)
c = toupper(c) - LT_FONTSTART;
if (c < 0 || c >= LT_FONTSIZE || !lt_font[c])
{
cx += 16*dupx;
cx += 12*dupx;
continue;
}
@ -1805,7 +1805,7 @@ INT32 V_LevelNameWidth(const char *string)
{
c = toupper(string[i]) - LT_FONTSTART;
if (c < 0 || c >= LT_FONTSIZE || !lt_font[c])
w += 16;
w += 12;
else
w += SHORT(lt_font[c]->width);
}

View file

@ -38,6 +38,7 @@
#include "m_random.h" // P_RandomKey
#include "g_input.h" // PLAYER1INPUTDOWN
#include "k_kart.h" // colortranslations
#ifdef HWRENDER
#include "hardware/hw_main.h"
@ -168,17 +169,23 @@ static void Y_FollowIntermission(void);
static void Y_UnloadData(void);
// SRB2Kart: voting stuff
// Level images
typedef struct
{
char str[40];
patch_t *pic;
} y_votelvlinfo;
// Clientside & splitscreen player info.
typedef struct
{
SINT8 selection;
UINT8 delay;
} y_voteplayer;
typedef struct
{
y_voteplayer playerinfo[4];
UINT8 ranim;
UINT8 rtics;
UINT8 roffset;
@ -191,6 +198,10 @@ static y_voteclient voteclient;
static INT32 votetic;
static INT32 voteendtic = -1;
static patch_t *cursor = NULL;
static patch_t *cursor1 = NULL;
static patch_t *cursor2 = NULL;
static patch_t *cursor3 = NULL;
static patch_t *cursor4 = NULL;
static patch_t *randomlvl = NULL;
static void Y_UnloadVoteData(void);
@ -284,7 +295,7 @@ void Y_IntermissionDrawer(void)
V_DrawLevelTitle(data.coop.passedx1, 49, 0, data.coop.passed1);
V_DrawLevelTitle(data.coop.passedx2, 49+V_LevelNameHeight(data.coop.passed2)+2, 0, data.coop.passed2);
if (mapheaderinfo[gamemap-1]->actnum)
if (strlen(mapheaderinfo[prevmap]->actnum) > 0)
V_DrawScaledPatch(244, 57, 0, data.coop.ttlnum);
//if (gottimebonus && endtic != -1)
@ -1116,10 +1127,10 @@ void Y_StartIntermission(void)
data.coop.ptotal = W_CachePatchName("YB_TOTAL", PU_STATIC);
// get act number
if (mapheaderinfo[prevmap]->actnum)
/*if (mapheaderinfo[prevmap]->actnum)
data.coop.ttlnum = W_CachePatchName(va("TTL%.2d", mapheaderinfo[prevmap]->actnum),
PU_STATIC);
else
else*/
data.coop.ttlnum = W_CachePatchName("TTL01", PU_STATIC);
// get background patches
@ -1148,24 +1159,24 @@ void Y_StartIntermission(void)
if (strlen(skins[players[consoleplayer].skin].realname) > 13)
{
strcpy(data.coop.passed1, "YOU GOT");
strcpy(data.coop.passed2, (mapheaderinfo[gamemap-1]->actnum) ? "THROUGH ACT" : "THROUGH THE ACT");
strcpy(data.coop.passed2, (strlen(mapheaderinfo[prevmap]->actnum) > 0) ? "THROUGH ACT" : "THROUGH THE ACT");
}
// long enough that "X GOT" won't fit so use "X PASSED THE ACT"
else if (strlen(skins[players[consoleplayer].skin].realname) > 8)
{
strcpy(data.coop.passed1, skins[players[consoleplayer].skin].realname);
strcpy(data.coop.passed2, (mapheaderinfo[gamemap-1]->actnum) ? "PASSED ACT" : "PASSED THE ACT");
strcpy(data.coop.passed2, (strlen(mapheaderinfo[prevmap]->actnum) > 0) ? "PASSED ACT" : "PASSED THE ACT");
}
// length is okay for normal use
else
{
snprintf(data.coop.passed1, sizeof data.coop.passed1, "%s GOT",
skins[players[consoleplayer].skin].realname);
strcpy(data.coop.passed2, (mapheaderinfo[gamemap-1]->actnum) ? "THROUGH ACT" : "THROUGH THE ACT");
strcpy(data.coop.passed2, (strlen(mapheaderinfo[prevmap]->actnum) > 0) ? "THROUGH ACT" : "THROUGH THE ACT");
}
// set X positions
if (mapheaderinfo[gamemap-1]->actnum)
if (strlen(mapheaderinfo[prevmap]->actnum) > 0)
{
data.coop.passedx1 = 62 + (176 - V_LevelNameWidth(data.coop.passed1))/2;
data.coop.passedx2 = 62 + (176 - V_LevelNameWidth(data.coop.passed2))/2;
@ -1306,12 +1317,12 @@ void Y_StartIntermission(void)
Y_CalculateMatchWinners();
// set up the levelstring
if (mapheaderinfo[prevmap]->zonttl)
if (strlen(mapheaderinfo[prevmap]->zonttl) > 0)
{
if (mapheaderinfo[prevmap]->actnum)
if (strlen(mapheaderinfo[prevmap]->actnum) > 0)
snprintf(data.match.levelstring,
sizeof data.match.levelstring,
"%.32s %.32s * %d *",
"%.32s %.32s * %s *",
mapheaderinfo[prevmap]->lvlttl, mapheaderinfo[prevmap]->zonttl, mapheaderinfo[prevmap]->actnum);
else
snprintf(data.match.levelstring,
@ -1321,10 +1332,10 @@ void Y_StartIntermission(void)
}
else
{
if (mapheaderinfo[prevmap]->actnum)
if (strlen(mapheaderinfo[prevmap]->actnum) > 0)
snprintf(data.match.levelstring,
sizeof data.match.levelstring,
"%.32s * %d *",
"%.32s * %s *",
mapheaderinfo[prevmap]->lvlttl, mapheaderinfo[prevmap]->actnum);
else
snprintf(data.match.levelstring,
@ -1369,12 +1380,12 @@ void Y_StartIntermission(void)
Y_CalculateTournamentPoints();
// set up the levelstring
if (mapheaderinfo[prevmap]->zonttl)
if (strlen(mapheaderinfo[prevmap]->zonttl) > 0)
{
if (mapheaderinfo[prevmap]->actnum)
if (strlen(mapheaderinfo[prevmap]->actnum) > 0)
snprintf(data.match.levelstring,
sizeof data.match.levelstring,
"%.32s %.32s * %d *",
"%.32s %.32s * %s *",
mapheaderinfo[prevmap]->lvlttl, mapheaderinfo[prevmap]->zonttl, mapheaderinfo[prevmap]->actnum);
else
snprintf(data.match.levelstring,
@ -1384,10 +1395,10 @@ void Y_StartIntermission(void)
}
else
{
if (mapheaderinfo[prevmap]->actnum)
if (strlen(mapheaderinfo[prevmap]->actnum) > 0)
snprintf(data.match.levelstring,
sizeof data.match.levelstring,
"%.32s * %d *",
"%.32s * %s *",
mapheaderinfo[prevmap]->lvlttl, mapheaderinfo[prevmap]->actnum);
else
snprintf(data.match.levelstring,
@ -1414,10 +1425,10 @@ void Y_StartIntermission(void)
Y_CalculateMatchWinners();
// set up the levelstring
if (mapheaderinfo[prevmap]->actnum)
if (strlen(mapheaderinfo[prevmap]->actnum) > 0)
snprintf(data.match.levelstring,
sizeof data.match.levelstring,
"%.32s * %d *",
"%.32s * %s *",
mapheaderinfo[prevmap]->lvlttl, mapheaderinfo[prevmap]->actnum);
else
snprintf(data.match.levelstring,
@ -1450,10 +1461,10 @@ void Y_StartIntermission(void)
Y_CalculateCompetitionWinners();
// set up the levelstring
if (mapheaderinfo[prevmap]->actnum)
if (strlen(mapheaderinfo[prevmap]->actnum) > 0)
snprintf(data.competition.levelstring,
sizeof data.competition.levelstring,
"%.32s * %d *",
"%.32s * %s *",
mapheaderinfo[prevmap]->lvlttl, mapheaderinfo[prevmap]->actnum);
else
snprintf(data.competition.levelstring,
@ -2129,7 +2140,8 @@ static void Y_UnloadData(void)
//
void Y_VoteDrawer(void)
{
INT32 i, x, y = 0;
INT32 i, x, y = 0, height = 0;
UINT8 selected[4];
if (rendermode == render_none)
return;
@ -2148,11 +2160,34 @@ void Y_VoteDrawer(void)
(vid.height / vid.dupy) - SHORT(bgpatch->height),
V_SNAPTOTOP|V_SNAPTOLEFT, bgpatch);
y = 30;
for (i = 0; i < 4; i++) // First, we need to figure out the height of this thing...
{
UINT8 j;
selected[i] = 0; // Initialize
for (j = 0; j <= splitscreen; j++)
{
if (voteclient.playerinfo[j].selection == i)
selected[i]++;
}
if (selected[i])
height += 50;
else
height += 25;
if (i < 3)
height += 5-splitscreen;
}
y = (200-height)/2;
for (i = 0; i < 4; i++)
{
char str[40];
patch_t *pic;
UINT8 sizeadd = selected[i];
UINT8 j;
UINT8 color;
if (i == 3)
{
@ -2166,25 +2201,72 @@ void Y_VoteDrawer(void)
pic = levelinfo[i].pic;
}
if (i == voteclient.selection)
if (selected[i])
{
if (votes[consoleplayer] == -1)
for (j = 0; j <= splitscreen; j++) // another loop for drawing the selection backgrounds in the right order, grumble grumble..
{
V_DrawScaledPatch(BASEVIDWIDTH-124, y+21, V_SNAPTORIGHT, cursor);
if (votetic % 4 > 1)
V_DrawFill(BASEVIDWIDTH-101, y-1, 82, 52, 120|V_SNAPTORIGHT);
INT32 handy = y;
UINT8 *colormap;
patch_t *thiscurs;
if (voteclient.playerinfo[j].selection != i)
continue;
if (splitscreen == 0)
{
thiscurs = cursor;
color = colortranslations[players[consoleplayer].skincolor][7];
colormap = NULL;
}
else
V_DrawFill(BASEVIDWIDTH-101, y-1, 82, 52, 103|V_SNAPTORIGHT);
{
switch (j)
{
case 1:
thiscurs = cursor2;
color = colortranslations[players[secondarydisplayplayer].skincolor][7];
colormap = R_GetTranslationColormap(-1, players[secondarydisplayplayer].skincolor, GTC_CACHE);
break;
case 2:
thiscurs = cursor3;
color = colortranslations[players[thirddisplayplayer].skincolor][7];
colormap = R_GetTranslationColormap(-1, players[thirddisplayplayer].skincolor, GTC_CACHE);
break;
case 3:
thiscurs = cursor4;
color = colortranslations[players[fourthdisplayplayer].skincolor][7];
colormap = R_GetTranslationColormap(-1, players[fourthdisplayplayer].skincolor, GTC_CACHE);
break;
default:
thiscurs = cursor1;
color = colortranslations[players[consoleplayer].skincolor][7];
colormap = R_GetTranslationColormap(-1, players[consoleplayer].skincolor, GTC_CACHE);
break;
}
}
handy += 6*(3-splitscreen) + (13*j);
V_DrawMappedPatch(BASEVIDWIDTH-124, handy, V_SNAPTORIGHT, thiscurs, colormap);
if (votetic % 5 == 0)
V_DrawFill(BASEVIDWIDTH-100-sizeadd, y-sizeadd, 80+(sizeadd*2), 50+(sizeadd*2), 120|V_SNAPTORIGHT);
else
V_DrawFill(BASEVIDWIDTH-100-sizeadd, y-sizeadd, 80+(sizeadd*2), 50+(sizeadd*2), color|V_SNAPTORIGHT);
sizeadd--;
}
V_DrawSmallScaledPatch(BASEVIDWIDTH-100, y, V_SNAPTORIGHT, pic);
V_DrawRightAlignedThinString(BASEVIDWIDTH-20, 40+y, V_SNAPTORIGHT, str);
y += 55;
y += 50;
}
else
{
V_DrawTinyScaledPatch(BASEVIDWIDTH-60, y, V_SNAPTORIGHT, pic);
y += 30;
y += 25;
}
y += 5-splitscreen;
}
x = 20;
@ -2224,9 +2306,6 @@ void Y_VoteDrawer(void)
}
}
if (splitscreen) // only 1p has a vote in splitscreen
break;
y += 30;
if (y > BASEVIDHEIGHT-40)
@ -2248,7 +2327,6 @@ void Y_VoteDrawer(void)
//
void Y_VoteTicker(void)
{
boolean pressed = false;
INT32 i;
if (paused || P_AutoPause())
@ -2267,7 +2345,7 @@ void Y_VoteTicker(void)
{
if (!playeringame[i] || players[i].spectator)
votes[i] = -1; // Spectators are the lower class, and have effectively no voice in the government. Democracy sucks.
else if (pickedvote != -1 && votes[i] == -1 && !splitscreen)
else if (pickedvote != -1 && votes[i] == -1)
votes[i] = 3; // Slow people get random
}
@ -2280,9 +2358,6 @@ void Y_VoteTicker(void)
if (timer)
timer--;
if (voteclient.delay)
voteclient.delay--;
if (pickedvote != -1)
{
timer = 0;
@ -2325,7 +2400,7 @@ void Y_VoteTicker(void)
if (voteclient.rendoff == 0)
{
if (tempvotes[((pickedvote + voteclient.roffset + 4) % numvotes)] == pickedvote
&& voteclient.rsynctime % 50 == 0) // Song is 1.45 seconds long (sorry @ whoever wants to replace it in a music wad :V)
&& voteclient.rsynctime % 51 == 0) // Song is 1.45 seconds long (sorry @ whoever wants to replace it in a music wad :V)
{
voteclient.rendoff = voteclient.roffset+4;
S_ChangeMusicInternal("voteeb", false);
@ -2346,34 +2421,63 @@ void Y_VoteTicker(void)
if (votetic < 3*(NEWTICRATE/7)) // give it some time before letting you control it :V
return;
if ((playeringame[consoleplayer] && !players[consoleplayer].spectator)
&& !voteclient.delay && pickedvote == -1 && votes[consoleplayer] == -1)
for (i = 0; i <= splitscreen; i++)
{
if (InputDown(gc_aimforward, 1) || JoyAxis(AXISMOVE, 1) < 0)
{
voteclient.selection--;
pressed = true;
}
if ((InputDown(gc_aimbackward, 1) || JoyAxis(AXISMOVE, 1) > 0) && !pressed)
{
voteclient.selection++;
pressed = true;
}
if (voteclient.selection < 0)
voteclient.selection = 3;
if (voteclient.selection > 3)
voteclient.selection = 0;
if (InputDown(gc_accelerate, 1) && !pressed)
{
D_ModifyClientVote(voteclient.selection);
pressed = true;
}
}
UINT8 p;
boolean pressed = false;
if (pressed)
{
S_StartSound(NULL, sfx_kc4a);
voteclient.delay = NEWTICRATE/7;
switch (i)
{
case 1:
p = secondarydisplayplayer;
break;
case 2:
p = thirddisplayplayer;
break;
case 3:
p = fourthdisplayplayer;
break;
default:
p = consoleplayer;
break;
}
if (voteclient.playerinfo[i].delay)
voteclient.playerinfo[i].delay--;
if ((playeringame[p] && !players[p].spectator)
&& !voteclient.playerinfo[i].delay
&& pickedvote == -1 && votes[p] == -1)
{
if (InputDown(gc_aimforward, i+1) || JoyAxis(AXISAIM, i+1) < 0)
{
voteclient.playerinfo[i].selection--;
pressed = true;
}
if ((InputDown(gc_aimbackward, i+1) || JoyAxis(AXISAIM, i+1) > 0) && !pressed)
{
voteclient.playerinfo[i].selection++;
pressed = true;
}
if (voteclient.playerinfo[i].selection < 0)
voteclient.playerinfo[i].selection = 3;
if (voteclient.playerinfo[i].selection > 3)
voteclient.playerinfo[i].selection = 0;
if ((InputDown(gc_accelerate, i+1) || JoyAxis(AXISMOVE, i+1) > 0) && !pressed)
{
D_ModifyClientVote(voteclient.playerinfo[i].selection, i);
pressed = true;
}
}
if (pressed)
{
S_StartSound(NULL, sfx_kc4a);
voteclient.playerinfo[i].delay = NEWTICRATE/7;
}
}
if (server)
@ -2382,25 +2486,17 @@ void Y_VoteTicker(void)
{
for (i = 0; i < MAXPLAYERS; i++)
{
if ((playeringame[i] && !players[i].spectator) && votes[i] == -1 && !splitscreen)
if ((playeringame[i] && !players[i].spectator) && votes[i] == -1)
votes[i] = 3;
}
}
else
{
if (splitscreen)
for (i = 0; i < MAXPLAYERS; i++)
{
if (votes[0] == -1)
if ((playeringame[i] && !players[i].spectator) && votes[i] == -1)
return;
}
else
{
for (i = 0; i < MAXPLAYERS; i++)
{
if ((playeringame[i] && !players[i].spectator) && votes[i] == -1)
return;
}
}
}
timer = 0;
@ -2429,13 +2525,21 @@ void Y_StartVote(void)
widebgpatch = W_CachePatchName("INTERSCW", PU_STATIC);
bgpatch = W_CachePatchName("INTERSCR", PU_STATIC);
cursor = W_CachePatchName("M_CURSOR", PU_STATIC);
cursor1 = W_CachePatchName("P1CURSOR", PU_STATIC);
cursor2 = W_CachePatchName("P2CURSOR", PU_STATIC);
cursor3 = W_CachePatchName("P3CURSOR", PU_STATIC);
cursor4 = W_CachePatchName("P4CURSOR", PU_STATIC);
randomlvl = W_CachePatchName("RANDOMLV", PU_STATIC);
timer = cv_votetime.value*TICRATE;
pickedvote = -1;
voteclient.selection = 0;
voteclient.delay = 0;
for (i = 0; i < 3; i++)
{
voteclient.playerinfo[i].selection = 0;
voteclient.playerinfo[i].delay = 0;
}
voteclient.ranim = 0;
voteclient.rtics = 1;
voteclient.roffset = 0;
@ -2450,12 +2554,12 @@ void Y_StartVote(void)
lumpnum_t lumpnum;
// set up the str
if (mapheaderinfo[votelevels[i]]->zonttl)
if (strlen(mapheaderinfo[votelevels[i]]->zonttl) > 0)
{
if (mapheaderinfo[votelevels[i]]->actnum)
if (strlen(mapheaderinfo[votelevels[i]]->actnum) > 0)
snprintf(levelinfo[i].str,
sizeof levelinfo[i].str,
"%.32s %.32s %d",
"%.32s %.32s %s",
mapheaderinfo[votelevels[i]]->lvlttl, mapheaderinfo[votelevels[i]]->zonttl, mapheaderinfo[votelevels[i]]->actnum);
else
snprintf(levelinfo[i].str,
@ -2465,10 +2569,10 @@ void Y_StartVote(void)
}
else
{
if (mapheaderinfo[votelevels[i]]->actnum)
if (strlen(mapheaderinfo[votelevels[i]]->actnum) > 0)
snprintf(levelinfo[i].str,
sizeof levelinfo[i].str,
"%.32s %d",
"%.32s %s",
mapheaderinfo[votelevels[i]]->lvlttl, mapheaderinfo[votelevels[i]]->actnum);
else
snprintf(levelinfo[i].str,
@ -2507,6 +2611,10 @@ static void Y_UnloadVoteData(void)
UNLOAD(widebgpatch);
UNLOAD(bgpatch);
UNLOAD(cursor);
UNLOAD(cursor1);
UNLOAD(cursor2);
UNLOAD(cursor3);
UNLOAD(cursor4);
UNLOAD(randomlvl);
UNLOAD(levelinfo[3].pic);
@ -2538,7 +2646,7 @@ void Y_SetupVoteFinish(SINT8 pick, SINT8 level)
for (i = 0; i < MAXPLAYERS; i++)
{
if ((playeringame[i] && !players[i].spectator) && votes[i] == -1 && !splitscreen)
if ((playeringame[i] && !players[i].spectator) && votes[i] == -1)
votes[i] = 3;
if (votes[i] == -1 || endtype > 1) // Don't need to go on
@ -2573,5 +2681,4 @@ void Y_SetupVoteFinish(SINT8 pick, SINT8 level)
pickedvote = pick;
nextmap = votelevels[level];
timer = 0;
S_ChangeMusicInternal("voteea", true);
}
}