Merge branch 'master' into sweet-new-kicks

This commit is contained in:
TehRealSalt 2018-10-10 13:43:05 -04:00
commit 0d56f68abc
39 changed files with 1210 additions and 786 deletions

View file

@ -2491,9 +2491,9 @@ static void CL_RemovePlayer(INT32 playernum)
LUA_InvalidatePlayer(&players[playernum]);
#endif
if (G_TagGametype()) //Check if you still have a game. Location flexible. =P
/*if (G_TagGametype()) //Check if you still have a game. Location flexible. =P
P_CheckSurvivors();
else if (G_BattleGametype()) // SRB2Kart
else*/ if (G_BattleGametype()) // SRB2Kart
K_CheckBumpers();
else if (G_RaceGametype())
P_CheckRacers();

View file

@ -796,10 +796,10 @@ void D_RegisterClientCommands(void)
CV_RegisterVar(&cv_consolechat);
CV_RegisterVar(&cv_chatnotifications);
CV_RegisterVar(&cv_chatbacktint);
CV_RegisterVar(&cv_crosshair);
CV_RegisterVar(&cv_crosshair2);
CV_RegisterVar(&cv_crosshair3);
CV_RegisterVar(&cv_crosshair4);
//CV_RegisterVar(&cv_crosshair);
//CV_RegisterVar(&cv_crosshair2);
//CV_RegisterVar(&cv_crosshair3);
//CV_RegisterVar(&cv_crosshair4);
//CV_RegisterVar(&cv_alwaysfreelook);
//CV_RegisterVar(&cv_alwaysfreelook2);
@ -915,19 +915,19 @@ void D_RegisterClientCommands(void)
COM_AddCommand("noclip", Command_CheatNoClip_f);
COM_AddCommand("god", Command_CheatGod_f);
COM_AddCommand("notarget", Command_CheatNoTarget_f);
COM_AddCommand("getallemeralds", Command_Getallemeralds_f);
/*COM_AddCommand("getallemeralds", Command_Getallemeralds_f);
COM_AddCommand("resetemeralds", Command_Resetemeralds_f);
COM_AddCommand("setrings", Command_Setrings_f);
COM_AddCommand("setlives", Command_Setlives_f);
COM_AddCommand("setcontinues", Command_Setcontinues_f);
COM_AddCommand("setcontinues", Command_Setcontinues_f);*/
COM_AddCommand("devmode", Command_Devmode_f);
COM_AddCommand("savecheckpoint", Command_Savecheckpoint_f);
COM_AddCommand("scale", Command_Scale_f);
COM_AddCommand("gravflip", Command_Gravflip_f);
COM_AddCommand("hurtme", Command_Hurtme_f);
COM_AddCommand("jumptoaxis", Command_JumpToAxis_f);
/*COM_AddCommand("jumptoaxis", Command_JumpToAxis_f);
COM_AddCommand("charability", Command_Charability_f);
COM_AddCommand("charspeed", Command_Charspeed_f);
COM_AddCommand("charspeed", Command_Charspeed_f);*/
COM_AddCommand("teleport", Command_Teleport_f);
COM_AddCommand("rteleport", Command_RTeleport_f);
COM_AddCommand("skynum", Command_Skynum_f);
@ -3260,9 +3260,9 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
}
// In tag, check to see if you still have a game.
if (G_TagGametype())
/*if (G_TagGametype())
P_CheckSurvivors();
else if (G_BattleGametype())
else*/ if (G_BattleGametype())
K_CheckBumpers(); // SRB2Kart
else if (G_RaceGametype())
P_CheckRacers(); // also SRB2Kart

View file

@ -284,6 +284,7 @@ typedef enum
k_voices, // Used to stop the player saying more voices than it should
k_tauntvoices, // Used to specifically stop taunt voice spam
k_instashield, // Instashield no-damage animation timer
k_enginesnd, // Engine sound number you're on.
k_floorboost, // Prevents Sneaker sounds for a breif duration when triggered by a floor panel
k_spinouttype, // Determines whether to thrust forward or not while spinning out; 0 = move forwards, 1 = stay still

View file

@ -2428,6 +2428,8 @@ static void readunlockable(MYFILE *f, INT32 num)
unlockables[num].type = SECRET_SOUNDTEST;
else if (fastcmp(word2, "ENCORE"))
unlockables[num].type = SECRET_ENCORE;
else if (fastcmp(word2, "HELLATTACK"))
unlockables[num].type = SECRET_HELLATTACK;
else
unlockables[num].type = (INT16)i;
}
@ -6712,6 +6714,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_PLAYERBOMB", // Player bomb overlay
"S_PLAYERITEM", // Player item overlay
"S_PLAYERFAKE", // Player fake overlay
"S_KARMAWHEEL", // Karma player wheels
@ -7750,6 +7753,7 @@ static const char *const KARTSTUFF_LIST[] = {
"VOICES",
"TAUNTVOICES",
"INSTASHIELD",
"ENGINESND",
"FLOORBOOST",
"SPINOUTTYPE",

View file

@ -546,6 +546,6 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
/// SRB2Kart: Camera always has noclip.
/// \note Kind of problematic. If we decide to keep this on, we'll need serious map changes.
//#define NOCLIPCAM
#define NOCLIPCAM
#endif // __DOOMDEF__

View file

@ -340,7 +340,7 @@ void SendWeaponPref2(void);
void SendWeaponPref3(void);
void SendWeaponPref4(void);
static CV_PossibleValue_t crosshair_cons_t[] = {{0, "Off"}, {1, "Cross"}, {2, "Angle"}, {3, "Point"}, {0, NULL}};
//static CV_PossibleValue_t crosshair_cons_t[] = {{0, "Off"}, {1, "Cross"}, {2, "Angle"}, {3, "Point"}, {0, NULL}};
static CV_PossibleValue_t joyaxis_cons_t[] = {{0, "None"},
#ifdef _WII
{1, "LStick.X"}, {2, "LStick.Y"}, {-1, "LStick.X-"}, {-2, "LStick.Y-"},
@ -428,10 +428,10 @@ consvar_t cv_chatbacktint = {"chatbacktint", "Off", CV_SAVE, CV_OnOff, NULL, 0,
static CV_PossibleValue_t consolechat_cons_t[] = {{0, "Window"}, {1, "Console"}, {0, NULL}};
consvar_t cv_consolechat = {"chatmode", "Window", CV_SAVE, consolechat_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_crosshair = {"crosshair", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_crosshair2 = {"crosshair2", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_crosshair3 = {"crosshair3", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_crosshair4 = {"crosshair4", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
/*consvar_t cv_crosshair = {"crosshair", "Off", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_crosshair2 = {"crosshair2", "Off", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_crosshair3 = {"crosshair3", "Off", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_crosshair4 = {"crosshair4", "Off", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};*/
consvar_t cv_invertmouse = {"invertmouse", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_alwaysfreelook = {"alwaysmlook", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_invertmouse2 = {"invertmouse2", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
@ -1812,25 +1812,41 @@ static INT32 spectatedelay, spectatedelay2, spectatedelay3, spectatedelay4 = 0;
boolean G_Responder(event_t *ev)
{
// allow spy mode changes even during the demo
if (gamestate == GS_LEVEL && ev->type == ev_keydown && ev->data1 == KEY_F12)
if (gamestate == GS_LEVEL && ev->type == ev_keydown
&& (ev->data1 == gamecontrol[gc_viewpoint][0] || ev->data1 == gamecontrol[gc_viewpoint][1]))
{
if (splitscreen || !netgame)
displayplayer = consoleplayer;
else
{
// spy mode
do
UINT8 i = 0; // spy mode
for (i = 0; i < MAXPLAYERS; i++)
{
displayplayer++;
if (displayplayer == MAXPLAYERS)
displayplayer = 0;
if (displayplayer == consoleplayer)
break; // End loop
if (!playeringame[displayplayer])
continue;
if (players[displayplayer].spectator)
continue;
// SRB2Kart: Only go through players who are actually playing
if (players[displayplayer].exiting)
continue;
// I don't know if we want this actually, but I'll humor the suggestion anyway
if (G_BattleGametype())
{
if (players[displayplayer].kartstuff[k_bumper] <= 0)
continue;
}
// SRB2Kart: we have no team-based modes, YET...
/*if (G_GametypeHasTeams())
{
if (players[consoleplayer].ctfteam
@ -1855,24 +1871,13 @@ boolean G_Responder(event_t *ev)
continue;
}*/
// SRB2Kart: Ehhh, who cares, Mario Kart's designed around screen-cheating anyway
/*if (gametype != GT_RACE)
{
if (players[consoleplayer].kartstuff[k_bumper] > 0)
continue;
}*/
break;
} while (displayplayer != consoleplayer);
}
// change statusbar also if playing back demo
if (singledemo)
ST_changeDemoView();
// tell who's the view
CONS_Printf(M_GetText("Viewpoint: %s\n"), player_names[displayplayer]);
P_ResetCamera(&players[displayplayer], &camera);
return true;
}
}
@ -2279,22 +2284,6 @@ static inline void G_PlayerFinishLevel(INT32 player)
if (player == consoleplayer)
{
if (legitimateexit && !demoplayback && !mapreset) // (yes you're allowed to unlock stuff this way when the game is modified)
{
UINT8 i = 0;
if (netgame)
{
// check to see if there's anyone else at all
for (; i < MAXPLAYERS; i++)
{
if (i == consoleplayer)
continue;
if (playeringame[i] && !stplyr->spectator)
break;
}
}
if (i != MAXPLAYERS) // Not FREE PLAY
{
matchesplayed++;
if (M_UpdateUnlockablesAndExtraEmblems(true))
@ -2303,7 +2292,6 @@ static inline void G_PlayerFinishLevel(INT32 player)
G_SaveGameData(true); // only save if unlocked something
}
}
}
legitimateexit = false;
}
@ -2519,6 +2507,7 @@ void G_PlayerReborn(INT32 player)
p->kartstuff[k_comebackpoints] = comebackpoints;
p->kartstuff[k_comebacktimer] = comebacktime;
p->kartstuff[k_wanted] = wanted;
p->kartstuff[k_eggmanblame] = -1;
// Don't do anything immediately
p->pflags |= PF_USEDOWN;
@ -2554,15 +2543,15 @@ void G_PlayerReborn(INT32 player)
p->maxlink = 0;
// If NiGHTS, find lowest mare to start with.
p->mare = P_FindLowestMare();
p->mare = 0; /*P_FindLowestMare();
CONS_Debug(DBG_NIGHTS, M_GetText("Current mare is %d\n"), p->mare);
if (p->mare == 255)
p->mare = 0;
p->mare = 0;*/
// Check to make sure their color didn't change somehow...
if (G_GametypeHasTeams())
/*if (G_GametypeHasTeams())
{
if (p->ctfteam == 1 && p->skincolor != skincolor_redteam)
{
@ -2586,7 +2575,7 @@ void G_PlayerReborn(INT32 player)
else if (p == &players[fourthdisplayplayer])
CV_SetValue(&cv_playercolor4, skincolor_blueteam);
}
}
}*/
}
//
@ -2967,8 +2956,6 @@ void G_DoReborn(INT32 playernum)
P_LoadThingsOnly();
P_ClearStarPost(player->starpostnum);
// Do a wipe
wipegamestate = -1;

View file

@ -55,7 +55,7 @@ extern INT16 rw_maximums[NUM_WEAPONS];
// used in game menu
extern consvar_t cv_chatwidth, cv_chatnotifications, cv_chatheight, cv_chattime, cv_consolechat, cv_chatspamprotection, cv_chatbacktint;
extern consvar_t cv_crosshair, cv_crosshair2, cv_crosshair3, cv_crosshair4;
//extern consvar_t cv_crosshair, cv_crosshair2, cv_crosshair3, cv_crosshair4;
extern consvar_t cv_invertmouse, cv_alwaysfreelook, cv_mousemove;
extern consvar_t cv_turnaxis,cv_moveaxis,cv_brakeaxis,cv_aimaxis,cv_lookaxis,cv_fireaxis,cv_driftaxis;
extern consvar_t cv_turnaxis2,cv_moveaxis2,cv_brakeaxis2,cv_aimaxis2,cv_lookaxis2,cv_fireaxis2,cv_driftaxis2;

View file

@ -1209,6 +1209,9 @@ static const char *gamecontrolname[num_gamecontrols] =
"console",
"pause",
"systemmenu",
"screenshot",
"recordgif",
"viewpoint",
"custom1",
"custom2",
"custom3",
@ -1293,6 +1296,9 @@ void G_Controldefault(void)
// Extra controls
gamecontrol[gc_pause ][0] = KEY_PAUSE;
gamecontrol[gc_console ][0] = KEY_CONSOLE;
gamecontrol[gc_screenshot ][0] = KEY_F8;
gamecontrol[gc_recordgif ][0] = KEY_F9;
gamecontrol[gc_viewpoint ][0] = KEY_F12;
gamecontrol[gc_talkkey ][0] = 't';
//gamecontrol[gc_teamkey ][0] = 'y';
gamecontrol[gc_scores ][0] = KEY_TAB;
@ -1303,11 +1309,11 @@ void G_Controldefault(void)
gamecontrol[gc_camreset ][0] = KEY_HOME;
gamecontrol[gc_camtoggle ][0] = KEY_BACKSPACE;
//gamecontrol[gc_viewpoint ][1] = KEY_JOY1+3; // Y
gamecontrol[gc_viewpoint ][1] = KEY_JOY1+3; // Y
gamecontrol[gc_pause ][1] = KEY_JOY1+6; // Back
gamecontrol[gc_systemmenu ][0] = KEY_JOY1+7; // Start
gamecontrol[gc_camtoggle ][1] = KEY_HAT1+0; // D-Pad Up
//gamecontrol[gc_screenshot ][1] = KEY_HAT1+1; // D-Pad Down
gamecontrol[gc_screenshot ][1] = KEY_HAT1+1; // D-Pad Down
gamecontrol[gc_talkkey ][1] = KEY_HAT1+2; // D-Pad Left
gamecontrol[gc_scores ][1] = KEY_HAT1+3; // D-Pad Right

View file

@ -115,6 +115,9 @@ typedef enum
gc_console,
gc_pause,
gc_systemmenu,
gc_screenshot,
gc_recordgif,
gc_viewpoint,
gc_custom1, // Lua scriptable
gc_custom2, // Lua scriptable
gc_custom3, // Lua scriptable

View file

@ -857,6 +857,10 @@ void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color)
else if (!(color & V_SNAPTOTOP))
fy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)) / 2;
}
if (color & V_SPLITSCREEN)
fy += ((float)BASEVIDHEIGHT * dupy)/2;
if (color & V_HORZSCREEN)
fx += ((float)BASEVIDWIDTH * dupx)/2;
}
if (fx >= vid.width || fy >= vid.height)
@ -963,6 +967,10 @@ void HWR_DrawConsoleFill(INT32 x, INT32 y, INT32 w, INT32 h, UINT32 color, INT32
else if (!(options & V_SNAPTOTOP))
fy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)) / 2;
}
if (options & V_SPLITSCREEN)
fy += ((float)BASEVIDHEIGHT * dupy)/2;
if (options & V_HORZSCREEN)
fx += ((float)BASEVIDWIDTH * dupx)/2;
}
if (fx >= vid.width || fy >= vid.height)

View file

@ -2813,12 +2813,15 @@ static void HWR_AddLine(seg_t * line)
SLOPEPARAMS( gr_backsector->c_slope, backc1, backc2, gr_backsector->ceilingheight)
#undef SLOPEPARAMS
if (viewsector != gr_backsector && viewsector != gr_frontsector)
{
// Closed door.
if ((backc1 <= frontf1 && backc2 <= frontf2)
|| (backf1 >= frontc1 && backf2 >= frontc2))
{
goto clipsolid;
}
}
// Window.
if (backc1 != frontc1 || backc2 != frontc2
@ -2829,11 +2832,14 @@ static void HWR_AddLine(seg_t * line)
}
else
#endif
{
if (viewsector != gr_backsector && viewsector != gr_frontsector)
{
// Closed door.
if (gr_backsector->ceilingheight <= gr_frontsector->floorheight ||
gr_backsector->floorheight >= gr_frontsector->ceilingheight)
goto clipsolid;
}
// Window.
if (gr_backsector->ceilingheight != gr_frontsector->ceilingheight ||

View file

@ -465,6 +465,7 @@ static void DoSayCommand(SINT8 target, size_t usedargs, UINT8 flags)
{
// what we're gonna do now is check if the node exists
// with that logic, characters 4 and 5 are our numbers:
const char *newmsg;
int spc = 1; // used if nodenum[1] is a space.
char *nodenum = (char*) malloc(3);
strncpy(nodenum, msg+3, 5);
@ -503,7 +504,7 @@ static void DoSayCommand(SINT8 target, size_t usedargs, UINT8 flags)
return;
}
buf[0] = target;
const char *newmsg = msg+5+spc;
newmsg = msg+5+spc;
memcpy(msg, newmsg, 252);
}
@ -607,6 +608,7 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum)
char *msg;
boolean action = false;
char *ptr;
int spam_eatmsg = 0;
CONS_Debug(DBG_NETPLAY,"Received SAY cmd from Player %d (%s)\n", playernum+1, player_names[playernum]);
@ -653,8 +655,6 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum)
}
}
int spam_eatmsg = 0;
// before we do anything, let's verify the guy isn't spamming, get this easier on us.
//if (stop_spamming_you_cunt[playernum] != 0 && cv_chatspamprotection.value && !(flags & HU_CSAY))
@ -896,9 +896,10 @@ static inline boolean HU_keyInChatString(char *s, char ch)
}
else if (ch == KEY_BACKSPACE)
{
size_t i;
if (c_input <= 0)
return false;
size_t i = c_input;
i = c_input;
if (!s[i-1])
return false;
@ -951,12 +952,14 @@ static void HU_queueChatChar(INT32 c)
char buf[2+256];
size_t ci = 2;
char *msg = &buf[2];
size_t i;
INT32 target = 0;
do {
c = w_chat[-2+ci++];
if (!c || (c >= ' ' && !(c & 0x80))) // copy printable characters and terminating '\0' only.
buf[ci-1]=c;
} while (c);
size_t i = 0;
i = 0;
for (;(i<HU_MAXMSGLEN);i++)
w_chat[i] = 0; // reset this.
@ -969,10 +972,11 @@ static void HU_queueChatChar(INT32 c)
return;
}
INT32 target = 0;
if (strlen(msg) > 4 && strnicmp(msg, "/pm", 3) == 0) // used /pm
{
int spc;
char *nodenum;
const char *newmsg;
// what we're gonna do now is check if the node exists
// with that logic, characters 4 and 5 are our numbers:
@ -983,8 +987,8 @@ static void HU_queueChatChar(INT32 c)
return;
}
int spc = 1; // used if nodenum[1] is a space.
char *nodenum = (char*) malloc(3);
spc = 1; // used if nodenum[1] is a space.
nodenum = (char*) malloc(3);
strncpy(nodenum, msg+3, 5);
// check for undesirable characters in our "number"
if (((nodenum[0] < '0') || (nodenum[0] > '9')) || ((nodenum[1] < '0') || (nodenum[1] > '9')))
@ -1021,7 +1025,7 @@ static void HU_queueChatChar(INT32 c)
return;
}
// we need to get rid of the /pm<node>
const char *newmsg = msg+5+spc;
newmsg = msg+5+spc;
memcpy(msg, newmsg, 255);
}
if (ci > 3) // don't send target+flags+empty message.
@ -1117,14 +1121,16 @@ boolean HU_Responder(event_t *ev)
if (((c == 'v' || c == 'V') && ctrldown) && !CHAT_MUTE)
{
const char *paste = I_ClipboardPaste();
size_t chatlen;
size_t pastelen;
// create a dummy string real quickly
if (paste == NULL)
return true;
size_t chatlen = strlen(w_chat);
size_t pastelen = strlen(paste);
chatlen = strlen(w_chat);
pastelen = strlen(paste);
if (chatlen+pastelen > HU_MAXMSGLEN)
return true; // we can't paste this!!
@ -1164,7 +1170,10 @@ boolean HU_Responder(event_t *ev)
c_input = 0; // reset input cursor
chat_scrollmedown = true; // you hit enter, so you might wanna autoscroll to see what you just sent. :)
}
else if (c == KEY_ESCAPE)
else if (c == KEY_ESCAPE
|| ((c == gamecontrol[gc_talkkey][0] || c == gamecontrol[gc_talkkey][1]
|| c == gamecontrol[gc_teamkey][0] || c == gamecontrol[gc_teamkey][1])
&& c >= KEY_MOUSE1)) // If it's not a keyboard key, then the chat button is used as a toggle.
{
chat_on = false;
c_input = 0; // reset input cursor
@ -1258,9 +1267,6 @@ INT16 chatx = 13, chaty = 169; // let's use this as our coordinates, shh
static void HU_drawMiniChat(void)
{
if (!chat_nummsg_min)
return; // needless to say it's useless to do anything if we don't have anything to draw.
INT32 x = chatx+2;
INT32 charwidth = 4, charheight = 6;
INT32 dx = 0, dy = 0;
@ -1269,6 +1275,10 @@ static void HU_drawMiniChat(void)
INT32 msglines = 0;
// process all messages once without rendering anything or doing anything fancy so that we know how many lines each message has...
INT32 y;
if (!chat_nummsg_min)
return; // needless to say it's useless to do anything if we don't have anything to draw.
for (; i>0; i--)
{
@ -1316,7 +1326,7 @@ static void HU_drawMiniChat(void)
msglines += linescount+1;
}
INT32 y = chaty - charheight*(msglines+1) - (cv_kartspeedometer.value ? 16 : 0);
y = chaty - charheight*(msglines+1) - (cv_kartspeedometer.value ? 16 : 0);
dx = 0;
dy = 0;
i = 0;
@ -1581,24 +1591,25 @@ static void HU_DrawChat(void)
// handle /pm list.
if (strnicmp(w_chat, "/pm", 3) == 0 && vid.width >= 400 && !teamtalk) // 320x200 unsupported kthxbai
{
i = 0;
INT32 count = 0;
INT32 p_dispy = chaty - charheight -1;
i = 0;
for(i=0; (i<MAXPLAYERS); i++)
{
// filter: (code needs optimization pls help I'm bad with C)
if (w_chat[3])
{
char *nodenum;
UINT32 n;
// right, that's half important: (w_chat[4] may be a space since /pm0 msg is perfectly acceptable!)
if ( ( ((w_chat[3] != 0) && ((w_chat[3] < '0') || (w_chat[3] > '9'))) || ((w_chat[4] != 0) && (((w_chat[4] < '0') || (w_chat[4] > '9'))))) && (w_chat[4] != ' '))
break;
char *nodenum = (char*) malloc(3);
nodenum = (char*) malloc(3);
strncpy(nodenum, w_chat+3, 4);
UINT32 n = atoi((const char*) nodenum); // turn that into a number
n = atoi((const char*) nodenum); // turn that into a number
// special cases:
if ((n == 0) && !(w_chat[4] == '0'))
@ -1723,7 +1734,7 @@ static void HU_DrawChat_Old(void)
//
// Crosshairs are pre-cached at HU_Init
static inline void HU_DrawCrosshair(void)
/*static inline void HU_DrawCrosshair(void)
{
INT32 i, x, y;
@ -1875,7 +1886,7 @@ static inline void HU_DrawCrosshair4(void)
V_DrawScaledPatch(x, y, V_NOSCALESTART|V_OFFSET|V_TRANSLUCENT, crosshair[i - 1]);
}
}
}*/
static void HU_DrawCEcho(void)
{
@ -2049,7 +2060,7 @@ void HU_Drawer(void)
return;
// draw the crosshair, not when viewing demos nor with chasecam
if (!automapactive && !demoplayback)
/*if (!automapactive && !demoplayback)
{
if (cv_crosshair.value && !camera.chase && !players[displayplayer].spectator)
HU_DrawCrosshair();
@ -2062,7 +2073,7 @@ void HU_Drawer(void)
if (cv_crosshair4.value && !camera4.chase && !players[fourthdisplayplayer].spectator)
HU_DrawCrosshair4();
}
}*/
// draw desynch text
if (hu_resynching)
@ -2164,6 +2175,7 @@ void HU_drawPing(INT32 x, INT32 y, INT32 ping, boolean notext)
UINT8 barcolor = 128; // color we use for the bars (green, yellow or red)
SINT8 i = 0;
SINT8 yoffset = 6;
INT32 dx;
if (ping < 128)
{
numbars = 3;
@ -2175,7 +2187,7 @@ void HU_drawPing(INT32 x, INT32 y, INT32 ping, boolean notext)
barcolor = 103;
}
INT32 dx = x+1 - (V_SmallStringWidth(va("%dms", ping), V_ALLOWLOWERCASE)/2);
dx = x+1 - (V_SmallStringWidth(va("%dms", ping), V_ALLOWLOWERCASE)/2);
if (!notext || vid.width >= 640) // how sad, we're using a shit resolution.
V_DrawSmallString(dx, y+4, V_ALLOWLOWERCASE, va("%dms", ping));

View file

@ -3009,6 +3009,7 @@ state_t states[NUMSTATES] =
{SPR_PBOM, FF_ANIMATE, -1, {NULL}, 3, 3, S_NULL}, // S_PLAYERBOMB
{SPR_RNDM, FF_ANIMATE, -1, {NULL}, 23, 3, S_NULL}, // S_PLAYERITEM
{SPR_FITM, FF_ANIMATE, -1, {NULL}, 23, 3, S_NULL}, // S_PLAYERFAKE
{SPR_PBOM, 4, -1, {NULL}, 0, 0, S_NULL}, // S_KARMAWHEEL
@ -17162,7 +17163,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
sfx_kc2e, // seesound
8, // reactiontime
sfx_s3k4e, // attacksound
S_NULL, // painstate
S_PLAYERFAKE, // painstate
0, // painchance
sfx_None, // painsound
S_NULL, // meleestate

View file

@ -3559,6 +3559,7 @@ typedef enum state
S_PLAYERBOMB,
S_PLAYERITEM,
S_PLAYERFAKE,
S_KARMAWHEEL,

View file

@ -256,8 +256,6 @@ UINT8 colortranslations[MAXSKINCOLORS][16] = {
*/
};
//#define SALLYALTRAINBOW // Sal's edited version of the below, which keeps a colors' lightness, and looks better with hue-shifted colors like Ruby & Dream. Not strictly *better*, just different...
// Define for getting accurate color brightness readings according to how the human eye sees them.
// https://en.wikipedia.org/wiki/Relative_luminance
// 0.2126 to red
@ -277,7 +275,6 @@ void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor)
INT32 i;
RGBA_t color;
UINT8 brightness;
#ifndef SALLYALTRAINBOW
INT32 j;
UINT8 colorbrightnesses[16];
UINT16 brightdif;
@ -289,7 +286,6 @@ void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor)
color = V_GetColor(colortranslations[skincolor][i]);
SETBRIGHTNESS(colorbrightnesses[i], color.s.red, color.s.green, color.s.blue);
}
#endif
// next, for every colour in the palette, choose the transcolor that has the closest brightness
for (i = 0; i < NUM_PALETTE_ENTRIES; i++)
@ -301,10 +297,6 @@ void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor)
}
color = V_GetColor(i);
SETBRIGHTNESS(brightness, color.s.red, color.s.green, color.s.blue);
#ifdef SALLYALTRAINBOW
brightness = 15-(brightness/16); // Yes, 15.
dest_colormap[i] = colortranslations[skincolor][brightness];
#else
brightdif = 256;
for (j = 0; j < 16; j++)
{
@ -315,7 +307,6 @@ void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor)
dest_colormap[i] = colortranslations[skincolor][j];
}
}
#endif
}
}
@ -905,12 +896,12 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd)
if ((player->kartstuff[k_itemroulette] % 3) == 1 && P_IsLocalPlayer(player))
S_StartSound(NULL, sfx_mkitm1 + ((player->kartstuff[k_itemroulette] / 3) % 8));
roulettestop = (TICRATE*1) + (3*(pingame - player->kartstuff[k_position]));
roulettestop = TICRATE + (3*(pingame - player->kartstuff[k_position]));
// If the roulette finishes or the player presses BT_ATTACK, stop the roulette and calculate the item.
// I'm returning via the exact opposite, however, to forgo having another bracket embed. Same result either way, I think.
// Finally, if you get past this check, now you can actually start calculating what item you get.
if ((cmd->buttons & BT_ATTACK) && !(player->kartstuff[k_eggmanheld] || player->kartstuff[k_itemheld]) && player->kartstuff[k_itemroulette] >= roulettestop)
if ((cmd->buttons & BT_ATTACK) && !(player->kartstuff[k_eggmanheld] || player->kartstuff[k_itemheld]) && player->kartstuff[k_itemroulette] >= roulettestop && !modeattacking)
{
// Mashing reduces your chances for the good items
mashed = FixedDiv((player->kartstuff[k_itemroulette])*FRACUNIT, ((TICRATE*3)+roulettestop)*FRACUNIT) - FRACUNIT;
@ -1811,10 +1802,19 @@ void K_SpinPlayer(player_t *player, mobj_t *source, INT32 type, boolean trapitem
K_CalculateBattleWanted();
}
K_CheckBumpers();
if (!player->kartstuff[k_bumper])
{
player->kartstuff[k_comebacktimer] = comebacktime;
if (player->kartstuff[k_comebackmode] == 2)
{
mobj_t *poof = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_EXPLODE);
S_StartSound(poof, mobjinfo[MT_KARMAHITBOX].seesound);
player->kartstuff[k_comebackmode] = 0;
}
}
player->kartstuff[k_comebacktimer] = comebacktime;
K_CheckBumpers();
}
player->kartstuff[k_spinouttype] = type;
@ -1893,10 +1893,19 @@ void K_SquishPlayer(player_t *player, mobj_t *source)
K_CalculateBattleWanted();
}
K_CheckBumpers();
if (!player->kartstuff[k_bumper])
{
player->kartstuff[k_comebacktimer] = comebacktime;
if (player->kartstuff[k_comebackmode] == 2)
{
mobj_t *poof = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_EXPLODE);
S_StartSound(poof, mobjinfo[MT_KARMAHITBOX].seesound);
player->kartstuff[k_comebackmode] = 0;
}
}
player->kartstuff[k_comebacktimer] = comebacktime;
K_CheckBumpers();
}
player->kartstuff[k_squishedtimer] = 2*TICRATE;
@ -1939,6 +1948,9 @@ void K_ExplodePlayer(player_t *player, mobj_t *source) // A bit of a hack, we ju
return;
}
if (source && source != player->mo && source->player)
K_PlayHitEmSound(source);
player->mo->momz = 18*(mapheaderinfo[gamemap-1]->mobj_scale);
player->mo->momx = player->mo->momy = 0;
@ -1969,10 +1981,19 @@ void K_ExplodePlayer(player_t *player, mobj_t *source) // A bit of a hack, we ju
K_CalculateBattleWanted();
}
K_CheckBumpers();
if (!player->kartstuff[k_bumper])
{
player->kartstuff[k_comebacktimer] = comebacktime;
if (player->kartstuff[k_comebackmode] == 2)
{
mobj_t *poof = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_EXPLODE);
S_StartSound(poof, mobjinfo[MT_KARMAHITBOX].seesound);
player->kartstuff[k_comebackmode] = 0;
}
}
player->kartstuff[k_comebacktimer] = comebacktime;
K_CheckBumpers();
}
player->kartstuff[k_spinouttype] = 1;
player->kartstuff[k_spinouttimer] = 2*TICRATE+(TICRATE/2);
@ -2183,6 +2204,7 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
dust->angle = (ANGLE_180/16) * i;
P_SetScale(dust, source->scale);
dust->destscale = source->scale*10;
dust->scalespeed = FixedMul(dust->scalespeed, source->scale);
P_InstaThrust(dust, dust->angle, FixedMul(20*FRACUNIT, source->scale));
truc = P_SpawnMobj(source->x + P_RandomRange(-radius, radius)*FRACUNIT,
@ -2190,6 +2212,7 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
source->z + P_RandomRange(0, height)*FRACUNIT, MT_BOOMEXPLODE);
P_SetScale(truc, source->scale);
truc->destscale = source->scale*6;
truc->scalespeed = FixedMul(truc->scalespeed, source->scale);
speed = FixedMul(10*FRACUNIT, source->scale)>>FRACBITS;
truc->momx = P_RandomRange(-speed, speed)*FRACUNIT;
truc->momy = P_RandomRange(-speed, speed)*FRACUNIT;
@ -2205,6 +2228,7 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
source->z + P_RandomRange(0, height)*FRACUNIT, MT_SMOKE);
P_SetScale(dust, source->scale);
dust->destscale = source->scale*10;
dust->scalespeed = FixedMul(dust->scalespeed, source->scale);
dust->tics = 30;
dust->momz = P_RandomRange(FixedMul(3*FRACUNIT, source->scale)>>FRACBITS, FixedMul(7*FRACUNIT, source->scale)>>FRACBITS)*FRACUNIT;
@ -2213,6 +2237,7 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
source->z + P_RandomRange(0, height)*FRACUNIT, MT_BOOMPARTICLE);
P_SetScale(truc, source->scale);
truc->destscale = source->scale*5;
truc->scalespeed = FixedMul(truc->scalespeed, source->scale);
speed = FixedMul(20*FRACUNIT, source->scale)>>FRACBITS;
truc->momx = P_RandomRange(-speed, speed)*FRACUNIT;
truc->momy = P_RandomRange(-speed, speed)*FRACUNIT;
@ -2537,7 +2562,7 @@ void K_SpawnWipeoutTrail(mobj_t *mo, boolean translucent)
I_Assert(mo != NULL);
I_Assert(!P_MobjWasRemoved(mo));
dust = P_SpawnMobj(mo->x + (P_RandomRange(-25,25)<<FRACBITS), mo->y + (P_RandomRange(-25,25)<<FRACBITS), mo->z, MT_WIPEOUTTRAIL);
dust = P_SpawnMobj(mo->x + (P_RandomRange(-25,25) * mo->scale), mo->y + (P_RandomRange(-25,25) * mo->scale), mo->z, MT_WIPEOUTTRAIL);
P_SetTarget(&dust->target, mo);
dust->angle = R_PointToAngle2(0,0,mo->momx,mo->momy);
@ -2606,45 +2631,17 @@ void K_DriftDustHandling(mobj_t *spawner)
{
dust->z += spawner->height - dust->height;
}
dust->momx = FixedMul(spawner->momx + (P_RandomRange(-speedrange, speedrange)<<FRACBITS), 3*FRACUNIT/4);
dust->momy = FixedMul(spawner->momy + (P_RandomRange(-speedrange, speedrange)<<FRACBITS), 3*FRACUNIT/4);
dust->momz = P_MobjFlip(spawner) * P_RandomRange(1, 4)<<FRACBITS;
dust->momx = FixedMul(spawner->momx + (P_RandomRange(-speedrange, speedrange)<<FRACBITS), 3*(spawner->scale)/4);
dust->momy = FixedMul(spawner->momy + (P_RandomRange(-speedrange, speedrange)<<FRACBITS), 3*(spawner->scale)/4);
dust->momz = P_MobjFlip(spawner) * (P_RandomRange(1, 4) * (spawner->scale));
P_SetScale(dust, spawner->scale/2);
dust->destscale = spawner->scale * 3;
dust->scalespeed = FixedMul(dust->scalespeed, spawner->scale);
if (leveltime % 6 == 0)
S_StartSound(spawner, sfx_screec);
// Now time for a bunch of flag shit, groooooaann...
if (spawner->flags2 & MF2_DONTDRAW)
dust->flags2 |= MF2_DONTDRAW;
else
dust->flags2 &= ~MF2_DONTDRAW;
if (spawner->eflags & MFE_VERTICALFLIP)
dust->eflags |= MFE_VERTICALFLIP;
else
dust->eflags &= ~MFE_VERTICALFLIP;
if (spawner->eflags & MFE_DRAWONLYFORP1)
dust->eflags |= MFE_DRAWONLYFORP1;
else
dust->eflags &= ~MFE_DRAWONLYFORP1;
if (spawner->eflags & MFE_DRAWONLYFORP2)
dust->eflags |= MFE_DRAWONLYFORP2;
else
dust->eflags &= ~MFE_DRAWONLYFORP2;
if (spawner->eflags & MFE_DRAWONLYFORP3)
dust->eflags |= MFE_DRAWONLYFORP3;
else
dust->eflags &= ~MFE_DRAWONLYFORP3;
if (spawner->eflags & MFE_DRAWONLYFORP4)
dust->eflags |= MFE_DRAWONLYFORP4;
else
dust->eflags &= ~MFE_DRAWONLYFORP4;
K_MatchGenericExtraFlags(dust, spawner);
}
}
@ -2856,6 +2853,7 @@ static void K_DoThunderShield(player_t *player)
int i = 0;
fixed_t sx;
fixed_t sy;
angle_t an;
S_StartSound(player->mo, sfx_zio3);
//player->kartstuff[k_thunderanim] = 35;
@ -2885,7 +2883,7 @@ static void K_DoThunderShield(player_t *player)
}
// spawn the radius thing:
angle_t an = ANGLE_22h;
an = ANGLE_22h;
for (i=0; i<15; i++)
{
sx = player->mo->x + FixedMul((player->mo->scale*THUNDERRADIUS), FINECOSINE((an*i)>>ANGLETOFINESHIFT));
@ -2997,6 +2995,7 @@ void K_DoSneaker(player_t *player, INT32 type)
S_StartSound(player->mo, sfx_cdfm01);
if (intendedboost > player->kartstuff[k_speedboost])
player->kartstuff[k_destboostcam] = FixedMul(FRACUNIT, FixedDiv((intendedboost - player->kartstuff[k_speedboost]), intendedboost));
K_SpawnDashDustRelease(player);
}
if (!player->kartstuff[k_sneakertimer])
@ -3028,7 +3027,6 @@ void K_DoSneaker(player_t *player, INT32 type)
}
player->kartstuff[k_sneakertimer] = sneakertime;
K_SpawnDashDustRelease(player);
if (type != 0)
{
@ -3772,6 +3770,78 @@ player_t *K_FindJawzTarget(mobj_t *actor, player_t *source)
return wtarg;
}
// Engine Sounds.
static void K_UpdateEngineSounds(player_t *player, ticcmd_t *cmd)
{
const INT32 numsnds = 13;
INT32 class = ((player->kartspeed-1)/3) + (3*((player->kartweight-1)/3)); // engine class number
INT32 numcloseplayers = 0;
UINT8 volume = 255;
INT32 targetsnd = 0;
INT32 i;
// Silence the engines
if (leveltime < 8 || player->spectator || player->exiting)
{
player->kartstuff[k_enginesnd] = 0; // Reset sound number
return;
}
#if 0
if ((leveltime % 8) != ((player-players) % 8)) // Per-player offset, to make engines sound distinct!
#else
if (leveltime % 8) // .25 seconds of wait time between engine sounds
#endif
return;
if ((leveltime >= starttime-(2*TICRATE) && leveltime <= starttime) || (player->kartstuff[k_respawn] == 1)) // Startup boosts
targetsnd = ((cmd->buttons & BT_ACCELERATE) ? 12 : 0);
else
targetsnd = (((6*cmd->forwardmove)/25) + ((player->speed / mapheaderinfo[gamemap-1]->mobj_scale)/5))/2;
if (targetsnd < 0)
targetsnd = 0;
if (targetsnd > 12)
targetsnd = 12;
if (player->kartstuff[k_enginesnd] < targetsnd)
player->kartstuff[k_enginesnd]++;
if (player->kartstuff[k_enginesnd] > targetsnd)
player->kartstuff[k_enginesnd]--;
if (player->kartstuff[k_enginesnd] < 0)
player->kartstuff[k_enginesnd] = 0;
if (player->kartstuff[k_enginesnd] > 12)
player->kartstuff[k_enginesnd] = 12;
// Display player's engines are quieter
if ((player == &players[displayplayer])
|| (player == &players[secondarydisplayplayer] && splitscreen)
|| (player == &players[thirddisplayplayer] && splitscreen > 1)
|| (player == &players[fourthdisplayplayer] && splitscreen > 2))
volume = FixedDiv(volume<<FRACBITS, FixedSqrt(((splitscreen+1)*3)<<FRACBITS))>>FRACBITS;
else
{
for (i = 0; i < MAXPLAYERS; i++)
{
if (!playeringame[i] || !players[i].mo || players[i].spectator || players[i].exiting)
continue;
if ((i == displayplayer)
|| (i == secondarydisplayplayer && splitscreen)
|| (i == thirddisplayplayer && splitscreen > 1)
|| (i == fourthdisplayplayer && splitscreen > 2))
continue;
if (P_AproxDistance(P_AproxDistance(player->mo->x-players[i].mo->x,
player->mo->y-players[i].mo->y), player->mo->z-players[i].mo->z) <= 3072<<FRACBITS) // engine sounds' approx. range
numcloseplayers++;
}
if (numcloseplayers > 1)
volume = FixedDiv(volume<<FRACBITS, FixedSqrt(numcloseplayers<<FRACBITS))>>FRACBITS;
}
S_StartSoundAtVolume(player->mo, (sfx_krta00 + player->kartstuff[k_enginesnd]) + (class*numsnds), volume);
}
/** \brief Decreases various kart timers and powers per frame. Called in P_PlayerThink in p_user.c
\param player player object passed from P_PlayerThink
@ -3782,14 +3852,15 @@ player_t *K_FindJawzTarget(mobj_t *actor, player_t *source)
void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
{
K_UpdateOffroad(player);
K_UpdateEngineSounds(player, cmd);
K_GetKartBoostPower(player);
// Speed lines
if ((player->kartstuff[k_sneakertimer] || player->kartstuff[k_driftboost] || player->kartstuff[k_startboost]) && player->speed > 0)
{
mobj_t *fast = P_SpawnMobj(player->mo->x + (P_RandomRange(-36,36)<<FRACBITS),
player->mo->y + (P_RandomRange(-36,36)<<FRACBITS),
player->mo->z + (player->mo->height/2) + (P_RandomRange(-20,20)<<FRACBITS),
mobj_t *fast = P_SpawnMobj(player->mo->x + (P_RandomRange(-36,36) * player->mo->scale),
player->mo->y + (P_RandomRange(-36,36) * player->mo->scale),
player->mo->z + (player->mo->height/2) + (P_RandomRange(-20,20) * player->mo->scale),
MT_FASTLINE);
fast->angle = R_PointToAngle2(0, 0, player->mo->momx, player->mo->momy);
fast->momx = 3*player->mo->momx/4;
@ -4526,8 +4597,11 @@ void K_StripOther(player_t *player)
player->kartstuff[k_invincibilitytimer] = 0;
player->kartstuff[k_growshrinktimer] = 0;
if (player->kartstuff[k_eggmanexplode])
{
player->kartstuff[k_eggmanexplode] = 0;
player->kartstuff[k_eggmanblame] = 0;
player->kartstuff[k_eggmanblame] = -1;
}
}
//
@ -4572,14 +4646,29 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
{
mobj_t *newitem;
if (player->kartstuff[k_comebackmode] == 1)
{
newitem = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_RANDOMITEM);
newitem->threshold = 69; // selected "randomly".
}
else
{
newitem = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_FAKEITEM);
if (player->kartstuff[k_eggmanblame] >= 0
&& player->kartstuff[k_eggmanblame] < MAXPLAYERS
&& playeringame[player->kartstuff[k_eggmanblame]]
&& !players[player->kartstuff[k_eggmanblame]].spectator
&& players[player->kartstuff[k_eggmanblame]].mo)
P_SetTarget(&newitem->target, players[player->kartstuff[k_eggmanblame]].mo);
player->kartstuff[k_eggmanblame] = -1;
}
newitem->flags2 = (player->mo->flags2 & MF2_OBJECTFLIP);
newitem->fuse = 15*TICRATE; // selected randomly.
player->kartstuff[k_comebackmode] = 0;
player->kartstuff[k_comebacktimer] = comebacktime;
S_StartSound(player->mo, sfx_s254);
newitem = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_RANDOMITEM);
newitem->flags2 = (player->mo->flags2 & MF2_OBJECTFLIP);
newitem->fuse = 15*TICRATE; // selected randomly.
newitem->threshold = 69; // selected "randomly".
}
// Eggman Monitor exploding
else if (player->kartstuff[k_eggmanexplode])
@ -6088,7 +6177,7 @@ static void K_drawKartItem(void)
// Quick Eggman numbers
if (stplyr->kartstuff[k_eggmanexplode] > 1 /*&& stplyr->kartstuff[k_eggmanexplode] <= 3*TICRATE*/)
V_DrawScaledPatch(ITEM_X+17-offset, ITEM_Y+13-offset, V_HUDTRANS|splitflags, kp_eggnum[min(3, G_TicsToSeconds(stplyr->kartstuff[k_eggmanexplode]))]);
V_DrawScaledPatch(ITEM_X+17, ITEM_Y+13-offset, V_HUDTRANS|splitflags, kp_eggnum[min(3, G_TicsToSeconds(stplyr->kartstuff[k_eggmanexplode]))]);
}
void K_drawKartTimestamp(tic_t drawtime, INT32 TX, INT32 TY, INT16 emblemmap, boolean playing)

View file

@ -92,9 +92,10 @@ static int lib_print(lua_State *L)
static int lib_chatprint(lua_State *L)
{
const char *str = luaL_checkstring(L, 1); // retrieve string
int len;
if (str == NULL) // error if we don't have a string!
return luaL_error(L, LUA_QL("tostring") " must return a string to " LUA_QL("chatprint"));
int len = strlen(str);
len = strlen(str);
if (len > 255) // string is too long!!!
return luaL_error(L, "String exceeds the 255 characters limit of the chat buffer.");
@ -113,6 +114,8 @@ static int lib_chatprintf(lua_State *L)
{
int n = lua_gettop(L); /* number of arguments */
player_t *plr;
const char *str;
int len;
if (n < 2)
return luaL_error(L, "chatprintf requires at least two arguments: player and text.");
@ -122,10 +125,10 @@ static int lib_chatprintf(lua_State *L)
if (plr != &players[consoleplayer])
return 0;
const char *str = luaL_checkstring(L, 2); // retrieve string
str = luaL_checkstring(L, 2); // retrieve string
if (str == NULL) // error if we don't have a string!
return luaL_error(L, LUA_QL("tostring") " must return a string to " LUA_QL("chatprintf"));
int len = strlen(str);
len = strlen(str);
if (len > 255) // string is too long!!!
return luaL_error(L, "String exceeds the 255 characters limit of the chat buffer.");

View file

@ -377,7 +377,7 @@ void Command_Hurtme_f(void)
}
// Moves the NiGHTS player to another axis within the current mare
void Command_JumpToAxis_f(void)
/*void Command_JumpToAxis_f(void)
{
REQUIRE_DEVMODE;
REQUIRE_INLEVEL;
@ -438,7 +438,7 @@ void Command_Charspeed_f(void)
players[consoleplayer].actionspd = atoi(COM_Argv(2))<<FRACBITS;
else
CONS_Printf(M_GetText("charspeed <normalspeed/runspeed/thrustfactor/accelstart/acceleration/actionspd> <value>: set character speed\n"));
}
}*/
void Command_RTeleport_f(void)
{
@ -683,7 +683,7 @@ void Command_Savecheckpoint_f(void)
}
// Like M_GetAllEmeralds() but for console devmode junkies.
void Command_Getallemeralds_f(void)
/*void Command_Getallemeralds_f(void)
{
REQUIRE_SINGLEPLAYER;
REQUIRE_NOULTIMATE;
@ -702,7 +702,7 @@ void Command_Resetemeralds_f(void)
emeralds = 0;
CONS_Printf(M_GetText("Emeralds reset to zero.\n"));
}
}*/
void Command_Devmode_f(void)
{
@ -730,7 +730,7 @@ void Command_Devmode_f(void)
G_SetGameModified(multiplayer);
}
void Command_Setrings_f(void)
/*void Command_Setrings_f(void)
{
REQUIRE_INLEVEL;
REQUIRE_SINGLEPLAYER;
@ -785,7 +785,7 @@ void Command_Setcontinues_f(void)
G_SetGameModified(multiplayer);
}
}
}*/
//
// OBJECTPLACE (and related variables)

View file

@ -48,18 +48,18 @@ void Command_CheatNoClip_f(void);
void Command_CheatGod_f(void);
void Command_CheatNoTarget_f(void);
void Command_Savecheckpoint_f(void);
void Command_Getallemeralds_f(void);
/*void Command_Getallemeralds_f(void);
void Command_Resetemeralds_f(void);
void Command_Setrings_f(void);
void Command_Setlives_f(void);
void Command_Setcontinues_f(void);
void Command_Setcontinues_f(void);*/
void Command_Devmode_f(void);
void Command_Scale_f(void);
void Command_Gravflip_f(void);
void Command_Hurtme_f(void);
void Command_JumpToAxis_f(void);
/*void Command_JumpToAxis_f(void);
void Command_Charability_f(void);
void Command_Charspeed_f(void);
void Command_Charspeed_f(void);*/
void Command_Teleport_f(void);
void Command_RTeleport_f(void);
void Command_Skynum_f(void);

View file

@ -102,8 +102,9 @@ unlockable_t unlockables[MAXUNLOCKABLES] =
/* 03 */ {"Chao Cup", "", -1, 3, SECRET_NONE, 0, false, false, 0},
/* 04 */ {"Encore Mode", "", 3, 4, SECRET_ENCORE, 0, false, false, 0},
/* 05 */ {"Hell Attack", "", 5, 5, SECRET_HELLATTACK, 0, false, false, 0},
/* 05 */ {"Record Attack", "", -1, -1, SECRET_RECORDATTACK, 0, true, true, 0},
/* 06 */ {"Record Attack", "", -1, -1, SECRET_RECORDATTACK, 0, true, true, 0},
};
// Default number of emblems and extra emblems
@ -127,10 +128,13 @@ void M_SetupDefaultConditionSets(void)
M_AddRawCondition(3, 1, UC_TOTALEMBLEMS, 30, 0, 0);
M_AddRawCondition(3, 2, UC_MATCHESPLAYED, 50, 0, 0);
// -- 4: Collect 50 emblems OR play 150 matches
M_AddRawCondition(4, 1, UC_TOTALEMBLEMS, 50, 0, 0);
// -- 4: Collect 40 emblems OR play 150 matches
M_AddRawCondition(4, 1, UC_TOTALEMBLEMS, 40, 0, 0);
M_AddRawCondition(4, 2, UC_MATCHESPLAYED, 150, 0, 0);
// -- 5: Collect 50 emblems ONLY
M_AddRawCondition(5, 1, UC_TOTALEMBLEMS, 50, 0, 0);
// -- 10: Play 100 matches
M_AddRawCondition(10, 1, UC_MATCHESPLAYED, 100, 0, 0);
}

View file

@ -125,6 +125,7 @@ typedef struct
#define SECRET_SOUNDTEST 3 // Sound Test
#define SECRET_CREDITS 4 // Enables Credits
#define SECRET_ENCORE 5 // Enables Encore mode cvar
#define SECRET_HELLATTACK 6 // Map Hell in record attack
// If you have more secrets than these variables allow in your game,
// you seriously need to get a life.

View file

@ -288,8 +288,7 @@ static void M_SetupMultiPlayer4(INT32 choice);
// Options
// Split into multiple parts due to size
// Controls
menu_t OP_ControlsDef, /*OP_ControlListDef,*/ OP_MoveControlsDef;
menu_t /*OP_MPControlsDef, OP_CameraControlsDef, OP_MiscControlsDef,*/ OP_CustomControlsDef, OP_SpectateControlsDef;
menu_t OP_ControlsDef, OP_AllControlsDef;
menu_t OP_MouseOptionsDef, OP_Mouse2OptionsDef;
menu_t OP_Joystick1Def, OP_Joystick2Def;
#ifndef NOFOURPLAYER
@ -1113,8 +1112,12 @@ static menuitem_t OP_ControlsMenu[] =
#endif
};
static menuitem_t OP_MoveControlsMenu[] =
static menuitem_t OP_AllControlsMenu[] =
{
{IT_SUBMENU|IT_STRING, NULL, "Gamepad Options...", &OP_Joystick1Def, 0},
//{IT_SPACE, NULL, NULL, NULL, 0},
{IT_HEADER, NULL, "Gameplay Controls", NULL, 0},
{IT_SPACE, NULL, NULL, NULL, 0},
{IT_CONTROL, NULL, "Accelerate", M_ChangeControl, gc_accelerate },
{IT_CONTROL, NULL, "Turn Left", M_ChangeControl, gc_turnleft },
{IT_CONTROL, NULL, "Turn Right", M_ChangeControl, gc_turnright },
@ -1124,77 +1127,32 @@ static menuitem_t OP_MoveControlsMenu[] =
{IT_CONTROL, NULL, "Aim Forward", M_ChangeControl, gc_aimforward },
{IT_CONTROL, NULL, "Aim Backward", M_ChangeControl, gc_aimbackward},
{IT_CONTROL, NULL, "Look Backward", M_ChangeControl, gc_lookback },
{IT_SPACE, NULL, "", NULL, 76},
{IT_CONTROL, NULL, "Talk key", M_ChangeControl, gc_talkkey },
//{IT_CONTROL, NULL, "Team-Talk key", M_ChangeControl, gc_teamkey },
{IT_CONTROL, NULL, "Rankings/Scores", M_ChangeControl, gc_scores },
{IT_CONTROL, NULL, "Open/Close Menu (ESC)", M_ChangeControl, gc_systemmenu},
{IT_HEADER, NULL, "Miscelleanous Controls", NULL, 0},
{IT_SPACE, NULL, NULL, NULL, 0},
{IT_CONTROL, NULL, "Chat", M_ChangeControl, gc_talkkey },
//{IT_CONTROL, NULL, "Team Chat", M_ChangeControl, gc_teamkey },
{IT_CONTROL, NULL, "Show Rankings", M_ChangeControl, gc_scores },
{IT_CONTROL, NULL, "Change Viewpoint", M_ChangeControl, gc_viewpoint },
{IT_CONTROL, NULL, "Reset Camera", M_ChangeControl, gc_camreset },
{IT_CONTROL, NULL, "Toggle First-Person", M_ChangeControl, gc_camtoggle },
{IT_CONTROL, NULL, "Pause", M_ChangeControl, gc_pause },
{IT_CONTROL, NULL, "Console", M_ChangeControl, gc_console },
{IT_SUBMENU | IT_STRING, NULL, "Gamepad Options...", &OP_Joystick1Def, 120},
{IT_SUBMENU | IT_STRING, NULL, "Spectator Controls...", &OP_SpectateControlsDef, 128},
{IT_SUBMENU | IT_STRING, NULL, "Custom Lua Actions...", &OP_CustomControlsDef, 136},
};
static menuitem_t OP_SpectateControlsMenu[] =
{
{IT_CONTROL, NULL, "Screenshot", M_ChangeControl, gc_screenshot },
{IT_CONTROL, NULL, "Toggle GIF Recording", M_ChangeControl, gc_recordgif },
{IT_CONTROL, NULL, "Open/Close Menu (ESC)", M_ChangeControl, gc_systemmenu },
{IT_CONTROL, NULL, "Developer Console", M_ChangeControl, gc_console },
{IT_HEADER, NULL, "Spectator Controls", NULL, 0},
{IT_SPACE, NULL, NULL, NULL, 0},
{IT_CONTROL, NULL, "Become Spectator", M_ChangeControl, gc_spectate },
{IT_CONTROL, NULL, "Look Up", M_ChangeControl, gc_lookup },
{IT_CONTROL, NULL, "Look Down", M_ChangeControl, gc_lookdown },
{IT_CONTROL, NULL, "Center View", M_ChangeControl, gc_centerview },
{IT_CONTROL, NULL, "Reset Camera", M_ChangeControl, gc_camreset },
{IT_CONTROL, NULL, "Toggle Chasecam", M_ChangeControl, gc_camtoggle },
{IT_STRING | IT_CVAR, NULL, "Chasecam" , &cv_chasecam , 52},
{IT_STRING | IT_CVAR, NULL, "Crosshair", &cv_crosshair, 60},
};
static menuitem_t OP_CustomControlsMenu[] =
{
{IT_HEADER, NULL, "Custom Lua Actions", NULL, 0},
{IT_SPACE, NULL, NULL, NULL, 0},
{IT_CONTROL, NULL, "Custom Action 1", M_ChangeControl, gc_custom1 },
{IT_CONTROL, NULL, "Custom Action 2", M_ChangeControl, gc_custom2 },
{IT_CONTROL, NULL, "Custom Action 3", M_ChangeControl, gc_custom3 },
};
// Obsolete thanks to Kart
/*static menuitem_t OP_MPControlsMenu[] =
{
// {IT_CALL | IT_STRING2, NULL, "Next Weapon", M_ChangeControl, gc_driftleft },
// {IT_CALL | IT_STRING2, NULL, "Prev Weapon", M_ChangeControl, gc_driftright },
// {IT_CALL | IT_STRING2, NULL, "Weapon Slot 1", M_ChangeControl, gc_wepslot1 },
// {IT_CALL | IT_STRING2, NULL, "Weapon Slot 2", M_ChangeControl, gc_wepslot2 },
// {IT_CALL | IT_STRING2, NULL, "Weapon Slot 3", M_ChangeControl, gc_wepslot3 },
// {IT_CALL | IT_STRING2, NULL, "Weapon Slot 4", M_ChangeControl, gc_wepslot4 },
// {IT_CALL | IT_STRING2, NULL, "Weapon Slot 5", M_ChangeControl, gc_wepslot5 },
// {IT_CALL | IT_STRING2, NULL, "Weapon Slot 6", M_ChangeControl, gc_wepslot6 },
// {IT_CALL | IT_STRING2, NULL, "Weapon Slot 7", M_ChangeControl, gc_wepslot7 },
};
static menuitem_t OP_CameraControlsMenu[] =
{
// {IT_CALL | IT_STRING2, NULL, "Look Up", M_ChangeControl, gc_lookup },
// {IT_CALL | IT_STRING2, NULL, "Look Down", M_ChangeControl, gc_lookdown },
// {IT_CALL | IT_STRING2, NULL, "Center View", M_ChangeControl, gc_centerview },
// {IT_CALL | IT_STRING2, NULL, "Mouselook", M_ChangeControl, gc_mouseaiming },
};
static menuitem_t OP_MiscControlsMenu[] =
{
{IT_CALL | IT_STRING2, NULL, "Custom Action 1", M_ChangeControl, gc_custom1 },
{IT_CALL | IT_STRING2, NULL, "Custom Action 2", M_ChangeControl, gc_custom2 },
{IT_CALL | IT_STRING2, NULL, "Custom Action 3", M_ChangeControl, gc_custom3 },
{IT_CALL | IT_STRING2, NULL, "Pause", M_ChangeControl, gc_pause },
{IT_CALL | IT_STRING2, NULL, "Console", M_ChangeControl, gc_console },
{IT_CALL | IT_STRING2, NULL, "Talk key", M_ChangeControl, gc_talkkey },
{IT_CALL | IT_STRING2, NULL, "Team-Talk key", M_ChangeControl, gc_teamkey },
{IT_CALL | IT_STRING2, NULL, "Rankings/Scores", M_ChangeControl, gc_scores },
{IT_CALL | IT_STRING2, NULL, "Spectate", M_ChangeControl, gc_spectate },
};*/
static menuitem_t OP_Joystick1Menu[] =
{
{IT_STRING | IT_CALL, NULL, "Select Gamepad..." , M_Setup1PJoystickMenu, 10},
@ -1953,28 +1911,12 @@ menu_t OP_MainDef =
};
menu_t OP_ControlsDef = DEFAULTMENUSTYLE("M_CONTRO", OP_ControlsMenu, &OP_MainDef, 60, 30);
//menu_t OP_ControlListDef = DEFAULTMENUSTYLE("M_CONTRO", OP_ControlListMenu, &OP_ControlsDef, 60, 30);
menu_t OP_MoveControlsDef = CONTROLMENUSTYLE(OP_MoveControlsMenu, &OP_ControlsDef);
//menu_t OP_MPControlsDef = CONTROLMENUSTYLE(OP_MPControlsMenu, &OP_ControlListDef);
//menu_t OP_CameraControlsDef = CONTROLMENUSTYLE(OP_CameraControlsMenu, &OP_ControlListDef);
//menu_t OP_MiscControlsDef = CONTROLMENUSTYLE(OP_MiscControlsMenu, &OP_ControlListDef);
menu_t OP_CustomControlsDef = CONTROLMENUSTYLE(OP_CustomControlsMenu, &OP_MoveControlsDef);
menu_t OP_SpectateControlsDef = CONTROLMENUSTYLE(OP_SpectateControlsMenu, &OP_MoveControlsDef);
/*
menu_t OP_P1ControlsDef = DEFAULTMENUSTYLE("M_CONTRO", OP_P1ControlsMenu, &OP_ControlsDef, 60, 30);
menu_t OP_P2ControlsDef = DEFAULTMENUSTYLE("M_CONTRO", OP_P2ControlsMenu, &OP_ControlsDef, 60, 30);
menu_t OP_AllControlsDef = CONTROLMENUSTYLE(OP_AllControlsMenu, &OP_ControlsDef);
menu_t OP_Joystick1Def = DEFAULTMENUSTYLE("M_CONTRO", OP_Joystick1Menu, &OP_AllControlsDef, 60, 30);
menu_t OP_Joystick2Def = DEFAULTMENUSTYLE("M_CONTRO", OP_Joystick2Menu, &OP_AllControlsDef, 60, 30);
#ifndef NOFOURPLAYER
menu_t OP_P3ControlsDef = DEFAULTMENUSTYLE("M_CONTRO", OP_P3ControlsMenu, &OP_ControlsDef, 60, 30);
menu_t OP_P4ControlsDef = DEFAULTMENUSTYLE("M_CONTRO", OP_P4ControlsMenu, &OP_ControlsDef, 60, 30);
#endif
menu_t OP_MouseOptionsDef = DEFAULTMENUSTYLE("M_CONTRO", OP_MouseOptionsMenu, &OP_P1ControlsDef, 60, 30);
menu_t OP_Mouse2OptionsDef = DEFAULTMENUSTYLE("M_CONTRO", OP_Mouse2OptionsMenu, &OP_P2ControlsDef, 60, 30);
*/
menu_t OP_Joystick1Def = DEFAULTMENUSTYLE("M_CONTRO", OP_Joystick1Menu, &OP_MoveControlsDef, 60, 30);
menu_t OP_Joystick2Def = DEFAULTMENUSTYLE("M_CONTRO", OP_Joystick2Menu, &OP_MoveControlsDef, 60, 30);
#ifndef NOFOURPLAYER
menu_t OP_Joystick3Def = DEFAULTMENUSTYLE("M_CONTRO", OP_Joystick3Menu, &OP_MoveControlsDef, 60, 30);
menu_t OP_Joystick4Def = DEFAULTMENUSTYLE("M_CONTRO", OP_Joystick4Menu, &OP_MoveControlsDef, 60, 30);
menu_t OP_Joystick3Def = DEFAULTMENUSTYLE("M_CONTRO", OP_Joystick3Menu, &OP_AllControlsDef, 60, 30);
menu_t OP_Joystick4Def = DEFAULTMENUSTYLE("M_CONTRO", OP_Joystick4Menu, &OP_AllControlsDef, 60, 30);
#endif
menu_t OP_JoystickSetDef =
{
@ -2550,7 +2492,7 @@ boolean M_Responder(event_t *ev)
if (ch == -1)
return false;
else if (ch == gamecontrol[gc_systemmenu][0]) // allow remappable ESC key
else if (ch == gamecontrol[gc_systemmenu][0] || ch == gamecontrol[gc_systemmenu][1]) // allow remappable ESC key
ch = KEY_ESCAPE;
// F-Keys
@ -3969,7 +3911,7 @@ boolean M_CanShowLevelInList(INT32 mapnum, INT32 gt)
if (M_MapLocked(mapnum+1))
return false; // not unlocked
if (gt == GT_COOP && (mapheaderinfo[mapnum]->typeoflevel & TOL_COOP))
/*if (gt == GT_COOP && (mapheaderinfo[mapnum]->typeoflevel & TOL_COOP))
return true;
if (gt == GT_COMPETITION && (mapheaderinfo[mapnum]->typeoflevel & TOL_COMPETITION))
@ -3978,10 +3920,10 @@ boolean M_CanShowLevelInList(INT32 mapnum, INT32 gt)
if (gt == GT_CTF && (mapheaderinfo[mapnum]->typeoflevel & TOL_CTF))
return true;
if ((gt == GT_MATCH || gt == GT_TEAMMATCH) && (mapheaderinfo[mapnum]->typeoflevel & TOL_MATCH))
return true;
if ((gt == GT_TAG || gt == GT_HIDEANDSEEK) && (mapheaderinfo[mapnum]->typeoflevel & TOL_TAG))
return true;*/
if ((gt == GT_MATCH || gt == GT_TEAMMATCH) && (mapheaderinfo[mapnum]->typeoflevel & TOL_MATCH))
return true;
if (gt == GT_RACE && (mapheaderinfo[mapnum]->typeoflevel & TOL_RACE))
@ -3989,29 +3931,38 @@ boolean M_CanShowLevelInList(INT32 mapnum, INT32 gt)
return false;
case LLM_LEVELSELECT:
/*case LLM_LEVELSELECT:
if (mapheaderinfo[mapnum]->levelselect != maplistoption)
return false;
if (M_MapLocked(mapnum+1))
return false; // not unlocked
return true;
return true;*/
case LLM_RECORDATTACK:
if (!(mapheaderinfo[mapnum]->menuflags & LF2_RECORDATTACK))
/*if (!(mapheaderinfo[mapnum]->menuflags & LF2_RECORDATTACK))
return false;*/
if (!(mapheaderinfo[mapnum]->typeoflevel & TOL_RACE))
return false;
if (M_MapLocked(mapnum+1))
return false; // not unlocked
if (mapheaderinfo[mapnum]->menuflags & LF2_NOVISITNEEDED)
if (M_SecretUnlocked(SECRET_HELLATTACK))
return true; // now you're in hell
if (mapheaderinfo[mapnum]->menuflags & LF2_HIDEINMENU)
return false; // map hell
/*if (mapheaderinfo[mapnum]->menuflags & LF2_NOVISITNEEDED)
return true;
if (!mapvisited[mapnum])
return false;
return false;*/
return true;
case LLM_NIGHTSATTACK:
/*case LLM_NIGHTSATTACK:
if (!(mapheaderinfo[mapnum]->menuflags & LF2_NIGHTSATTACK))
return false;
@ -4024,7 +3975,9 @@ boolean M_CanShowLevelInList(INT32 mapnum, INT32 gt)
if (!mapvisited[mapnum])
return false;
return true;
return true;*/
default:
return false;
}
// Hmm? Couldn't decide?
@ -8472,19 +8425,28 @@ static void M_Setup1PControlsMenu(INT32 choice)
setupcontrols = gamecontrol; // was called from main Options (for console player, then)
currentMenu->lastOn = itemOn;
// Set proper gamepad options
OP_AllControlsMenu[0].itemaction = &OP_Joystick1Def;
// Unhide P1-only controls
OP_MoveControlsMenu[10].status = IT_CONTROL; // Talk
//OP_MoveControlsMenu[11].status = IT_CONTROL; // Team-talk
OP_MoveControlsMenu[11].status = IT_CONTROL; // Rankings
OP_MoveControlsMenu[12].status = IT_CONTROL; // Pause
OP_MoveControlsMenu[13].status = IT_CONTROL; // Console
OP_MoveControlsMenu[14].itemaction = &OP_Joystick1Def; // Gamepad
OP_AllControlsMenu[14].status = IT_CONTROL; // Chat
//OP_AllControlsMenu[15].status = IT_CONTROL; // Team-chat
OP_AllControlsMenu[15].status = IT_CONTROL; // Rankings
OP_AllControlsMenu[16].status = IT_CONTROL; // Viewpoint
// 17 is Reset Camera, 18 is Toggle Chasecam
OP_AllControlsMenu[19].status = IT_CONTROL; // Pause
OP_AllControlsMenu[20].status = IT_CONTROL; // Screenshot
OP_AllControlsMenu[21].status = IT_CONTROL; // GIF
OP_AllControlsMenu[22].status = IT_CONTROL; // System Menu
OP_AllControlsMenu[23].status = IT_CONTROL; // Console
OP_AllControlsMenu[24].status = IT_HEADER; // Spectator Controls header
OP_AllControlsMenu[25].status = IT_SPACE; // Spectator Controls space
OP_AllControlsMenu[26].status = IT_CONTROL; // Spectate
OP_AllControlsMenu[27].status = IT_CONTROL; // Look Up
OP_AllControlsMenu[28].status = IT_CONTROL; // Look Down
OP_AllControlsMenu[29].status = IT_CONTROL; // Center View
// Set cvars
OP_SpectateControlsMenu[6].itemaction = &cv_chasecam; // Chasecam
OP_SpectateControlsMenu[7].itemaction = &cv_crosshair; // Crosshair
M_SetupNextMenu(&OP_MoveControlsDef);
M_SetupNextMenu(&OP_AllControlsDef);
}
static void M_Setup2PControlsMenu(INT32 choice)
@ -8495,19 +8457,28 @@ static void M_Setup2PControlsMenu(INT32 choice)
setupcontrols = gamecontrolbis;
currentMenu->lastOn = itemOn;
// Set proper gamepad options
OP_AllControlsMenu[0].itemaction = &OP_Joystick2Def;
// Hide P1-only controls
OP_MoveControlsMenu[10].status = IT_GRAYEDOUT2; // Talk
//OP_MoveControlsMenu[11].status = IT_GRAYEDOUT2; // Team-talk
OP_MoveControlsMenu[11].status = IT_GRAYEDOUT2; // Rankings
OP_MoveControlsMenu[12].status = IT_GRAYEDOUT2; // Pause
OP_MoveControlsMenu[13].status = IT_GRAYEDOUT2; // Console
OP_MoveControlsMenu[14].itemaction = &OP_Joystick2Def; // Gamepad
OP_AllControlsMenu[14].status = IT_GRAYEDOUT2; // Chat
//OP_AllControlsMenu[15].status = IT_GRAYEDOUT2; // Team-chat
OP_AllControlsMenu[15].status = IT_GRAYEDOUT2; // Rankings
OP_AllControlsMenu[16].status = IT_GRAYEDOUT2; // Viewpoint
// 17 is Reset Camera, 18 is Toggle Chasecam
OP_AllControlsMenu[19].status = IT_GRAYEDOUT2; // Pause
OP_AllControlsMenu[20].status = IT_GRAYEDOUT2; // Screenshot
OP_AllControlsMenu[21].status = IT_GRAYEDOUT2; // GIF
OP_AllControlsMenu[22].status = IT_GRAYEDOUT2; // System Menu
OP_AllControlsMenu[23].status = IT_GRAYEDOUT2; // Console
OP_AllControlsMenu[24].status = IT_GRAYEDOUT2; // Spectator Controls header
OP_AllControlsMenu[25].status = IT_GRAYEDOUT2; // Spectator Controls space
OP_AllControlsMenu[26].status = IT_GRAYEDOUT2; // Spectate
OP_AllControlsMenu[27].status = IT_GRAYEDOUT2; // Look Up
OP_AllControlsMenu[28].status = IT_GRAYEDOUT2; // Look Down
OP_AllControlsMenu[29].status = IT_GRAYEDOUT2; // Center View
// Set cvars
OP_SpectateControlsMenu[6].itemaction = &cv_chasecam2; // Chasecam
OP_SpectateControlsMenu[7].itemaction = &cv_crosshair2; // Crosshair
M_SetupNextMenu(&OP_MoveControlsDef);
M_SetupNextMenu(&OP_AllControlsDef);
}
#ifndef NOFOURPLAYER
@ -8519,19 +8490,28 @@ static void M_Setup3PControlsMenu(INT32 choice)
setupcontrols = gamecontrol3;
currentMenu->lastOn = itemOn;
// Set proper gamepad options
OP_AllControlsMenu[0].itemaction = &OP_Joystick3Def;
// Hide P1-only controls
OP_MoveControlsMenu[10].status = IT_GRAYEDOUT2; // Talk
//OP_MoveControlsMenu[11].status = IT_GRAYEDOUT2; // Team-talk
OP_MoveControlsMenu[11].status = IT_GRAYEDOUT2; // Rankings
OP_MoveControlsMenu[12].status = IT_GRAYEDOUT2; // Pause
OP_MoveControlsMenu[13].status = IT_GRAYEDOUT2; // Console
OP_MoveControlsMenu[14].itemaction = &OP_Joystick3Def; // Gamepad
OP_AllControlsMenu[14].status = IT_GRAYEDOUT2; // Chat
//OP_AllControlsMenu[15].status = IT_GRAYEDOUT2; // Team-chat
OP_AllControlsMenu[15].status = IT_GRAYEDOUT2; // Rankings
OP_AllControlsMenu[16].status = IT_GRAYEDOUT2; // Viewpoint
// 17 is Reset Camera, 18 is Toggle Chasecam
OP_AllControlsMenu[19].status = IT_GRAYEDOUT2; // Pause
OP_AllControlsMenu[20].status = IT_GRAYEDOUT2; // Screenshot
OP_AllControlsMenu[21].status = IT_GRAYEDOUT2; // GIF
OP_AllControlsMenu[22].status = IT_GRAYEDOUT2; // System Menu
OP_AllControlsMenu[23].status = IT_GRAYEDOUT2; // Console
OP_AllControlsMenu[24].status = IT_GRAYEDOUT2; // Spectator Controls header
OP_AllControlsMenu[25].status = IT_GRAYEDOUT2; // Spectator Controls space
OP_AllControlsMenu[26].status = IT_GRAYEDOUT2; // Spectate
OP_AllControlsMenu[27].status = IT_GRAYEDOUT2; // Look Up
OP_AllControlsMenu[28].status = IT_GRAYEDOUT2; // Look Down
OP_AllControlsMenu[29].status = IT_GRAYEDOUT2; // Center View
// Set cvars
OP_SpectateControlsMenu[6].itemaction = &cv_chasecam3; // Chasecam
OP_SpectateControlsMenu[7].itemaction = &cv_crosshair3; // Crosshair
M_SetupNextMenu(&OP_MoveControlsDef);
M_SetupNextMenu(&OP_AllControlsDef);
}
static void M_Setup4PControlsMenu(INT32 choice)
@ -8542,56 +8522,109 @@ static void M_Setup4PControlsMenu(INT32 choice)
setupcontrols = gamecontrol4;
currentMenu->lastOn = itemOn;
// Set proper gamepad options
OP_AllControlsMenu[0].itemaction = &OP_Joystick4Def;
// Hide P1-only controls
OP_MoveControlsMenu[10].status = IT_GRAYEDOUT2; // Talk
//OP_MoveControlsMenu[11].status = IT_GRAYEDOUT2; // Team-talk
OP_MoveControlsMenu[11].status = IT_GRAYEDOUT2; // Rankings
OP_MoveControlsMenu[12].status = IT_GRAYEDOUT2; // Pause
OP_MoveControlsMenu[13].status = IT_GRAYEDOUT2; // Console
OP_MoveControlsMenu[14].itemaction = &OP_Joystick4Def; // Gamepad
OP_AllControlsMenu[14].status = IT_GRAYEDOUT2; // Chat
//OP_AllControlsMenu[15].status = IT_GRAYEDOUT2; // Team-chat
OP_AllControlsMenu[15].status = IT_GRAYEDOUT2; // Rankings
OP_AllControlsMenu[16].status = IT_GRAYEDOUT2; // Viewpoint
// 17 is Reset Camera, 18 is Toggle Chasecam
OP_AllControlsMenu[19].status = IT_GRAYEDOUT2; // Pause
OP_AllControlsMenu[20].status = IT_GRAYEDOUT2; // Screenshot
OP_AllControlsMenu[21].status = IT_GRAYEDOUT2; // GIF
OP_AllControlsMenu[22].status = IT_GRAYEDOUT2; // System Menu
OP_AllControlsMenu[23].status = IT_GRAYEDOUT2; // Console
OP_AllControlsMenu[24].status = IT_GRAYEDOUT2; // Spectator Controls header
OP_AllControlsMenu[25].status = IT_GRAYEDOUT2; // Spectator Controls space
OP_AllControlsMenu[26].status = IT_GRAYEDOUT2; // Spectate
OP_AllControlsMenu[27].status = IT_GRAYEDOUT2; // Look Up
OP_AllControlsMenu[28].status = IT_GRAYEDOUT2; // Look Down
OP_AllControlsMenu[29].status = IT_GRAYEDOUT2; // Center View
// Set cvars
OP_SpectateControlsMenu[6].itemaction = &cv_chasecam4; // Chasecam
OP_SpectateControlsMenu[7].itemaction = &cv_crosshair4; // Crosshair
M_SetupNextMenu(&OP_MoveControlsDef);
M_SetupNextMenu(&OP_AllControlsDef);
}
#endif
#define controlheight 18
// Draws the Customise Controls menu
static void M_DrawControl(void)
{
char tmp[50];
INT32 i, y;
INT32 x, y, i, max, cursory = 0, iter;
INT32 keys[2];
const char *ctrl;
// draw title, strings and submenu
M_DrawGenericMenu();
if (setupcontrols_secondaryplayer)
ctrl = "\x86""SET ""\x82""CONTROLS""\x86"" FOR ""\x82""SECONDARY PLAYER";
else if (setupcontrols_thirdplayer)
ctrl = "\x86""SET ""\x82""CONTROLS""\x86"" FOR ""\x82""THIRD PLAYER";
else if (setupcontrols_fourthplayer)
ctrl = "\x86""SET ""\x82""CONTROLS""\x86"" FOR ""\x82""FOURTH PLAYER";
else
ctrl = "\x86""PRESS ""\x82""ENTER""\x86"" TO CHANGE, ""\x82""BACKSPACE""\x86"" TO CLEAR";
M_CentreText(28, ctrl);
x = currentMenu->x;
y = currentMenu->y;
for (i = 0; i < currentMenu->numitems;i++)
/*i = itemOn - (controlheight/2);
if (i < 0)
i = 0;
*/
iter = (controlheight/2);
for (i = itemOn; ((iter || currentMenu->menuitems[i].status == IT_GRAYEDOUT2) && i > 0); i--)
{
if (currentMenu->menuitems[i].status != IT_CONTROL)
{
y = currentMenu->y+currentMenu->menuitems[i].alphaKey;
continue;
if (currentMenu->menuitems[i].status != IT_GRAYEDOUT2)
iter--;
}
if (currentMenu->menuitems[i].status != IT_CONTROL)
if (currentMenu->menuitems[i].status == IT_GRAYEDOUT2)
i--;
iter += (controlheight/2);
for (max = itemOn; (iter && max < currentMenu->numitems); max++)
{
if (currentMenu->menuitems[max].status != IT_GRAYEDOUT2)
iter--;
}
if (iter)
{
iter += (controlheight/2);
for (i = itemOn; ((iter || currentMenu->menuitems[i].status == IT_GRAYEDOUT2) && i > 0); i--)
{
if (currentMenu->menuitems[i].status != IT_GRAYEDOUT2)
iter--;
}
}
/*max = i + controlheight;
if (max > currentMenu->numitems)
{
max = currentMenu->numitems;
if (max < controlheight)
i = 0;
else
i = max - controlheight;
}*/
// draw title (or big pic)
M_DrawMenuTitle();
M_CentreText(28,
(setupcontrols_fourthplayer ? "\x86""Set controls for ""\x82""Player 4" :
(setupcontrols_thirdplayer ? "\x86""Set controls for ""\x82""Player 3" :
(setupcontrols_secondaryplayer ? "\x86""Set controls for ""\x82""Player 2" :
"\x86""Press ""\x82""ENTER""\x86"" to change, ""\x82""BACKSPACE""\x86"" to clear"))));
if (i)
V_DrawString(currentMenu->x - 16, y-(skullAnimCounter/5), highlightflags, "\x1A"); // up arrow
if (max != currentMenu->numitems)
V_DrawString(currentMenu->x - 16, y+(SMALLLINEHEIGHT*(controlheight-1))+(skullAnimCounter/5), highlightflags, "\x1B"); // down arrow
for (; i < max; i++)
{
if (currentMenu->menuitems[i].status == IT_GRAYEDOUT2)
continue;
if (i == itemOn)
cursory = y;
if (currentMenu->menuitems[i].status == IT_CONTROL)
{
V_DrawString(x, y, ((i == itemOn) ? highlightflags : 0), currentMenu->menuitems[i].text);
keys[0] = setupcontrols[currentMenu->menuitems[i].alphaKey][0];
keys[1] = setupcontrols[currentMenu->menuitems[i].alphaKey][1];
@ -8606,18 +8639,30 @@ static void M_DrawControl(void)
strcat (tmp, G_KeynumToString (keys[0]));
if (keys[0] != KEY_NULL && keys[1] != KEY_NULL)
strcat(tmp," or ");
strcat(tmp,", ");
if (keys[1] != KEY_NULL)
strcat (tmp, G_KeynumToString (keys[1]));
}
V_DrawRightAlignedString(BASEVIDWIDTH-currentMenu->x, y, highlightflags, tmp);
}
/*else if (currentMenu->menuitems[i].status == IT_GRAYEDOUT2)
V_DrawString(x, y, V_TRANSLUCENT, currentMenu->menuitems[i].text);*/
else if ((currentMenu->menuitems[i].status == IT_HEADER) && (i != max-1))
V_DrawString(19, y+6, highlightflags, currentMenu->menuitems[i].text);
else if (currentMenu->menuitems[i].status & IT_STRING)
V_DrawString(x, y, ((i == itemOn) ? highlightflags : 0), currentMenu->menuitems[i].text);
y += SMALLLINEHEIGHT;
}
V_DrawScaledPatch(currentMenu->x - 20, cursory, 0,
W_CachePatchName("M_CURSOR", PU_CACHE));
}
#undef controlheight
static INT32 controltochange;
static void M_ChangecontrolResponse(event_t *ev)

View file

@ -1480,9 +1480,13 @@ boolean M_ScreenshotResponder(event_t *ev)
return false;
ch = ev->data1;
if (ch == KEY_F8)
if (ch >= KEY_MOUSE1 && menuactive) // If it's not a keyboard key, then don't allow it in the menus!
return false;
if (ch == gamecontrol[gc_screenshot][0] || ch == gamecontrol[gc_screenshot][1]) // remappable F8
M_ScreenShot();
else if (ch == KEY_F9)
else if (ch == gamecontrol[gc_recordgif][0] || ch == gamecontrol[gc_recordgif][1]) // remappable F9
((moviemode) ? M_StopMovie : M_StartMovie)();
else
return false;

View file

@ -3913,15 +3913,25 @@ void A_ThrownRing(mobj_t *actor)
//{ SRB2kart - A_GRENADERING
static mobj_t *grenade;
static fixed_t explodedist;
static inline boolean PIT_GrenadeRing(mobj_t *thing)
{
if (!grenade)
return true;
return false;
if (thing->type != MT_PLAYER) // Don't explode for anything but an actual player.
return true;
if (!(thing->flags & MF_SHOOTABLE))
{
// didn't do any damage
return true;
}
if (netgame && thing->player && thing->player->spectator)
return true;
if (thing == grenade->target && grenade->threshold != 0) // Don't blow up at your owner.
return true;
@ -3935,22 +3945,13 @@ static inline boolean PIT_GrenadeRing(mobj_t *thing)
return true;
// see if it went over / under
if (grenade->z - grenade->info->painchance > thing->z + thing->height)
if (grenade->z - explodedist > thing->z + thing->height)
return true; // overhead
if (grenade->z + grenade->height + grenade->info->painchance < thing->z)
if (grenade->z + grenade->height + explodedist < thing->z)
return true; // underneath
if (netgame && thing->player && thing->player->spectator)
return true;
if (!(thing->flags & MF_SHOOTABLE))
{
// didn't do any damage
return true;
}
if (P_AproxDistance(P_AproxDistance(thing->x - grenade->x, thing->y - grenade->y),
thing->z - grenade->z) > grenade->info->painchance)
thing->z - grenade->z) > explodedist)
return true; // Too far away
// Explode!
@ -3961,7 +3962,11 @@ static inline boolean PIT_GrenadeRing(mobj_t *thing)
void A_GrenadeRing(mobj_t *actor)
{
INT32 bx, by, xl, xh, yl, yh;
const fixed_t explodedist = actor->info->painchance;
explodedist = FixedMul(actor->info->painchance, mapheaderinfo[gamemap-1]->mobj_scale);
#ifdef HAVE_BLUA
if (LUA_CallAction("A_GrenadeRing", actor))
return;
#endif
if (leveltime % 35 == 0)
S_StartSound(actor, actor->info->activesound);
@ -3978,6 +3983,80 @@ void A_GrenadeRing(mobj_t *actor)
for (bx = xl; bx <= xh; bx++)
P_BlockThingsIterator(bx, by, PIT_GrenadeRing);
}
static inline boolean PIT_MineExplode(mobj_t *thing)
{
if (!grenade || P_MobjWasRemoved(grenade))
return false; // There's the possibility these can chain react onto themselves after they've already died if there are enough all in one spot
if (thing == grenade || thing->type == MT_MINEEXPLOSIONSOUND) // Don't explode yourself! Endless loop!
return true;
if (!(thing->flags & MF_SHOOTABLE) || (thing->flags & MF_SCENERY))
return true;
if (netgame && thing->player && thing->player->spectator)
return true;
if (G_BattleGametype() && grenade->target && grenade->target->player && grenade->target->player->kartstuff[k_bumper] <= 0 && thing == grenade->target)
return true;
// see if it went over / under
if (grenade->z - explodedist > thing->z + thing->height)
return true; // overhead
if (grenade->z + grenade->height + explodedist < thing->z)
return true; // underneath
if (P_AproxDistance(P_AproxDistance(thing->x - grenade->x, thing->y - grenade->y),
thing->z - grenade->z) > explodedist)
return true; // Too far away
grenade->flags2 |= MF2_DEBRIS;
if (thing->player) // Looks like we're going to have to need a seperate function for this too
K_ExplodePlayer(thing->player, grenade->target);
else
P_DamageMobj(thing, grenade, grenade->target, 1);
return true;
}
void A_MineExplode(mobj_t *actor)
{
INT32 bx, by, xl, xh, yl, yh;
explodedist = FixedMul(actor->info->painchance, mapheaderinfo[gamemap-1]->mobj_scale);
INT32 d;
INT32 locvar1 = var1;
mobjtype_t type;
#ifdef HAVE_BLUA
if (LUA_CallAction("A_MineExplode", actor))
return;
#endif
type = (mobjtype_t)locvar1;
// Use blockmap to check for nearby shootables
yh = (unsigned)(actor->y + explodedist - bmaporgy)>>MAPBLOCKSHIFT;
yl = (unsigned)(actor->y - explodedist - bmaporgy)>>MAPBLOCKSHIFT;
xh = (unsigned)(actor->x + explodedist - bmaporgx)>>MAPBLOCKSHIFT;
xl = (unsigned)(actor->x - explodedist - bmaporgx)>>MAPBLOCKSHIFT;
grenade = actor;
for (by = yl; by <= yh; by++)
for (bx = xl; bx <= xh; bx++)
P_BlockThingsIterator(bx, by, PIT_MineExplode);
for (d = 0; d < 16; d++)
K_SpawnKartExplosion(actor->x, actor->y, actor->z, explodedist + 32*mapheaderinfo[gamemap-1]->mobj_scale, 32, type, d*(ANGLE_45/4), true, false, actor->target); // 32 <-> 64
if (actor->target && actor->target->player)
K_SpawnMineExplosion(actor, actor->target->player->skincolor);
else
K_SpawnMineExplosion(actor, SKINCOLOR_RED);
P_SpawnMobj(actor->x, actor->y, actor->z, MT_MINEEXPLOSIONSOUND);
}
//}
// Function: A_SetSolidSteam
@ -8240,6 +8319,7 @@ void A_JawzExplode(mobj_t *actor)
return;
}
/* old A_MineExplode - see elsewhere in the file
void A_MineExplode(mobj_t *actor)
{
mobj_t *mo2;
@ -8247,12 +8327,14 @@ void A_MineExplode(mobj_t *actor)
INT32 d;
INT32 locvar1 = var1;
mobjtype_t type;
fixed_t range;
#ifdef HAVE_BLUA
if (LUA_CallAction("A_MineExplode", actor))
return;
#endif
type = (mobjtype_t)locvar1;
range = FixedMul(actor->info->painchance, mapheaderinfo[gamemap-1]->mobj_scale);
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
@ -8267,27 +8349,25 @@ void A_MineExplode(mobj_t *actor)
if (mo2 == actor || mo2->type == MT_MINEEXPLOSIONSOUND) // Don't explode yourself! Endless loop!
continue;
if (!(mo2->flags & MF_SHOOTABLE) || (mo2->flags & MF_SCENERY))
continue;
if (G_BattleGametype() && actor->target && actor->target->player && actor->target->player->kartstuff[k_bumper] <= 0 && mo2 == actor->target)
continue;
if (P_AproxDistance(P_AproxDistance(mo2->x - actor->x, mo2->y - actor->y), mo2->z - actor->z) > actor->info->painchance)
if (P_AproxDistance(P_AproxDistance(mo2->x - actor->x, mo2->y - actor->y), mo2->z - actor->z) > range)
continue;
if ((mo2->flags & MF_SHOOTABLE) && !(mo2->flags & MF_SCENERY))
{
actor->flags2 |= MF2_DEBRIS;
if (mo2->player) // Looks like we're going to have to need a seperate function for this too
K_ExplodePlayer(mo2->player, actor->target);
else
P_DamageMobj(mo2, actor, actor->target, 1);
continue;
}
}
for (d = 0; d < 16; d++)
K_SpawnKartExplosion(actor->x, actor->y, actor->z, actor->info->painchance + 32*FRACUNIT, 32, type, d*(ANGLE_45/4), true, false, actor->target); // 32 <-> 64
K_SpawnKartExplosion(actor->x, actor->y, actor->z, range + 32*mapheaderinfo[gamemap-1]->mobj_scale, 32, type, d*(ANGLE_45/4), true, false, actor->target); // 32 <-> 64
if (actor->target && actor->target->player)
K_SpawnMineExplosion(actor, actor->target->player->skincolor);
@ -8297,7 +8377,7 @@ void A_MineExplode(mobj_t *actor)
P_SpawnMobj(actor->x, actor->y, actor->z, MT_MINEEXPLOSIONSOUND);
return;
}
}*/
void A_BallhogExplode(mobj_t *actor)
{
@ -8318,11 +8398,11 @@ void A_BallhogExplode(mobj_t *actor)
// Dumb simple function that gives a mobj its target's momentums without updating its angle.
void A_LightningFollowPlayer(mobj_t *actor)
{
fixed_t sx, sy;
#ifdef HAVE_BLUA
if (LUA_CallAction("A_LightningFollowPlayer", actor))
return;
#endif
fixed_t sx, sy;
if (actor->target)
{
if (actor->extravalue1) // Make the radius also follow the player somewhat accuratly

View file

@ -96,55 +96,6 @@ void P_RampConstant(const BasicFF_t *FFInfo, INT32 Start, INT32 End)
// GET STUFF
//
/** Makes sure all previous starposts are cleared.
* For instance, hitting starpost 5 will clear starposts 1 through 4, even if
* you didn't touch them. This is how the classic games work, although it can
* lead to bizarre situations on levels that allow you to make a circuit.
*
* \param postnum The number of the starpost just touched.
*/
void P_ClearStarPost(INT32 postnum)
{
thinker_t *th;
mobj_t *mo2;
// scan the thinkers
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
mo2 = (mobj_t *)th;
if (mo2->type == MT_STARPOST && mo2->health <= postnum)
P_SetMobjState(mo2, mo2->info->seestate);
}
return;
}
//
// P_ResetStarposts
//
// Resets all starposts back to their spawn state, used on A_Mixup and some other things.
//
void P_ResetStarposts(void)
{
// Search through all the thinkers.
thinker_t *th;
mobj_t *post;
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
post = (mobj_t *)th;
if (post->type == MT_STARPOST)
P_SetMobjState(post, post->info->spawnstate);
}
}
//
// P_CanPickupItem
//
@ -299,14 +250,14 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
if (heightcheck)
{
if (special->type == MT_FLINGEMERALD) // little hack here...
/*if (special->type == MT_FLINGEMERALD) // little hack here...
{ // flingemerald sprites are low to the ground, so extend collision radius down some.
if (toucher->z > (special->z + special->height))
return;
if (special->z - special->height > (toucher->z + toucher->height))
return;
}
else
else*/
{
if (toucher->momz < 0) {
if (toucher->z + toucher->momz > special->z + special->height)
@ -341,7 +292,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
if (special->flags & MF_BOSS)
{
if (special->type == MT_BLACKEGGMAN)
/*if (special->type == MT_BLACKEGGMAN)
{
P_DamageMobj(toucher, special, special, 1); // ouch
return;
@ -357,7 +308,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
toucher->momy = -toucher->momy;
P_DamageMobj(special, toucher, toucher, 1);
}
/*
else if (((toucher->z < special->z && !(toucher->eflags & MFE_VERTICALFLIP))
|| (toucher->z + toucher->height > special->z + special->height && (toucher->eflags & MFE_VERTICALFLIP)))
&& player->charability == CA_FLY
@ -368,8 +318,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
P_DamageMobj(special, toucher, toucher, 1);
}
*/ // SRB2kart - Removed: No more fly states
else
// SRB2kart - Removed: No more fly states
else*/
P_DamageMobj(toucher, special, special, 1);
return;
@ -379,7 +329,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
////////////////////////////////////////////////////////
/////ENEMIES!!//////////////////////////////////////////
////////////////////////////////////////////////////////
if (special->type == MT_GSNAPPER && !(((player->pflags & PF_NIGHTSMODE) && (player->pflags & PF_DRILLING))
/*if (special->type == MT_GSNAPPER && !(((player->pflags & PF_NIGHTSMODE) && (player->pflags & PF_DRILLING))
|| player->powers[pw_invulnerability] || player->powers[pw_super])
&& toucher->z < special->z + special->height && toucher->z + toucher->height > special->z)
{
@ -401,7 +351,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
P_DamageMobj(special, toucher, toucher, 1);
}
/*
else if (((toucher->z < special->z && !(toucher->eflags & MFE_VERTICALFLIP))
|| (toucher->z + toucher->height > special->z + special->height && (toucher->eflags & MFE_VERTICALFLIP))) // Flame is bad at logic - JTE
&& player->charability == CA_FLY
@ -413,8 +362,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
P_DamageMobj(special, toucher, toucher, 1);
}
*/ // SRB2kart - Removed: No more fly states
else
// SRB2kart - Removed: No more fly states
else*/
P_DamageMobj(toucher, special, special, 1);
return;
@ -456,9 +405,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
if (G_BattleGametype() && player->kartstuff[k_bumper] <= 0)
{
if (player->kartstuff[k_comebackmode] != 0 || player->kartstuff[k_comebacktimer])
if (player->kartstuff[k_comebackmode] || player->kartstuff[k_comebacktimer])
return;
if (player->kartstuff[k_comebackmode] == 0)
player->kartstuff[k_comebackmode] = 1;
}
@ -479,21 +427,23 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
if (G_BattleGametype() && player->kartstuff[k_bumper] <= 0)
{
/*if (player->kartstuff[k_comebackmode] != 0 || player->kartstuff[k_comebacktimer])
return;
if (player->kartstuff[k_comebackmode] == 0)
player->kartstuff[k_comebackmode] = 2;*/
if (player->kartstuff[k_comebackmode] || player->kartstuff[k_comebacktimer])
return;
player->kartstuff[k_comebackmode] = 2;
}
else
{
K_DropItems(player); //K_StripItems(player);
K_StripOther(player);
player->kartstuff[k_itemroulette] = 1;
player->kartstuff[k_roulettetype] = 2;
}
{
mobj_t *poof = P_SpawnMobj(special->x, special->y, special->z, MT_EXPLODE);
S_StartSound(poof, special->info->deathsound);
}
K_DropItems(player); //K_StripItems(player);
K_StripOther(player);
player->kartstuff[k_itemroulette] = 1;
player->kartstuff[k_roulettetype] = 2;
if (special->target && special->target->player)
{
if (G_RaceGametype() || special->target->player->kartstuff[k_bumper] > 0)
@ -510,8 +460,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
P_RemoveMobj(special);
return;
}
break;
case MT_KARMAHITBOX:
if (!special->target->player)
return;
@ -527,7 +475,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|| special->target->player->kartstuff[k_squishedtimer])
return;
if (special->target->player->kartstuff[k_comebackmode] == 0)
if (!special->target->player->kartstuff[k_comebackmode])
{
if (player->kartstuff[k_growshrinktimer] || player->kartstuff[k_squishedtimer]
|| player->kartstuff[k_hyudorotimer] || player->kartstuff[k_spinouttimer]
@ -588,6 +536,52 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
player->kartstuff[k_itemroulette] = 1;
player->kartstuff[k_roulettetype] = 1;
}
else if (special->target->player->kartstuff[k_comebackmode] == 2 && P_CanPickupItem(player, 2))
{
mobj_t *poof = P_SpawnMobj(special->x, special->y, special->z, MT_EXPLODE);
S_StartSound(poof, special->info->seesound);
if (player->kartstuff[k_bumper] == 1) // If you have only one bumper left, and see if it's a 1v1
{
INT32 numingame = 0;
INT32 i;
for (i = 0; i < MAXPLAYERS; i++)
{
if (!playeringame[i] || players[i].spectator || players[i].kartstuff[k_bumper] <= 0)
continue;
numingame++;
}
if (numingame <= 2) // If so, then an extra two karma points so they are 100% certain to switch places; it's annoying to end matches with a fake kill
special->target->player->kartstuff[k_comebackpoints] += 2;
}
special->target->player->kartstuff[k_comebackmode] = 0;
special->target->player->kartstuff[k_comebackpoints]++;
if (netgame && cv_hazardlog.value)
CONS_Printf(M_GetText("%s gave an \"item\" to %s.\n"), player_names[special->target->player-players], player_names[player-players]);
if (special->target->player->kartstuff[k_comebackpoints] >= 3)
K_StealBumper(special->target->player, player, true);
special->target->player->kartstuff[k_comebacktimer] = comebacktime;
K_DropItems(player); //K_StripItems(player);
K_StripOther(player);
player->kartstuff[k_itemroulette] = 1;
player->kartstuff[k_roulettetype] = 2;
if (special->target->player->kartstuff[k_eggmanblame] >= 0
&& special->target->player->kartstuff[k_eggmanblame] < MAXPLAYERS
&& playeringame[special->target->player->kartstuff[k_eggmanblame]]
&& !players[special->target->player->kartstuff[k_eggmanblame]].spectator)
player->kartstuff[k_eggmanblame] = special->target->player->kartstuff[k_eggmanblame];
else
player->kartstuff[k_eggmanblame] = -1;
special->target->player->kartstuff[k_eggmanblame] = -1;
}
return;
case MT_ROCKETSNEAKER:
if (!player->mo)
@ -860,7 +854,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
// ********************************** //
// NiGHTS gameplay items and powerups //
// ********************************** //
case MT_NIGHTSDRONE:
/*case MT_NIGHTSDRONE:
if (player->bot)
return;
if (player->exiting)
@ -1051,7 +1045,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
// Clear text
player->texttimer = 0;
return;
return;*/
case MT_NIGHTSBUMPER:
// Don't trigger if the stage is ended/failed
if (player->exiting)
@ -1119,7 +1113,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
}
}
return;
case MT_NIGHTSSUPERLOOP:
/*case MT_NIGHTSSUPERLOOP:
if (player->bot || !(player->pflags & PF_NIGHTSMODE))
return;
if (!G_IsSpecialStage(gamemap))
@ -1252,7 +1246,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
HU_SetCEchoDuration(4);
HU_DoCEcho(M_GetText("\\\\\\\\\\\\\\\\Link Freeze"));
}
break;
break;*/
case MT_NIGHTSWING:
if (G_IsSpecialStage(gamemap) && useNightsSS)
{ // Pseudo-ring.
@ -1404,35 +1398,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
player->starpostangle = special->angle;
player->starpostnum = special->health;
player->starpostcount++;
P_ClearStarPost(special->health);
// Find all starposts in the level with this value.
{
thinker_t *th;
mobj_t *mo2;
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
mo2 = (mobj_t *)th;
if (mo2 == special)
continue;
if (mo2->type == MT_STARPOST && mo2->health == special->health)
{
if (!(netgame && circuitmap && player != &players[consoleplayer]))
P_SetMobjState(mo2, mo2->info->painstate);
}
}
}
S_StartSound(toucher, special->info->painsound);
if (!(netgame && circuitmap && player != &players[consoleplayer]))
P_SetMobjState(special, special->info->painstate);
//S_StartSound(toucher, special->info->painsound);
return;
case MT_FAKEMOBILE:
@ -1931,7 +1898,7 @@ void P_CheckTimeLimit(void)
//Tagmode round end but only on the tic before the
//XD_EXITLEVEL packet is received by all players.
if (G_TagGametype())
/*if (G_TagGametype())
{
if (leveltime == (timelimitintics + 1))
{
@ -1948,7 +1915,7 @@ void P_CheckTimeLimit(void)
}
//Optional tie-breaker for Match/CTF
else if (cv_overtime.value)
else*/ if (cv_overtime.value)
{
INT32 playerarray[MAXPLAYERS];
INT32 tempplayer = 0;
@ -2081,7 +2048,7 @@ void P_CheckPointLimit(void)
/*Checks for untagged remaining players in both tag derivitave modes.
*If no untagged players remain, end the round.
*Also serves as error checking if the only IT player leaves.*/
void P_CheckSurvivors(void)
/*void P_CheckSurvivors(void)
{
INT32 i;
INT32 survivors = 0;
@ -2161,7 +2128,7 @@ void P_CheckSurvivors(void)
if (server)
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
}
}
}*/
// Checks whether or not to end a race netgame.
boolean P_CheckRacers(void)
@ -2461,7 +2428,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
localaiming4 = 0;
//tag deaths handled differently in suicide cases. Don't count spectators!
if (G_TagGametype()
/*if (G_TagGametype()
&& !(target->player->pflags & PF_TAGIT) && (!source || !source->player) && !(target->player->spectator))
{
// if you accidentally die before you run out of time to hide, ignore it.
@ -2495,7 +2462,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
}
}
}
else if (G_BattleGametype())
else*/ if (G_BattleGametype())
K_CheckBumpers();
target->player->kartstuff[k_pogospring] = 0;
@ -2858,7 +2825,7 @@ static inline boolean P_TagDamage(mobj_t *target, mobj_t *inflictor, mobj_t *sou
}
// The tag occurs so long as you aren't shooting another tagger with friendlyfire on.
if (source->player->pflags & PF_TAGIT && !(player->pflags & PF_TAGIT))
/*if (source->player->pflags & PF_TAGIT && !(player->pflags & PF_TAGIT))
{
P_AddPlayerScore(source->player, 1); //award points to tagger.
P_HitDeathMessages(player, inflictor, source);
@ -2876,7 +2843,7 @@ static inline boolean P_TagDamage(mobj_t *target, mobj_t *inflictor, mobj_t *sou
//checks if tagger has tagged all players, if so, end round early.
P_CheckSurvivors();
}
}*/
P_DoPlayerPain(player, source, inflictor);

View file

@ -172,7 +172,7 @@ void P_PlayerThink(player_t *player);
void P_PlayerAfterThink(player_t *player);
void P_DoPlayerExit(player_t *player);
void P_DoTimeOver(player_t *player);
void P_NightserizePlayer(player_t *player, INT32 ptime);
//void P_NightserizePlayer(player_t *player, INT32 ptime);
void P_InstaThrust(mobj_t *mo, angle_t angle, fixed_t move);
fixed_t P_ReturnThrustX(mobj_t *mo, angle_t angle, fixed_t move);
@ -185,12 +185,12 @@ void P_HomingAttack(mobj_t *source, mobj_t *enemy); /// \todo doesn't belong in
//boolean P_SuperReady(player_t *player);
void P_DoJump(player_t *player, boolean soundandstate);
boolean P_AnalogMove(player_t *player);
boolean P_TransferToNextMare(player_t *player);
UINT8 P_FindLowestMare(void);
/*boolean P_TransferToNextMare(player_t *player);
UINT8 P_FindLowestMare(void);*/
UINT8 P_FindLowestLap(void);
UINT8 P_FindHighestLap(void);
void P_FindEmerald(void);
void P_TransferToAxis(player_t *player, INT32 axisnum);
//void P_TransferToAxis(player_t *player, INT32 axisnum);
boolean P_PlayerMoving(INT32 pnum);
void P_SpawnThokMobj(player_t *player);
void P_SpawnSpinMobj(player_t *player, mobjtype_t type);
@ -231,7 +231,7 @@ boolean P_MobjWasRemoved(mobj_t *th);
void P_RemoveSavegameMobj(mobj_t *th);
boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state);
boolean P_SetMobjState(mobj_t *mobj, statenum_t state);
void P_RunShields(void);
//void P_RunShields(void);
void P_RunOverlays(void);
void P_RunShadows(void);
void P_MobjThinker(mobj_t *mobj);
@ -406,12 +406,9 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck);
void P_PlayerFlagBurst(player_t *player, boolean toss);
void P_CheckTimeLimit(void);
void P_CheckPointLimit(void);
void P_CheckSurvivors(void);
//void P_CheckSurvivors(void);
boolean P_CheckRacers(void);
void P_ClearStarPost(INT32 postnum);
void P_ResetStarposts(void);
boolean P_CanPickupItem(player_t *player, UINT8 weapon);
void P_DoNightsScore(player_t *player);

View file

@ -469,7 +469,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
#endif
// Metal Sonic destroys tiny baby objects.
if (tmthing->type == MT_METALSONIC_RACE
/*if (tmthing->type == MT_METALSONIC_RACE
&& (thing->flags & (MF_MISSILE|MF_ENEMY|MF_BOSS) || thing->type == MT_SPIKE))
{
if ((thing->flags & (MF_ENEMY|MF_BOSS)) && (thing->health <= 0 || !(thing->flags & MF_SHOOTABLE)))
@ -495,7 +495,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
P_KillMobj(thing, tmthing, tmthing);
}
return true;
}
}*/
if (!(thing->flags & (MF_SOLID|MF_SPECIAL|MF_PAIN|MF_SHOOTABLE)) || (thing->flags & MF_NOCLIPTHING))
return true;
@ -647,9 +647,9 @@ static boolean PIT_CheckThing(mobj_t *thing)
// check for skulls slamming into things
if (tmthing->flags2 & MF2_SKULLFLY)
{
if (tmthing->type == MT_EGGMOBILE) // Don't make Eggman stop!
/*if (tmthing->type == MT_EGGMOBILE) // Don't make Eggman stop!
return true; // Let him RUN YOU RIGHT OVER. >:3
else
else*/
{
// see if it went over / under
if (tmthing->z > thing->z + thing->height)
@ -1133,7 +1133,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
return true;
// Missiles ignore Brak's helper.
if (thing->type == MT_BLACKEGGMAN_HELPER)
/*if (thing->type == MT_BLACKEGGMAN_HELPER)
return true;
// Hurting Brak
@ -1144,9 +1144,9 @@ static boolean PIT_CheckThing(mobj_t *thing)
if (!(thing->state >= &states[S_BLACKEGG_PAIN1] && thing->state <= &states[S_BLACKEGG_PAIN35]))
P_SetMobjState(thing, thing->info->painstate);
return false;
}
}*/
if (!(thing->flags & MF_SHOOTABLE) && !(thing->type == MT_EGGSHIELD))
if (!(thing->flags & MF_SHOOTABLE)/* && !(thing->type == MT_EGGSHIELD)*/)
{
// didn't do any damage
return !(thing->flags & MF_SOLID);
@ -1157,7 +1157,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
&& thing->player->pflags & PF_CARRIED && thing->tracer == tmthing->target)
return true; // Don't give rings to your carry player by accident.
if (thing->type == MT_EGGSHIELD)
/*if (thing->type == MT_EGGSHIELD)
{
fixed_t touchx, touchy;
angle_t angle;
@ -1183,14 +1183,14 @@ static boolean PIT_CheckThing(mobj_t *thing)
P_KillMobj(thing, tmthing, tmthing);
return false;
}
}
}*/
if (tmthing->type == MT_SHELL && tmthing->threshold > TICRATE)
return true;
// damage / explode
if (tmthing->flags & MF_ENEMY) // An actual ENEMY! (Like the deton, for example)
P_DamageMobj(thing, tmthing, tmthing, 1);
else if (tmthing->type == MT_BLACKEGGMAN_MISSILE && thing->player
/*else if (tmthing->type == MT_BLACKEGGMAN_MISSILE && thing->player
&& (thing->player->pflags & PF_JUMPED)
&& !thing->player->powers[pw_flashing]
&& thing->tracer != tmthing
@ -1230,16 +1230,13 @@ static boolean PIT_CheckThing(mobj_t *thing)
tmthing->x = thing->x;
tmthing->y = thing->y;
P_SetThingPosition(tmthing);
}
}*/
else
P_DamageMobj(thing, tmthing, tmthing->target, 1);
// don't traverse any more
if (tmthing->type == MT_SHELL)
return true;
else
return false;
return (tmthing->type == MT_SHELL);
}
if (thing->flags & MF_PUSHABLE && (tmthing->player || tmthing->flags & MF_PUSHABLE)
@ -1303,7 +1300,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
}
// Respawn rings and items
if ((tmthing->type == MT_NIGHTSDRONE || thing->type == MT_NIGHTSDRONE)
/*if ((tmthing->type == MT_NIGHTSDRONE || thing->type == MT_NIGHTSDRONE)
&& (tmthing->player || thing->player))
{
mobj_t *droneobj = (tmthing->type == MT_NIGHTSDRONE) ? tmthing : thing;
@ -1323,7 +1320,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
}
droneobj->extravalue1 = pl->anotherflyangle;
droneobj->extravalue2 = (INT32)leveltime + TICRATE;
}
}*/
// check for special pickup
if (thing->flags & MF_SPECIAL && tmthing->player && thing->type != MT_POKEY)
@ -1394,7 +1391,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
else if (thing->scale > tmthing->scale + (FRACUNIT/8))
K_SquishPlayer(tmthing->player, thing);
// SRB2kart - Starpower!
// SRB2kart - Invincibility!
if (tmthing->player->kartstuff[k_invincibilitytimer] && !thing->player->kartstuff[k_invincibilitytimer])
P_DamageMobj(thing, tmthing, tmthing, 1);
else if (thing->player->kartstuff[k_invincibilitytimer] && !tmthing->player->kartstuff[k_invincibilitytimer])
@ -1440,7 +1437,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
if (thing->player)
{
// Doesn't matter what gravity player's following! Just do your stuff in YOUR direction only
if (tmthing->eflags & MFE_VERTICALFLIP
/*if (tmthing->eflags & MFE_VERTICALFLIP
&& (tmthing->z + tmthing->height + tmthing->momz < thing->z
|| tmthing->z + tmthing->height + tmthing->momz >= thing->z + thing->height))
;
@ -1462,7 +1459,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
// The tmthing->target allows the pusher of the object
// to get the point if he topples it on an opponent.
}
}
}*/
if (tmthing->type == MT_FAN || tmthing->type == MT_STEAM)
P_DoFanAndGasJet(tmthing, thing);
@ -1585,9 +1582,9 @@ static boolean PIT_CheckThing(mobj_t *thing)
; // Fix a few nasty spring-jumping bugs that happen sometimes.
// Monitors are not treated as solid to players who are jumping, spinning or gliding,
// unless it's a CTF team monitor and you're on the wrong team
else if (thing->flags & MF_MONITOR && tmthing->player && tmthing->player->pflags & (PF_JUMPED|PF_SPINNING|PF_GLIDING)
/*else if (thing->flags & MF_MONITOR && tmthing->player && tmthing->player->pflags & (PF_JUMPED|PF_SPINNING|PF_GLIDING)
&& !((thing->type == MT_REDRINGBOX && tmthing->player->ctfteam != 1) || (thing->type == MT_BLUERINGBOX && tmthing->player->ctfteam != 2)))
;
;*/
// z checking at last
// Treat noclip things as non-solid!
else if ((thing->flags & (MF_SOLID|MF_NOCLIP)) == MF_SOLID

View file

@ -495,7 +495,7 @@ boolean P_WeaponOrPanel(mobjtype_t type)
//
// Power Stone emerald management
//
void P_EmeraldManager(void)
/*void P_EmeraldManager(void)
{
thinker_t *think;
mobj_t *mo;
@ -664,7 +664,7 @@ void P_EmeraldManager(void)
break;
}
}
}
}*/
//
// P_ExplodeMissile
@ -6059,7 +6059,7 @@ static void P_NightsItemChase(mobj_t *thing)
P_Attract(thing, thing->tracer, true);
}
static boolean P_ShieldLook(mobj_t *thing, shieldtype_t shield)
/*static boolean P_ShieldLook(mobj_t *thing, shieldtype_t shield)
{
if (!thing->target || thing->target->health <= 0 || !thing->target->player
|| (thing->target->player->powers[pw_shield] & SH_NOSTACK) == SH_NONE || thing->target->player->powers[pw_super]
@ -6175,7 +6175,7 @@ static boolean P_AddShield(mobj_t *thing)
P_SetTarget(&shields[numshields++], thing);
return true;
}
}*/
void P_RunOverlays(void)
{
@ -6609,7 +6609,7 @@ void P_MobjThinker(mobj_t *mobj)
P_RemoveMobj(mobj);
return;
}
else
P_AddOverlay(mobj);
break;
case MT_SHADOW:
@ -6618,10 +6618,10 @@ void P_MobjThinker(mobj_t *mobj)
P_RemoveMobj(mobj);
return;
}
else
P_AddShadow(mobj);
break;
case MT_BLACKORB:
/*case MT_BLACKORB:
case MT_WHITEORB:
case MT_GREENORB:
case MT_YELLOWORB:
@ -6629,7 +6629,7 @@ void P_MobjThinker(mobj_t *mobj)
case MT_PITYORB:
if (!P_AddShield(mobj))
return;
break;
break;*/
//{ SRB2kart mobs
case MT_ORBINAUT_SHIELD: // Kart orbit/trail items
case MT_JAWZ_SHIELD:
@ -8226,7 +8226,7 @@ void P_MobjThinker(mobj_t *mobj)
return;
case MT_MINEEXPLOSIONSOUND:
if (mobj->health == 100)
S_StartSound(mobj, sfx_prloop);
S_StartSound(mobj, sfx_s3k4e);
mobj->health--;
break;
case MT_BOOSTFLAME:
@ -8262,12 +8262,13 @@ void P_MobjThinker(mobj_t *mobj)
P_SetScale(smoke, mobj->target->scale/2);
smoke->destscale = 3*mobj->target->scale/2;
smoke->scalespeed = FixedMul(smoke->scalespeed, mobj->target->scale);
smoke->momx = mobj->target->momx/2;
smoke->momy = mobj->target->momy/2;
smoke->momz = mobj->target->momz/2;
P_Thrust(smoke, mobj->angle+FixedAngle(P_RandomRange(135, 225)<<FRACBITS), P_RandomRange(0, 8) * mapheaderinfo[gamemap-1]->mobj_scale);
P_Thrust(smoke, mobj->angle+FixedAngle(P_RandomRange(135, 225)<<FRACBITS), P_RandomRange(0, 8) * mobj->target->scale);
}
break;
case MT_SPARKLETRAIL:
@ -8391,7 +8392,7 @@ void P_MobjThinker(mobj_t *mobj)
mobj->destscale = mobj->target->destscale;
P_SetScale(mobj, mobj->target->scale);
mobj->color = mobj->target->color;
mobj->colorized = (mobj->target->player->kartstuff[k_comebackmode] == 1);
mobj->colorized = (mobj->target->player->kartstuff[k_comebackmode]);
if (mobj->target->player->kartstuff[k_comebacktimer] > 0)
{
@ -8405,12 +8406,15 @@ void P_MobjThinker(mobj_t *mobj)
}
else
{
if (mobj->target->player->kartstuff[k_comebackmode] == 0
if (!mobj->target->player->kartstuff[k_comebackmode]
&& mobj->state != &states[mobj->info->spawnstate])
P_SetMobjState(mobj, mobj->info->spawnstate);
else if (mobj->target->player->kartstuff[k_comebackmode] == 1
&& mobj->state != &states[mobj->info->seestate])
P_SetMobjState(mobj, mobj->info->seestate);
else if (mobj->target->player->kartstuff[k_comebackmode] == 2
&& mobj->state != &states[mobj->info->painstate])
P_SetMobjState(mobj, mobj->info->painstate);
if (mobj->target->player->powers[pw_flashing] && (leveltime & 1))
mobj->flags2 |= MF2_DONTDRAW;
@ -8777,7 +8781,7 @@ for (i = ((mobj->flags2 & MF2_STRONGBOX) ? strongboxamt : weakboxamt); i; --i) s
if (P_MobjWasRemoved(mobj))
return;
}
else if (mobj->type == MT_RANDOMITEM && mobj->threshold == 69 && mobj->fuse <= TICRATE)
else if (((mobj->type == MT_RANDOMITEM && mobj->threshold == 69) || mobj->type == MT_FAKEITEM) && mobj->fuse <= TICRATE)
mobj->flags2 ^= MF2_DONTDRAW;
}

View file

@ -2865,7 +2865,6 @@ boolean P_SetupLevel(boolean skipprecip)
if (players[i].starposttime)
{
G_SpawnPlayer(i, true);
P_ClearStarPost(players[i].starpostnum);
}
else
G_SpawnPlayer(i, false);

View file

@ -1707,16 +1707,16 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller
if (actor && actor->player && triggerline->flags & ML_EFFECT4)
{
if (maptol & TOL_NIGHTS)
/*if (maptol & TOL_NIGHTS)
lap = actor->player->mare;
else
else*/
lap = actor->player->laps;
}
else
{
if (maptol & TOL_NIGHTS)
/*if (maptol & TOL_NIGHTS)
lap = P_FindLowestMare();
else
else*/
lap = P_FindLowestLap();
}
@ -4252,7 +4252,6 @@ DoneSection2:
//
//player->starpostangle = player->starposttime = player->starpostnum = 0;
//player->starpostx = player->starposty = player->starpostz = 0;
P_ResetStarposts();
// Play the starpost sound for 'consistency'
// S_StartSound(player->mo, sfx_strpst);

View file

@ -96,10 +96,6 @@ void P_MixUp(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle,
thing->player->starpostangle = starpostangle;
thing->player->starpostnum = starpostnum;
// Reset map starposts for the player's new info.
P_ResetStarposts();
P_ClearStarPost(starpostnum);
P_ResetPlayer(thing->player);
P_SetPlayerMobjState(thing, S_KART_STND1); // SRB2kart - was S_PLAY_STND

View file

@ -310,7 +310,7 @@ static inline void P_RunThinkers(void)
//
// Determine if the teams are unbalanced, and if so, move a player to the other team.
//
static void P_DoAutobalanceTeams(void)
/*static void P_DoAutobalanceTeams(void)
{
changeteam_union NetPacket;
UINT16 usvalue;
@ -562,7 +562,7 @@ static inline void P_DoCTFStuff(void)
if (cv_teamscramble.value && server)
P_DoTeamscrambling();
}
}
}*/
//
// P_Ticker
@ -612,11 +612,11 @@ void P_Ticker(boolean run)
if (!demoplayback) // Don't increment if a demo is playing.
totalplaytime++;
if (!useNightsSS && G_IsSpecialStage(gamemap))
/*if (!useNightsSS && G_IsSpecialStage(gamemap))
P_DoSpecialStageStuff();
if (runemeraldmanager)
P_EmeraldManager(); // Power stone mode
P_EmeraldManager(); // Power stone mode*/
if (run)
{
@ -633,7 +633,7 @@ void P_Ticker(boolean run)
}
// Run shield positioning
P_RunShields();
//P_RunShields();
P_RunOverlays();
P_RunShadows();
@ -648,11 +648,11 @@ void P_Ticker(boolean run)
leveltime++;
timeinmap++;
if (G_TagGametype())
/*if (G_TagGametype())
P_DoTagStuff();
if (G_GametypeHasTeams())
P_DoCTFStuff();
P_DoCTFStuff();*/
if (run)
{
@ -803,7 +803,7 @@ void P_PreTicker(INT32 frames)
#endif
// Run shield positioning
P_RunShields();
//P_RunShields();
P_RunOverlays();
P_UpdateSpecials();

View file

@ -344,7 +344,7 @@ void P_ResetScore(player_t *player)
//
// Returns the lowest open mare available
//
UINT8 P_FindLowestMare(void)
/*UINT8 P_FindLowestMare(void)
{
thinker_t *th;
mobj_t *mo2;
@ -375,7 +375,7 @@ UINT8 P_FindLowestMare(void)
CONS_Debug(DBG_NIGHTS, "Lowest mare found: %d\n", mare);
return mare;
}
}*/
//
// P_FindLowestLap
@ -438,7 +438,7 @@ UINT8 P_FindHighestLap(void)
// (Finds the lowest mare # for capsules that have not been destroyed).
// Returns true if successful, false if there is no other mare.
//
boolean P_TransferToNextMare(player_t *player)
/*boolean P_TransferToNextMare(player_t *player)
{
thinker_t *th;
mobj_t *mo2;
@ -759,7 +759,7 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime)
if (G_IsSpecialStage(gamemap))
{
for (i = 0; i < MAXPLAYERS; i++)
if (playeringame[i]/* && players[i].pflags & PF_NIGHTSMODE*/)
if (playeringame[i])
total_rings += players[i].health-1;
}
@ -782,10 +782,6 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime)
P_AddPlayerScore(&players[i], (players[i].health - 1) * 50);
}
// Add score to leaderboards now
/*if (!(netgame||multiplayer) && P_IsLocalPlayer(&players[i]))
G_AddTempNightsRecords(players[i].marescore, leveltime - player->marebegunat, players[i].mare + 1);*/
// transfer scores anyway
players[i].mo->health = players[i].health = 1;
@ -803,10 +799,6 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime)
player->textvar = 4; // Score and grades
player->finishedrings = (INT16)(player->health - 1);
// Add score to temp leaderboards
/*if (!(netgame||multiplayer) && P_IsLocalPlayer(player))
G_AddTempNightsRecords(player->marescore, leveltime - player->marebegunat, (UINT8)(oldmare + 1));*/
// Starting a new mare, transfer scores
player->marebegunat = leveltime;
@ -824,7 +816,7 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime)
}
player->pflags |= PF_NIGHTSMODE;
}
}*/
//
// P_PlayerInPain
@ -4536,7 +4528,7 @@ INT32 P_GetPlayerControlDirection(player_t *player)
}
// Control scheme for 2d levels.
static void P_2dMovement(player_t *player)
/*static void P_2dMovement(player_t *player)
{
ticcmd_t *cmd;
INT32 topspeed, acceleration, thrustfactor;
@ -4713,7 +4705,7 @@ static void P_2dMovement(player_t *player)
else if (player->rmomx > -topspeed && cmd->sidemove < 0)
P_Thrust(player->mo, movepushangle, movepushforward);
}
}
}*/
//#define OLD_MOVEMENT_CODE 1
static void P_3dMovement(player_t *player)
@ -5004,7 +4996,7 @@ static void P_SpectatorMovement(player_t *player)
// graphical indicator
// for building/debugging
// NiGHTS levels!
static void P_ShootLine(mobj_t *source, mobj_t *dest, fixed_t height)
/*static void P_ShootLine(mobj_t *source, mobj_t *dest, fixed_t height)
{
mobj_t *mo;
INT32 i;
@ -5578,16 +5570,6 @@ static void P_DoNiGHTSCapsule(player_t *player)
UINT8 em = P_GetNextEmerald();
tic_t lowest_time;
/*for (i = 0; i < MAXPLAYERS; i++)
{
if (!playeringame[i] || players[i].spectator || !players[i].mo || !players[i].mo->tracer)
continue;
emmo = P_SpawnMobj(players[i].mo->x, players[i].mo->y, players[i].mo->z + players[i].mo->info->height, MT_GOTEMERALD);
P_SetTarget(&emmo->target, players[i].mo);
P_SetMobjState(emmo, mobjinfo[MT_GOTEMERALD].meleestate + em);
}*/
if (player->mo->tracer)
{
// Only give it to ONE person, and THAT player has to get to the goal!
@ -5683,7 +5665,7 @@ static void P_NiGHTSMovement(player_t *player)
boolean capsule = false;
// NiGHTS special stages have a pseudo-shared timer, so check if ANYONE is feeding the capsule.
for (i = 0; i < MAXPLAYERS; i++)
if (playeringame[i] /*&& players[i].pflags & PF_NIGHTSMODE*/
if (playeringame[i]
&& (players[i].capsule && players[i].capsule->reactiontime))
capsule = true;
if (!capsule
@ -6238,7 +6220,7 @@ static void P_NiGHTSMovement(player_t *player)
if (objectplacing)
OP_NightsObjectplace(player);
}
}*/
// May be used in future for CTF
#if 0
@ -6457,7 +6439,7 @@ void P_ElementalFireTrail(player_t *player)
static void P_MovePlayer(player_t *player)
{
ticcmd_t *cmd;
INT32 i;
//INT32 i;
fixed_t runspd;
@ -6532,7 +6514,7 @@ static void P_MovePlayer(player_t *player)
}
// Locate the capsule for this mare.
else if (maptol & TOL_NIGHTS)
/*else if (maptol & TOL_NIGHTS)
{
if (!player->capsule && !player->bonustime)
{
@ -6585,15 +6567,15 @@ static void P_MovePlayer(player_t *player)
P_DamageMobj(player->mo, NULL, NULL, 1);
player->pflags &= ~PF_NIGHTSFALL;
}
}
}*/
//////////////////////
// MOVEMENT CODE //
//////////////////////
if (twodlevel || player->mo->flags2 & MF2_TWOD) // 2d-level, so special control applies.
/*if (twodlevel || player->mo->flags2 & MF2_TWOD) // 2d-level, so special control applies.
P_2dMovement(player);
else
else*/
{
if (!player->climbing && (!P_AnalogMove(player)))
player->mo->angle = (cmd->angleturn<<16 /* not FRACBITS */);
@ -6680,36 +6662,17 @@ static void P_MovePlayer(player_t *player)
P_SetPlayerMobjState(player->mo, S_KART_STND1); // SRB2kart - was S_PLAY_STND
//{ SRB2kart
// Engine Sounds.
if (!player->exiting)
{
if (player->speed == 0 && onground && player->speed == 0 && leveltime % 6 == 0)
S_StartSound(player->mo, sfx_kart1);
if ((player->speed < runspd && player->speed != 0) && leveltime % 8 == 0)
S_StartSound(player->mo, sfx_kart2);
if ((player->speed > runspd) && leveltime % 8 == 0)
S_StartSound(player->mo, sfx_kart3);
// Drifting sound
{
// Start looping the sound now.
if (leveltime % 50 == 0 && onground
&& player->kartstuff[k_drift] != 0)
if (leveltime % 50 == 0 && onground && player->kartstuff[k_drift] != 0)
S_StartSound(player->mo, sfx_mkdrft);
// Leveltime being 50 might take a while at times. We'll start it up once, isntantly.
else if ((player->kartstuff[k_drift] >= 1 || player->kartstuff[k_drift] <= -1) && !S_SoundPlaying(player->mo, sfx_mkdrft) && onground)
else if (!S_SoundPlaying(player->mo, sfx_mkdrft) && onground && player->kartstuff[k_drift] != 0)
S_StartSound(player->mo, sfx_mkdrft);
// Ok, we'll stop now.
else if ((player->kartstuff[k_drift] == 0)
&& (player == &players[consoleplayer]
|| (splitscreen && player == &players[secondarydisplayplayer])
|| (splitscreen > 1 && player == &players[thirddisplayplayer])
|| (splitscreen > 2 && player == &players[fourthdisplayplayer])))
else if (player->kartstuff[k_drift] == 0)
S_StopSoundByID(player->mo, sfx_mkdrft);
}
}
K_MoveKartPlayer(player, onground);
//}
@ -9442,8 +9405,8 @@ void P_PlayerThink(player_t *player)
player->losstime--;
// Flash player after being hit.
if (!(player->pflags & PF_NIGHTSMODE
|| player->kartstuff[k_hyudorotimer] // SRB2kart - fixes Hyudoro not flashing when it should.
if (!(//player->pflags & PF_NIGHTSMODE ||
player->kartstuff[k_hyudorotimer] // SRB2kart - fixes Hyudoro not flashing when it should.
|| player->kartstuff[k_growshrinktimer] > 0 // Grow doesn't flash either.
|| player->kartstuff[k_respawn] // Respawn timer (for drop dash effect)
|| (G_BattleGametype() && player->kartstuff[k_bumper] <= 0 && player->kartstuff[k_comebacktimer])
@ -9455,13 +9418,13 @@ void P_PlayerThink(player_t *player)
else
player->mo->flags2 &= ~MF2_DONTDRAW;
}
else if (player->mo->tracer)
/*else if (player->mo->tracer)
{
if (player->powers[pw_flashing] & 1)
player->mo->tracer->flags2 |= MF2_DONTDRAW;
else
player->mo->tracer->flags2 &= ~MF2_DONTDRAW;
}
}*/
player->pflags &= ~PF_SLIDING;

View file

@ -222,30 +222,6 @@ void R_PortalClearClipSegs(INT32 start, INT32 end)
newend = solidsegs + 2;
}
// R_DoorClosed
//
// This function is used to fix the automap bug which
// showed lines behind closed doors simply because the door had a dropoff.
//
// It assumes that Doom has already ruled out a door being closed because
// of front-back closure (e.g. front floor is taller than back ceiling).
static INT32 R_DoorClosed(void)
{
return
// if door is closed because back is shut:
backsector->ceilingheight <= backsector->floorheight
// preserve a kind of transparent door/lift special effect:
&& (backsector->ceilingheight >= frontsector->ceilingheight || curline->sidedef->toptexture)
&& (backsector->floorheight <= frontsector->floorheight || curline->sidedef->bottomtexture)
// properly render skies (consider door "open" if both ceilings are sky):
&& (backsector->ceilingpic != skyflatnum || frontsector->ceilingpic != skyflatnum);
}
//
// If player's view height is underneath fake floor, lower the
// drawn ceiling to be just under the floor height, and replace
@ -502,6 +478,8 @@ static void R_AddLine(seg_t *line)
SLOPEPARAMS( backsector->f_slope, backf1, backf2, backsector->floorheight)
SLOPEPARAMS( backsector->c_slope, backc1, backc2, backsector->ceilingheight)
#undef SLOPEPARAMS
if (viewsector != backsector && viewsector != frontsector)
{
if ((backc1 <= frontf1 && backc2 <= frontf2)
|| (backf1 >= frontc1 && backf2 >= frontc2))
{
@ -516,6 +494,7 @@ static void R_AddLine(seg_t *line)
if (doorclosed)
goto clipsolid;
}
// Window.
if (backc1 != frontc1 || backc2 != frontc2
@ -526,6 +505,8 @@ static void R_AddLine(seg_t *line)
}
else
#endif
{
if (viewsector != backsector && viewsector != frontsector)
{
if (backsector->ceilingheight <= frontsector->floorheight
|| backsector->floorheight >= frontsector->ceilingheight)
@ -534,9 +515,14 @@ static void R_AddLine(seg_t *line)
}
// Check for automap fix. Store in doorclosed for r_segs.c
doorclosed = R_DoorClosed();
doorclosed = (backsector->ceilingheight <= backsector->floorheight
&& (backsector->ceilingheight >= frontsector->ceilingheight || curline->sidedef->toptexture)
&& (backsector->floorheight <= frontsector->floorheight || curline->sidedef->bottomtexture)
&& (backsector->ceilingpic != skyflatnum || frontsector->ceilingpic != skyflatnum));
if (doorclosed)
goto clipsolid;
}
// Window.
if (backsector->ceilingheight != frontsector->ceilingheight

View file

@ -1365,7 +1365,7 @@ static void R_RenderSegLoop (void)
if (bottom >= floorclip[rw_x])
bottom = floorclip[rw_x]-1;
if (top <= bottom)
if (top <= bottom && ceilingplane)
{
ceilingplane->top[rw_x] = (INT16)top;
ceilingplane->bottom[rw_x] = (INT16)bottom;
@ -2113,6 +2113,8 @@ void R_StoreWallRange(INT32 start, INT32 stop)
// ds_p->sprtopclip = screenheightarray;
}
if (viewsector != frontsector && viewsector != backsector)
{
#ifdef ESLOPE
if (worldhigh <= worldbottom && worldhighslope <= worldbottomslope)
#else
@ -2160,6 +2162,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
ds_p->silhouette |= SIL_TOP;
}
}
}
if (worldlow != worldbottom
#ifdef ESLOPE

View file

@ -771,9 +771,6 @@ sfxinfo_t S_sfx[NUMSFX] =
{"lkt1", true, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"lkt2", true, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"lkt3", true, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kart1", false, 48, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kart2", false, 48, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kart3", false, 48, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"mlap", true, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"sboost", true, 90, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"mush", false, 90, 0, -1, NULL, 0, -1, -1, LUMPERROR},
@ -821,6 +818,134 @@ sfxinfo_t S_sfx[NUMSFX] =
{"itfree", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"dbgsal", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR},
// SRB2Kart - Engine sounds
// Engine class A
{"krta00", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krta01", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krta02", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krta03", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krta04", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krta05", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krta06", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krta07", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krta08", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krta09", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krta10", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krta11", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krta12", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
// Engine class B
{"krtb00", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtb01", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtb02", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtb03", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtb04", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtb05", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtb06", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtb07", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtb08", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtb09", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtb10", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtb11", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtb12", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
// Engine class C
{"krtc00", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtc01", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtc02", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtc03", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtc04", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtc05", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtc06", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtc07", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtc08", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtc09", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtc10", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtc11", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtc12", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
// Engine class D
{"krtd00", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtd01", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtd02", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtd03", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtd04", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtd05", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtd06", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtd07", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtd08", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtd09", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtd10", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtd11", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtd12", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
// Engine class E
{"krte00", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krte01", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krte02", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krte03", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krte04", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krte05", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krte06", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krte07", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krte08", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krte09", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krte10", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krte11", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krte12", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
// Engine class F
{"krtf00", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtf01", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtf02", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtf03", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtf04", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtf05", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtf06", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtf07", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtf08", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtf09", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtf10", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtf11", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtf12", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
// Engine class G
{"krtg00", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtg01", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtg02", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtg03", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtg04", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtg05", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtg06", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtg07", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtg08", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtg09", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtg10", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtg11", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krtg12", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
// Engine class H
{"krth00", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krth01", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krth02", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krth03", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krth04", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krth05", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krth06", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krth07", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krth08", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krth09", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krth10", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krth11", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krth12", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
// Engine class I
{"krti00", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krti01", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krti02", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krti03", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krti04", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krti05", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krti06", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krti07", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krti08", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krti09", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krti10", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krti11", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"krti12", false, 48, 64, -1, NULL, 0, -1, -1, LUMPERROR},
// SRB2kart - Skin sounds
{"kwin", false, 64, 96, -1, NULL, 0, SKSKWIN, -1, LUMPERROR},
{"klose", false, 64, 96, -1, NULL, 0, SKSKLOSE, -1, LUMPERROR},

View file

@ -846,9 +846,6 @@ typedef enum
sfx_lkt1,
sfx_lkt2,
sfx_lkt3,
sfx_kart1,
sfx_kart2,
sfx_kart3,
sfx_mlap,
sfx_sboost,
sfx_mush,
@ -896,6 +893,135 @@ typedef enum
sfx_itfree,
sfx_dbgsal,
// Next up: UNIQUE ENGINE SOUNDS! Hoooooo boy...
// Engine class A - Low Speed, Low Weight
sfx_krta00,
sfx_krta01,
sfx_krta02,
sfx_krta03,
sfx_krta04,
sfx_krta05,
sfx_krta06,
sfx_krta07,
sfx_krta08,
sfx_krta09,
sfx_krta10,
sfx_krta11,
sfx_krta12,
// Engine class B - Average Speed, Low Weight
sfx_krtb00,
sfx_krtb01,
sfx_krtb02,
sfx_krtb03,
sfx_krtb04,
sfx_krtb05,
sfx_krtb06,
sfx_krtb07,
sfx_krtb08,
sfx_krtb09,
sfx_krtb10,
sfx_krtb11,
sfx_krtb12,
// Engine class C - High Speed, Low Weight
sfx_krtc00,
sfx_krtc01,
sfx_krtc02,
sfx_krtc03,
sfx_krtc04,
sfx_krtc05,
sfx_krtc06,
sfx_krtc07,
sfx_krtc08,
sfx_krtc09,
sfx_krtc10,
sfx_krtc11,
sfx_krtc12,
// Engine class D - Low Speed, Average Weight
sfx_krtd00,
sfx_krtd01,
sfx_krtd02,
sfx_krtd03,
sfx_krtd04,
sfx_krtd05,
sfx_krtd06,
sfx_krtd07,
sfx_krtd08,
sfx_krtd09,
sfx_krtd10,
sfx_krtd11,
sfx_krtd12,
// Engine class E - Average Speed, Average Weight
sfx_krte00,
sfx_krte01,
sfx_krte02,
sfx_krte03,
sfx_krte04,
sfx_krte05,
sfx_krte06,
sfx_krte07,
sfx_krte08,
sfx_krte09,
sfx_krte10,
sfx_krte11,
sfx_krte12,
// Engine class F - High Speed, Average Weight
sfx_krtf00,
sfx_krtf01,
sfx_krtf02,
sfx_krtf03,
sfx_krtf04,
sfx_krtf05,
sfx_krtf06,
sfx_krtf07,
sfx_krtf08,
sfx_krtf09,
sfx_krtf10,
sfx_krtf11,
sfx_krtf12,
// Engine class G - Low Speed, High Weight
sfx_krtg00,
sfx_krtg01,
sfx_krtg02,
sfx_krtg03,
sfx_krtg04,
sfx_krtg05,
sfx_krtg06,
sfx_krtg07,
sfx_krtg08,
sfx_krtg09,
sfx_krtg10,
sfx_krtg11,
sfx_krtg12,
// Engine class H - Average Speed, High Weight
sfx_krth00,
sfx_krth01,
sfx_krth02,
sfx_krth03,
sfx_krth04,
sfx_krth05,
sfx_krth06,
sfx_krth07,
sfx_krth08,
sfx_krth09,
sfx_krth10,
sfx_krth11,
sfx_krth12,
// Engine class I - High Speed, High Weight
sfx_krti00,
sfx_krti01,
sfx_krti02,
sfx_krti03,
sfx_krti04,
sfx_krti05,
sfx_krti06,
sfx_krti07,
sfx_krti08,
sfx_krti09,
sfx_krti10,
sfx_krti11,
sfx_krti12,
// And LASTLY, Kart's skin sounds.
sfx_kwin,
sfx_klose,
sfx_khurt1,

View file

@ -1952,14 +1952,13 @@ static void ST_overlayDrawer(void)
)
{
// SRB2kart: changed positions & text
V_DrawString(2, BASEVIDHEIGHT-50, V_HUDTRANSHALF|V_YELLOWMAP, M_GetText("- SPECTATING -"));
V_DrawString(2, BASEVIDHEIGHT-40, V_HUDTRANSHALF|V_YELLOWMAP, M_GetText("- SPECTATING -"));
if (stplyr->pflags & PF_WANTSTOJOIN)
V_DrawString(2, BASEVIDHEIGHT-40, V_HUDTRANSHALF, M_GetText("Item - Cancel Join"));
V_DrawString(2, BASEVIDHEIGHT-30, V_HUDTRANSHALF, M_GetText("Item - Cancel Join"));
/*else if (G_GametypeHasTeams())
V_DrawString(2, BASEVIDHEIGHT-40, V_HUDTRANSHALF, M_GetText("Item - Join Team"));*/
V_DrawString(2, BASEVIDHEIGHT-30, V_HUDTRANSHALF, M_GetText("Item - Join Team"));*/
else
V_DrawString(2, BASEVIDHEIGHT-40, V_HUDTRANSHALF, M_GetText("Item - Join Game"));
V_DrawString(2, BASEVIDHEIGHT-30, V_HUDTRANSHALF, M_GetText("F12 - Change View"));
V_DrawString(2, BASEVIDHEIGHT-30, V_HUDTRANSHALF, M_GetText("Item - Join Game"));
V_DrawString(2, BASEVIDHEIGHT-20, V_HUDTRANSHALF, M_GetText("Accelerate - Float"));
V_DrawString(2, BASEVIDHEIGHT-10, V_HUDTRANSHALF, M_GetText("Brake - Sink"));
}

View file

@ -820,6 +820,10 @@ void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c)
else if (!(c & V_SNAPTOTOP))
y += (vid.height - (BASEVIDHEIGHT * dupy)) / 2;
}
if (c & V_SPLITSCREEN)
y += (BASEVIDHEIGHT * dupy)/2;
if (c & V_HORZSCREEN)
x += (BASEVIDWIDTH * dupx)/2;
}
if (x >= vid.width || y >= vid.height)
@ -901,6 +905,10 @@ void V_DrawDiag(INT32 x, INT32 y, INT32 wh, INT32 c)
else if (!(c & V_SNAPTOTOP))
y += (vid.height - (BASEVIDHEIGHT * dupy)) / 2;
}
if (c & V_SPLITSCREEN)
y += (BASEVIDHEIGHT * dupy)/2;
if (c & V_HORZSCREEN)
x += (BASEVIDWIDTH * dupx)/2;
}
if (x >= vid.width || y >= vid.height)

View file

@ -560,13 +560,13 @@ void Y_Ticker(void)
// Team scramble code for team match and CTF.
// Don't do this if we're going to automatically scramble teams next round.
if (G_GametypeHasTeams() && cv_teamscramble.value && !cv_scrambleonchange.value && server)
/*if (G_GametypeHasTeams() && cv_teamscramble.value && !cv_scrambleonchange.value && server)
{
// If we run out of time in intermission, the beauty is that
// the P_Ticker() team scramble code will pick it up.
if ((intertic % (TICRATE/7)) == 0)
P_DoTeamscrambling();
}
}*/
// multiplayer uses timer (based on cv_inttime)
if (timer)