Merge branch 'Saturn-Testing' into patchntexrefactor
This commit is contained in:
commit
2468277068
21 files changed
+376
-524
No files matched your search
+3
-3
@@ -827,7 +827,7 @@ boolean CON_Responder(event_t *ev)
|
||||
// let go keyup events, don't eat them
|
||||
if (ev->type != ev_keydown && ev->type != ev_console)
|
||||
{
|
||||
if (ev->data1 == gamecontrol[gc_console][0] || ev->data1 == gamecontrol[gc_console][1])
|
||||
if (ev->data1 == gamecontrol[0][gc_console][0] || ev->data1 == gamecontrol[0][gc_console][1])
|
||||
consdown = false;
|
||||
return false;
|
||||
}
|
||||
@@ -845,7 +845,7 @@ boolean CON_Responder(event_t *ev)
|
||||
INT32 i;
|
||||
for (i = 0; i < num_gamecontrols; i++)
|
||||
{
|
||||
if (gamecontrol[i][0] == ev->data1 || gamecontrol[i][1] == ev->data1)
|
||||
if (gamecontrol[0][i][0] == ev->data1 || gamecontrol[0][i][1] == ev->data1)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -853,7 +853,7 @@ boolean CON_Responder(event_t *ev)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (key == gamecontrol[gc_console][0] || key == gamecontrol[gc_console][1])
|
||||
if (key == gamecontrol[0][gc_console][0] || key == gamecontrol[0][gc_console][1])
|
||||
{
|
||||
if (consdown) // ignore repeat
|
||||
return true;
|
||||
|
||||
+2
-2
@@ -2261,13 +2261,13 @@ static void M_ConfirmConnect(event_t *ev)
|
||||
#ifndef NONET
|
||||
if (ev->type == ev_keydown)
|
||||
{
|
||||
if (ev->data1 == ' ' || ev->data1 == 'y' || ev->data1 == KEY_ENTER || ev->data1 == gamecontrol[gc_accelerate][0] || ev->data1 == gamecontrol[gc_accelerate][1])
|
||||
if (ev->data1 == ' ' || ev->data1 == 'y' || ev->data1 == KEY_ENTER || ev->data1 == gamecontrol[0][gc_accelerate][0] || ev->data1 == gamecontrol[0][gc_accelerate][1])
|
||||
{
|
||||
CL_ConfirmConnect();
|
||||
|
||||
M_ClearMenus(true);
|
||||
}
|
||||
else if (ev->data1 == 'n' || ev->data1 == KEY_ESCAPE|| ev->data1 == gamecontrol[gc_brake][0] || ev->data1 == gamecontrol[gc_brake][1])
|
||||
else if (ev->data1 == 'n' || ev->data1 == KEY_ESCAPE|| ev->data1 == gamecontrol[0][gc_brake][0] || ev->data1 == gamecontrol[0][gc_brake][1])
|
||||
{
|
||||
cl_mode = CL_ABORTED;
|
||||
M_ClearMenus(true);
|
||||
|
||||
+12
-41
@@ -4453,7 +4453,7 @@ static void Command_Addfilelocal(void)
|
||||
// Add any wad file, ignoring checks for if it contains complex things like
|
||||
// lua. Great for complex but client-side customizations, like different
|
||||
// level cards or anything like that.
|
||||
P_AddWadFileLocal(fn);
|
||||
P_AddWadFile(fn, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -4548,38 +4548,9 @@ static void Command_Addfile(void)
|
||||
|
||||
/** Adds something at runtime.
|
||||
*/
|
||||
static void
|
||||
Command_Addskins (void)
|
||||
static void Command_Addskins(void)
|
||||
{
|
||||
if (COM_Argc() > 3)
|
||||
{
|
||||
CONS_Printf(
|
||||
"addskins <file>: Load a skin file.\n");
|
||||
return;
|
||||
}
|
||||
// no forcing?
|
||||
/*
|
||||
if (fasticmp(COM_Argv(2), "-force") || fasticmp(COM_Argv(2), "-f")) {
|
||||
CONS_Alert(CONS_NOTICE, M_GetText("Adding file %s. May or may not be a skin.\n"), COM_Argv(1));
|
||||
P_AddWadFile(COM_Argv(1), 0, true);
|
||||
} else {
|
||||
if (DumbStartsWith("KC_", COM_Argv(1))) {
|
||||
P_AddWadFile(COM_Argv(1), 0, true);
|
||||
} else if (DumbStartsWith("KCL_", COM_Argv(1))) {
|
||||
if (!demo.playback) {
|
||||
CONS_Alert(CONS_ERROR, M_GetText("Cannot add file %s as it is a skin with lua. Include -force or -f to force it to load.\n"), COM_Argv(1));
|
||||
return;
|
||||
} else {
|
||||
*/
|
||||
P_AddWadFile(COM_Argv(1), true);
|
||||
/*
|
||||
}
|
||||
} else {
|
||||
CONS_Alert(CONS_ERROR, M_GetText("Cannot add file %s as it is not a skin.\n"), COM_Argv(1));
|
||||
return;
|
||||
}
|
||||
}
|
||||
*/
|
||||
CONS_Printf("addskins has been deprecated\nuse addfilelocal instead!\n");
|
||||
}
|
||||
|
||||
static void Command_GLocalSkin (void)
|
||||
@@ -4595,7 +4566,7 @@ static void Command_GLocalSkin (void)
|
||||
|
||||
char* fuck; // local skin name
|
||||
|
||||
if (!( first_option = COM_FirstOption() ))
|
||||
if (!(first_option = COM_FirstOption()))
|
||||
first_option = COM_Argc();
|
||||
|
||||
if (first_option < 2)
|
||||
@@ -4603,14 +4574,14 @@ static void Command_GLocalSkin (void)
|
||||
/* holy fucking shit */
|
||||
CONS_Printf("localskin <name> [-player <name>] [-display <number>] [-all]:\n");
|
||||
CONS_Printf(M_GetText("Set a localskin via its internal name (usually printed on the console).\n\n\
|
||||
* Using \"-player\" will set a localskin to a specified player.\n\
|
||||
Defaults to yourself.\n\
|
||||
* Using \"-display\" will set a localskin to the displayed player.\n\
|
||||
Defaults to 0, which is the first player displayed.\n\
|
||||
Can go up to 3 for splitscreen.\n\
|
||||
* Using \"-all\" will set a localskin to ALL players.\n\
|
||||
* \"localskin none\" removes the localskin, just like how\n\
|
||||
\"forceskin none\" does.\n"));
|
||||
* Using \"-player\" will set a localskin to a specified player.\n\
|
||||
Defaults to yourself.\n\
|
||||
* Using \"-display\" will set a localskin to the displayed player.\n\
|
||||
Defaults to 0, which is the first player displayed.\n\
|
||||
Can go up to 3 for splitscreen.\n\
|
||||
* Using \"-all\" will set a localskin to ALL players.\n\
|
||||
* \"localskin none\" removes the localskin, just like how\n\
|
||||
\"forceskin none\" does.\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -244,7 +244,7 @@ typedef struct
|
||||
INT16 nextlevel; ///< Map number of next level, or 1100-1102 to end.
|
||||
char musname[7]; ///< Music track to play. "" for no music.
|
||||
UINT16 mustrack; ///< Subsong to play. Only really relevant for music modules and specific formats supported by GME. 0 to ignore.
|
||||
UINT32 muspos; ///< Music position to jump to.
|
||||
UINT32 muspos; ///< Music position to jump to.
|
||||
char forcecharacter[17]; ///< (SKINNAMESIZE+1) Skin to switch to or "" to disable.
|
||||
UINT8 weather; ///< 0 = sunny day, 1 = storm, 2 = snow, 3 = rain, 4 = blank, 5 = thunder w/o rain, 6 = rain w/o lightning, 7 = heat wave.
|
||||
INT16 skynum; ///< Sky number to use.
|
||||
@@ -276,7 +276,7 @@ typedef struct
|
||||
|
||||
// SRB2kart
|
||||
//boolean automap; ///< Displays a level's white map outline in modified games
|
||||
fixed_t mobj_scale; ///< Replacement for TOL_ERZ3
|
||||
fixed_t mobj_scale; ///< Replacement for TOL_ERZ3
|
||||
|
||||
mapheader_lighting_t lighting; ///< Wall and sprite lighting
|
||||
mapheader_lighting_t lighting_encore; ///< Alternative lighting for Encore mode
|
||||
|
||||
+153
-198
@@ -1277,7 +1277,8 @@ static void G_DoLoadLevel(boolean resetplayer)
|
||||
|
||||
// clear cmd building stuff
|
||||
memset(gamekeydown, 0, sizeof (gamekeydown));
|
||||
for (i = 0;i < JOYAXISSET; i++)
|
||||
|
||||
for (i = 0; i < JOYAXISSET; i++)
|
||||
{
|
||||
joyxmove[i] = joyymove[i] = 0;
|
||||
joy2xmove[i] = joy2ymove[i] = 0;
|
||||
@@ -1298,92 +1299,32 @@ static INT32 pausedelay = 0;
|
||||
static INT32 camtoggledelay[MAXSPLITSCREENPLAYERS] = {0,0,0,0};
|
||||
static INT32 spectatedelay[MAXSPLITSCREENPLAYERS] = {0,0,0,0};
|
||||
|
||||
//
|
||||
// G_Responder
|
||||
// Get info needed to make ticcmd_ts for the players.
|
||||
//
|
||||
boolean G_Responder(event_t *ev)
|
||||
static void G_ToggleSpectate(INT32 player)
|
||||
{
|
||||
// any other key pops up menu if in demos
|
||||
if (gameaction == ga_nothing && !demo.quitafterplaying &&
|
||||
((demo.playback && !modeattacking && !demo.title && !multiplayer) || gamestate == GS_TITLESCREEN))
|
||||
switch (player)
|
||||
{
|
||||
if (ev->type == ev_keydown && ev->data1 != 301)
|
||||
{
|
||||
M_StartControlPanel();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else if (demo.playback && demo.title)
|
||||
{
|
||||
// Title demo uses intro responder
|
||||
if (F_IntroResponder(ev))
|
||||
{
|
||||
// stop the title demo
|
||||
G_CheckDemoStatus();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
case 0:
|
||||
COM_ImmedExecute("changeteam spectator");
|
||||
break;
|
||||
case 1:
|
||||
COM_ImmedExecute("changeteam2 spectator");
|
||||
break;
|
||||
case 2:
|
||||
COM_ImmedExecute("changeteam3 spectator");
|
||||
break;
|
||||
case 3:
|
||||
COM_ImmedExecute("changeteam4 spectator");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (gamestate == GS_LEVEL)
|
||||
{
|
||||
if (HU_Responder(ev))
|
||||
return true; // chat ate the event
|
||||
if (AM_Responder(ev))
|
||||
return true; // automap ate it
|
||||
// map the event (key/mouse/joy) to a gamecontrol
|
||||
}
|
||||
// Intro
|
||||
else if (gamestate == GS_INTRO)
|
||||
{
|
||||
if (F_IntroResponder(ev))
|
||||
{
|
||||
D_StartTitle();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (gamestate == GS_CUTSCENE)
|
||||
{
|
||||
if (HU_Responder(ev))
|
||||
return true; // chat ate the event
|
||||
|
||||
if (F_CutsceneResponder(ev))
|
||||
{
|
||||
D_StartTitle();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
else if (gamestate == GS_CREDITS)
|
||||
{
|
||||
if (HU_Responder(ev))
|
||||
return true; // chat ate the event
|
||||
|
||||
if (F_CreditResponder(ev))
|
||||
{
|
||||
F_StartGameEvaluation();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
else if (gamestate == GS_CONTINUING)
|
||||
{
|
||||
if (F_ContinueResponder(ev))
|
||||
return true;
|
||||
}
|
||||
// Demo End
|
||||
else if (gamestate == GS_GAMEEND || gamestate == GS_EVALUATION || gamestate == GS_CREDITS)
|
||||
return true;
|
||||
|
||||
else if (gamestate == GS_INTERMISSION || gamestate == GS_VOTING || gamestate == GS_WAITINGPLAYERS)
|
||||
if (HU_Responder(ev))
|
||||
return true; // chat ate the event
|
||||
|
||||
static boolean G_LevelResponder(event_t *ev)
|
||||
{
|
||||
// allow spy mode changes even during the demo
|
||||
if (gamestate == GS_LEVEL && ev->type == ev_keydown
|
||||
&& (ev->data1 == KEY_F12 || ev->data1 == gamecontrol[gc_viewpoint][0] || ev->data1 == gamecontrol[gc_viewpoint][1]))
|
||||
if (ev->type == ev_keydown
|
||||
&& (ev->data1 == KEY_F12
|
||||
|| ev->data1 == gamecontrol[0][gc_viewpoint][0]
|
||||
|| ev->data1 == gamecontrol[0][gc_viewpoint][1]))
|
||||
{
|
||||
if (!demo.playback && (splitscreen || !netgame))
|
||||
displayplayers[0] = consoleplayer;
|
||||
@@ -1399,31 +1340,21 @@ boolean G_Responder(event_t *ev)
|
||||
}
|
||||
}
|
||||
|
||||
if (gamestate == GS_LEVEL && ev->type == ev_keydown && multiplayer && demo.playback)
|
||||
if (ev->type == ev_keydown && multiplayer && demo.playback)
|
||||
{
|
||||
if (ev->data1 == gamecontrolbis[gc_viewpoint][0] || ev->data1 == gamecontrolbis[gc_viewpoint][1])
|
||||
for (INT32 i = 1; i <= splitscreen; i++)
|
||||
{
|
||||
G_AdjustView(2, 1, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (ev->data1 == gamecontrol3[gc_viewpoint][0] || ev->data1 == gamecontrol3[gc_viewpoint][1])
|
||||
{
|
||||
G_AdjustView(3, 1, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (ev->data1 == gamecontrol4[gc_viewpoint][0] || ev->data1 == gamecontrol4[gc_viewpoint][1])
|
||||
{
|
||||
G_AdjustView(4, 1, true);
|
||||
|
||||
return true;
|
||||
if (ev->data1 == gamecontrol[i][gc_viewpoint][0]
|
||||
|| ev->data1 == gamecontrol[i][gc_viewpoint][1])
|
||||
{
|
||||
G_AdjustView(i+1, 1, true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Allow pausing
|
||||
if (
|
||||
ev->data1 == gamecontrol[gc_pause][0]
|
||||
|| ev->data1 == gamecontrol[gc_pause][1]
|
||||
if (ev->data1 == gamecontrol[0][gc_pause][0]
|
||||
|| ev->data1 == gamecontrol[0][gc_pause][1]
|
||||
|| ev->data1 == KEY_PAUSE
|
||||
)
|
||||
{
|
||||
@@ -1447,19 +1378,106 @@ boolean G_Responder(event_t *ev)
|
||||
if (ev->data1 == 32)
|
||||
{
|
||||
M_StartControlPanel();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// G_Responder
|
||||
// Get info needed to make ticcmd_ts for the players.
|
||||
//
|
||||
boolean G_Responder(event_t *ev)
|
||||
{
|
||||
if (demo.playback && demo.title)
|
||||
{
|
||||
// Title demo uses intro responder
|
||||
if (F_IntroResponder(ev))
|
||||
{
|
||||
// stop the title demo
|
||||
G_CheckDemoStatus();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
else if (gameaction == ga_nothing
|
||||
&& !demo.quitafterplaying
|
||||
&& ((demo.playback && !modeattacking && !multiplayer) || gamestate == GS_TITLESCREEN))
|
||||
{
|
||||
// any other key pops up menu if in demos
|
||||
if (ev->type == ev_keydown && ev->data1 != 301)
|
||||
{
|
||||
M_StartControlPanel();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Playing())
|
||||
{
|
||||
// If you're playing, chat is real.
|
||||
// Neatly sidesteps a class of bugs where whenever we add a
|
||||
// new gamestate accessible in netplay, chat was console-only.
|
||||
if (HU_Responder(ev))
|
||||
{
|
||||
return true; // chat ate the event
|
||||
}
|
||||
}
|
||||
|
||||
switch (gamestate)
|
||||
{
|
||||
case GS_LEVEL:
|
||||
if (AM_Responder(ev))
|
||||
return true; // automap ate it
|
||||
// map the event (key/mouse/joy) to a gamecontrol
|
||||
if (G_LevelResponder(ev))
|
||||
return true;
|
||||
break;
|
||||
case GS_INTRO:
|
||||
if (F_IntroResponder(ev))
|
||||
{
|
||||
D_StartTitle();
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case GS_CUTSCENE:
|
||||
if (F_CutsceneResponder(ev))
|
||||
{
|
||||
D_StartTitle();
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case GS_CREDITS:
|
||||
if (F_CreditResponder(ev))
|
||||
{
|
||||
F_StartGameEvaluation();
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case GS_CONTINUING:
|
||||
if (F_ContinueResponder(ev))
|
||||
return true;
|
||||
break;
|
||||
case GS_GAMEEND:
|
||||
case GS_EVALUATION:
|
||||
return true; // Demo End
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// update keys current state
|
||||
G_MapEventsToControls(ev);
|
||||
|
||||
switch (ev->type)
|
||||
{
|
||||
case ev_keydown:
|
||||
if (ev->data1 == gamecontrol[gc_pause][0]
|
||||
|| ev->data1 == gamecontrol[gc_pause][1]
|
||||
if (ev->data1 == gamecontrol[0][gc_pause][0]
|
||||
|| ev->data1 == gamecontrol[0][gc_pause][1]
|
||||
|| ev->data1 == KEY_PAUSE)
|
||||
{
|
||||
if (!pausedelay)
|
||||
@@ -1474,121 +1492,58 @@ boolean G_Responder(event_t *ev)
|
||||
else
|
||||
pausedelay = NEWTICRATE/7;
|
||||
}
|
||||
if (ev->data1 == gamecontrol[gc_camtoggle][0]
|
||||
|| ev->data1 == gamecontrol[gc_camtoggle][1])
|
||||
{
|
||||
if (!camtoggledelay[0])
|
||||
{
|
||||
camtoggledelay[0] = NEWTICRATE / 7;
|
||||
CV_SetValue(&cv_chasecam[0], cv_chasecam[0].value ? 0 : 1);
|
||||
}
|
||||
}
|
||||
if (ev->data1 == gamecontrolbis[gc_camtoggle][0]
|
||||
|| ev->data1 == gamecontrolbis[gc_camtoggle][1])
|
||||
{
|
||||
if (!camtoggledelay[1])
|
||||
{
|
||||
camtoggledelay[1] = NEWTICRATE / 7;
|
||||
CV_SetValue(&cv_chasecam[1], cv_chasecam[1].value ? 0 : 1);
|
||||
}
|
||||
}
|
||||
if (ev->data1 == gamecontrol3[gc_camtoggle][0]
|
||||
|| ev->data1 == gamecontrol3[gc_camtoggle][1])
|
||||
{
|
||||
if (!camtoggledelay[2])
|
||||
{
|
||||
camtoggledelay[2] = NEWTICRATE / 7;
|
||||
CV_SetValue(&cv_chasecam[2], cv_chasecam[2].value ? 0 : 1);
|
||||
}
|
||||
}
|
||||
if (ev->data1 == gamecontrol4[gc_camtoggle][0]
|
||||
|| ev->data1 == gamecontrol4[gc_camtoggle][1])
|
||||
{
|
||||
if (!camtoggledelay[3])
|
||||
{
|
||||
camtoggledelay[3] = NEWTICRATE / 7;
|
||||
CV_SetValue(&cv_chasecam[3], cv_chasecam[3].value ? 0 : 1);
|
||||
}
|
||||
}
|
||||
if (ev->data1 == gamecontrol[gc_spectate][0]
|
||||
|| ev->data1 == gamecontrol[gc_spectate][1])
|
||||
{
|
||||
if (!spectatedelay[0])
|
||||
{
|
||||
spectatedelay[0] = NEWTICRATE / 7;
|
||||
COM_ImmedExecute("changeteam spectator");
|
||||
}
|
||||
}
|
||||
if (ev->data1 == gamecontrolbis[gc_spectate][0]
|
||||
|| ev->data1 == gamecontrolbis[gc_spectate][1])
|
||||
{
|
||||
if (!spectatedelay[1])
|
||||
{
|
||||
spectatedelay[1] = NEWTICRATE / 7;
|
||||
COM_ImmedExecute("changeteam2 spectator");
|
||||
}
|
||||
}
|
||||
if (ev->data1 == gamecontrol3[gc_spectate][0]
|
||||
|| ev->data1 == gamecontrol3[gc_spectate][1])
|
||||
{
|
||||
if (!spectatedelay[2])
|
||||
{
|
||||
spectatedelay[2] = NEWTICRATE / 7;
|
||||
COM_ImmedExecute("changeteam3 spectator");
|
||||
}
|
||||
}
|
||||
if (ev->data1 == gamecontrol4[gc_spectate][0]
|
||||
|| ev->data1 == gamecontrol4[gc_spectate][1])
|
||||
{
|
||||
if (!spectatedelay[3])
|
||||
{
|
||||
spectatedelay[3] = NEWTICRATE / 7;
|
||||
COM_ImmedExecute("changeteam4 spectator");
|
||||
}
|
||||
}
|
||||
|
||||
if (ev->data1 == gamecontrol[gc_director][0] || ev->data1 == gamecontrol[gc_director][1])
|
||||
// no splitscreen support for director here
|
||||
if (ev->data1 == gamecontrol[0][gc_director][0]
|
||||
|| ev->data1 == gamecontrol[0][gc_director][1])
|
||||
{
|
||||
K_ToggleDirector();
|
||||
}
|
||||
|
||||
if (ev->data1 == gamecontrol[gc_freecam][0] || ev->data1 == gamecontrol[gc_freecam][1])
|
||||
// absolutely horrid
|
||||
for (INT32 i = 0; i <= splitscreen; i++)
|
||||
{
|
||||
P_ToggleDemoCamera(0);
|
||||
}
|
||||
else if (ev->data1 == gamecontrolbis[gc_freecam][0] || ev->data1 == gamecontrolbis[gc_freecam][1])
|
||||
{
|
||||
P_ToggleDemoCamera(1);
|
||||
}
|
||||
else if (ev->data1 == gamecontrol3[gc_freecam][0] || ev->data1 == gamecontrol3[gc_freecam][1])
|
||||
{
|
||||
P_ToggleDemoCamera(2);
|
||||
}
|
||||
else if (ev->data1 == gamecontrol4[gc_freecam][0] || ev->data1 == gamecontrol4[gc_freecam][1])
|
||||
{
|
||||
P_ToggleDemoCamera(3);
|
||||
if (ev->data1 == gamecontrol[i][gc_camtoggle][0]
|
||||
|| ev->data1 == gamecontrol[i][gc_camtoggle][1])
|
||||
{
|
||||
if (!camtoggledelay[i])
|
||||
{
|
||||
camtoggledelay[i] = NEWTICRATE / 7;
|
||||
CV_SetValue(&cv_chasecam[i], (cv_chasecam[i].value ^ 1));
|
||||
}
|
||||
}
|
||||
|
||||
if (ev->data1 == gamecontrol[i][gc_spectate][0]
|
||||
|| ev->data1 == gamecontrol[i][gc_spectate][1])
|
||||
{
|
||||
if (!spectatedelay[i])
|
||||
{
|
||||
spectatedelay[i] = NEWTICRATE / 7;
|
||||
G_ToggleSpectate(i);
|
||||
}
|
||||
}
|
||||
|
||||
if (ev->data1 == gamecontrol[i][gc_freecam][0]
|
||||
|| ev->data1 == gamecontrol[i][gc_freecam][1])
|
||||
{
|
||||
P_ToggleDemoCamera(i);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
case ev_keyup:
|
||||
return false; // always let key up events filter down
|
||||
|
||||
case ev_mouse:
|
||||
return true; // eat events
|
||||
|
||||
case ev_joystick:
|
||||
return true; // eat events
|
||||
|
||||
case ev_joystick2:
|
||||
return true; // eat events
|
||||
|
||||
case ev_joystick3:
|
||||
return true; // eat events
|
||||
|
||||
case ev_joystick4:
|
||||
return true; // eat events
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
+99
-128
@@ -131,10 +131,7 @@ joy3xmove[JOYAXISSET], joy3ymove[JOYAXISSET], joy4xmove[JOYAXISSET], joy4ymove[J
|
||||
UINT8 gamekeydown[NUMINPUTS];
|
||||
|
||||
// two key codes (or virtual key) per game control
|
||||
INT32 gamecontrol[num_gamecontrols][2];
|
||||
INT32 gamecontrolbis[num_gamecontrols][2]; // secondary splitscreen player
|
||||
INT32 gamecontrol3[num_gamecontrols][2]; // tertiary splitscreen player
|
||||
INT32 gamecontrol4[num_gamecontrols][2]; // quarternary splitscreen player
|
||||
INT32 gamecontrol[MAXSPLITSCREENPLAYERS][num_gamecontrols][2];
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -977,13 +974,14 @@ void G_ClearControlKeys(INT32 (*setupcontrols)[2], INT32 control)
|
||||
|
||||
void G_ClearAllControlKeys(void)
|
||||
{
|
||||
INT32 i;
|
||||
for (i = 0; i < num_gamecontrols; i++)
|
||||
INT32 i, k;
|
||||
|
||||
for (k = 0; k < MAXSPLITSCREENPLAYERS; k++)
|
||||
{
|
||||
G_ClearControlKeys(gamecontrol, i);
|
||||
G_ClearControlKeys(gamecontrolbis, i);
|
||||
G_ClearControlKeys(gamecontrol3, i);
|
||||
G_ClearControlKeys(gamecontrol4, i);
|
||||
for (i = 0; i < num_gamecontrols; i++)
|
||||
{
|
||||
G_ClearControlKeys(gamecontrol[k], i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1022,7 +1020,7 @@ INT32 G_KeyStringtoNum(const char *keystr)
|
||||
if (!keystr[0])
|
||||
return 0;
|
||||
|
||||
if (!keystr[1] && keystr[0] > ' ' && keystr[0] <= 'z')
|
||||
if (!keystr[0] || (!keystr[1] && keystr[0] > ' ' && keystr[0] <= 'z'))
|
||||
return keystr[0];
|
||||
|
||||
if (!strncmp(keystr, "KEY", 3) && keystr[3] >= '0' && keystr[3] <= '9')
|
||||
@@ -1041,158 +1039,131 @@ void G_Controldefault(UINT8 player)
|
||||
if (player == 0 || player == 1)
|
||||
{
|
||||
// Main controls
|
||||
gamecontrol[gc_aimforward ][0] = KEY_UPARROW;
|
||||
gamecontrol[gc_aimbackward][0] = KEY_DOWNARROW;
|
||||
gamecontrol[gc_turnleft ][0] = KEY_LEFTARROW;
|
||||
gamecontrol[gc_turnright ][0] = KEY_RIGHTARROW;
|
||||
gamecontrol[gc_accelerate ][0] = 'a';
|
||||
gamecontrol[gc_drift ][0] = 's';
|
||||
gamecontrol[gc_brake ][0] = 'd';
|
||||
gamecontrol[gc_fire ][0] = KEY_SPACE;
|
||||
gamecontrol[gc_lookback ][0] = KEY_LSHIFT;
|
||||
gamecontrol[0][gc_aimforward ][0] = KEY_UPARROW;
|
||||
gamecontrol[0][gc_aimbackward][0] = KEY_DOWNARROW;
|
||||
gamecontrol[0][gc_turnleft ][0] = KEY_LEFTARROW;
|
||||
gamecontrol[0][gc_turnright ][0] = KEY_RIGHTARROW;
|
||||
gamecontrol[0][gc_accelerate ][0] = 'a';
|
||||
gamecontrol[0][gc_drift ][0] = 's';
|
||||
gamecontrol[0][gc_brake ][0] = 'd';
|
||||
gamecontrol[0][gc_fire ][0] = KEY_SPACE;
|
||||
gamecontrol[0][gc_lookback ][0] = KEY_LSHIFT;
|
||||
|
||||
gamecontrol[gc_accelerate ][1] = KEY_JOY1+0; // A
|
||||
gamecontrol[gc_lookback ][1] = KEY_JOY1+2; // X
|
||||
gamecontrol[gc_brake ][1] = KEY_JOY1+1; // B
|
||||
gamecontrol[gc_fire ][1] = KEY_JOY1+9; // LB
|
||||
gamecontrol[gc_drift ][1] = KEY_JOY1+10; // RB
|
||||
gamecontrol[0][gc_accelerate ][1] = KEY_JOY1+0; // A
|
||||
gamecontrol[0][gc_lookback ][1] = KEY_JOY1+2; // X
|
||||
gamecontrol[0][gc_brake ][1] = KEY_JOY1+1; // B
|
||||
gamecontrol[0][gc_fire ][1] = KEY_JOY1+9; // LB
|
||||
gamecontrol[0][gc_drift ][1] = KEY_JOY1+10; // RB
|
||||
|
||||
// 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[0][gc_pause ][0] = KEY_PAUSE;
|
||||
gamecontrol[0][gc_console ][0] = KEY_CONSOLE;
|
||||
gamecontrol[0][gc_screenshot ][0] = KEY_F8;
|
||||
gamecontrol[0][gc_recordgif ][0] = KEY_F9;
|
||||
gamecontrol[0][gc_viewpoint ][0] = KEY_F12;
|
||||
gamecontrol[0][gc_talkkey ][0] = 't';
|
||||
//gamecontrol[gc_teamkey ][0] = 'y';
|
||||
gamecontrol[gc_scores ][0] = KEY_TAB;
|
||||
gamecontrol[gc_spectate ][0] = '\'';
|
||||
gamecontrol[gc_lookup ][0] = KEY_PGUP;
|
||||
gamecontrol[gc_lookdown ][0] = KEY_PGDN;
|
||||
gamecontrol[gc_centerview ][0] = KEY_END;
|
||||
gamecontrol[gc_camreset ][0] = KEY_HOME;
|
||||
gamecontrol[gc_camtoggle ][0] = KEY_BACKSPACE;
|
||||
gamecontrol[0][gc_scores ][0] = KEY_TAB;
|
||||
gamecontrol[0][gc_spectate ][0] = '\'';
|
||||
gamecontrol[0][gc_lookup ][0] = KEY_PGUP;
|
||||
gamecontrol[0][gc_lookdown ][0] = KEY_PGDN;
|
||||
gamecontrol[0][gc_centerview ][0] = KEY_END;
|
||||
gamecontrol[0][gc_camreset ][0] = KEY_HOME;
|
||||
gamecontrol[0][gc_camtoggle ][0] = KEY_BACKSPACE;
|
||||
|
||||
gamecontrol[gc_viewpoint ][1] = KEY_JOY1+3; // Y
|
||||
gamecontrol[gc_pause ][1] = KEY_JOY1+4; // Back
|
||||
gamecontrol[gc_systemmenu ][0] = KEY_JOY1+6; // Start
|
||||
//gamecontrol[gc_camtoggle ][1] = KEY_HAT1+0; // D-Pad Up
|
||||
//gamecontrol[gc_screenshot ][1] = KEY_HAT1+1; // D-Pad Down // absolutely fucking NOT
|
||||
gamecontrol[gc_talkkey ][1] = KEY_HAT1+1; // D-Pad Down
|
||||
gamecontrol[gc_scores ][1] = KEY_HAT1+0; // D-Pad Up
|
||||
gamecontrol[0][gc_viewpoint ][1] = KEY_JOY1+3; // Y
|
||||
gamecontrol[0][gc_pause ][1] = KEY_JOY1+4; // Back
|
||||
gamecontrol[0][gc_systemmenu ][0] = KEY_JOY1+6; // Start
|
||||
//gamecontrol[0][gc_camtoggle ][1] = KEY_HAT1+0; // D-Pad Up
|
||||
//gamecontrol[0][gc_screenshot ][1] = KEY_HAT1+1; // D-Pad Down // absolutely fucking NOT
|
||||
gamecontrol[0][gc_talkkey ][1] = KEY_HAT1+1; // D-Pad Down
|
||||
gamecontrol[0][gc_scores ][1] = KEY_HAT1+0; // D-Pad Up
|
||||
}
|
||||
|
||||
if (player == 0 || player == 2)
|
||||
{
|
||||
// Player 2 controls
|
||||
gamecontrolbis[gc_accelerate ][0] = KEY_2JOY1+0; // A
|
||||
gamecontrolbis[gc_lookback ][0] = KEY_2JOY1+2; // X
|
||||
gamecontrolbis[gc_brake ][0] = KEY_2JOY1+1; // B
|
||||
gamecontrolbis[gc_fire ][0] = KEY_2JOY1+9; // LB
|
||||
gamecontrolbis[gc_drift ][0] = KEY_2JOY1+10; // RB
|
||||
gamecontrol[1][gc_accelerate ][0] = KEY_2JOY1+0; // A
|
||||
gamecontrol[1][gc_lookback ][0] = KEY_2JOY1+2; // X
|
||||
gamecontrol[1][gc_brake ][0] = KEY_2JOY1+1; // B
|
||||
gamecontrol[1][gc_fire ][0] = KEY_2JOY1+9; // LB
|
||||
gamecontrol[1][gc_drift ][0] = KEY_2JOY1+10; // RB
|
||||
}
|
||||
|
||||
if (player == 0 || player == 3)
|
||||
{
|
||||
// Player 3 controls
|
||||
gamecontrol3[gc_accelerate ][0] = KEY_3JOY1+0; // A
|
||||
gamecontrol3[gc_lookback ][0] = KEY_3JOY1+2; // X
|
||||
gamecontrol3[gc_brake ][0] = KEY_3JOY1+1; // B
|
||||
gamecontrol3[gc_fire ][0] = KEY_3JOY1+9; // LB
|
||||
gamecontrol3[gc_drift ][0] = KEY_3JOY1+10; // RB
|
||||
gamecontrol[2][gc_accelerate ][0] = KEY_3JOY1+0; // A
|
||||
gamecontrol[2][gc_lookback ][0] = KEY_3JOY1+2; // X
|
||||
gamecontrol[2][gc_brake ][0] = KEY_3JOY1+1; // B
|
||||
gamecontrol[2][gc_fire ][0] = KEY_3JOY1+9; // LB
|
||||
gamecontrol[2][gc_drift ][0] = KEY_3JOY1+10; // RB
|
||||
}
|
||||
|
||||
if (player == 0 || player == 4)
|
||||
{
|
||||
// Player 4 controls
|
||||
gamecontrol4[gc_accelerate ][0] = KEY_4JOY1+0; // A
|
||||
gamecontrol4[gc_lookback ][0] = KEY_4JOY1+2; // X
|
||||
gamecontrol4[gc_brake ][0] = KEY_4JOY1+1; // B
|
||||
gamecontrol4[gc_fire ][0] = KEY_4JOY1+9; // LB
|
||||
gamecontrol4[gc_drift ][0] = KEY_4JOY1+10; // RB
|
||||
gamecontrol[3][gc_accelerate ][0] = KEY_4JOY1+0; // A
|
||||
gamecontrol[3][gc_lookback ][0] = KEY_4JOY1+2; // X
|
||||
gamecontrol[3][gc_brake ][0] = KEY_4JOY1+1; // B
|
||||
gamecontrol[3][gc_fire ][0] = KEY_4JOY1+9; // LB
|
||||
gamecontrol[3][gc_drift ][0] = KEY_4JOY1+10; // RB
|
||||
}
|
||||
}
|
||||
|
||||
void G_SaveKeySetting(FILE *f)
|
||||
{
|
||||
INT32 i;
|
||||
INT32 i, k;
|
||||
|
||||
for (i = 1; i < num_gamecontrols; i++)
|
||||
static const char *controltext[MAXSPLITSCREENPLAYERS] = {
|
||||
"setcontrol",
|
||||
"setcontrol2",
|
||||
"setcontrol3",
|
||||
"setcontrol4"
|
||||
};
|
||||
|
||||
for (k = 0; k < MAXSPLITSCREENPLAYERS; k++)
|
||||
{
|
||||
fprintf(f, "setcontrol \"%s\" \"%s\"", gamecontrolname[i],
|
||||
G_KeynumToString(gamecontrol[i][0]));
|
||||
for (i = 1; i < num_gamecontrols; i++)
|
||||
{
|
||||
fprintf(f, "%s \"%s\" \"%s\"", controltext[k], gamecontrolname[i],
|
||||
G_KeynumToString(gamecontrol[k][i][0]));
|
||||
|
||||
if (gamecontrol[i][1])
|
||||
fprintf(f, " \"%s\"\n", G_KeynumToString(gamecontrol[i][1]));
|
||||
else
|
||||
fprintf(f, "\n");
|
||||
}
|
||||
|
||||
for (i = 1; i < num_gamecontrols; i++)
|
||||
{
|
||||
fprintf(f, "setcontrol2 \"%s\" \"%s\"", gamecontrolname[i],
|
||||
G_KeynumToString(gamecontrolbis[i][0]));
|
||||
|
||||
if (gamecontrolbis[i][1])
|
||||
fprintf(f, " \"%s\"\n", G_KeynumToString(gamecontrolbis[i][1]));
|
||||
else
|
||||
fprintf(f, "\n");
|
||||
}
|
||||
|
||||
for (i = 1; i < num_gamecontrols; i++)
|
||||
{
|
||||
fprintf(f, "setcontrol3 \"%s\" \"%s\"", gamecontrolname[i],
|
||||
G_KeynumToString(gamecontrol3[i][0]));
|
||||
|
||||
if (gamecontrol3[i][1])
|
||||
fprintf(f, " \"%s\"\n", G_KeynumToString(gamecontrol3[i][1]));
|
||||
else
|
||||
fprintf(f, "\n");
|
||||
}
|
||||
|
||||
for (i = 1; i < num_gamecontrols; i++)
|
||||
{
|
||||
fprintf(f, "setcontrol4 \"%s\" \"%s\"", gamecontrolname[i],
|
||||
G_KeynumToString(gamecontrol4[i][0]));
|
||||
|
||||
if (gamecontrol4[i][1])
|
||||
fprintf(f, " \"%s\"\n", G_KeynumToString(gamecontrol4[i][1]));
|
||||
else
|
||||
fprintf(f, "\n");
|
||||
if (gamecontrol[k][i][1])
|
||||
fprintf(f, " \"%s\"\n", G_KeynumToString(gamecontrol[k][i][1]));
|
||||
else
|
||||
fprintf(f, "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
INT32 G_CheckDoubleUsage(INT32 keynum, boolean modify)
|
||||
{
|
||||
INT32 result = gc_null;
|
||||
|
||||
if (cv_controlperkey.value == 1)
|
||||
{
|
||||
INT32 i, j;
|
||||
for (i = 0; i < num_gamecontrols; i++)
|
||||
INT32 i, j, k;
|
||||
|
||||
for (k = 0; k < MAXSPLITSCREENPLAYERS; k++)
|
||||
{
|
||||
for (j = 0; j < 2; j++)
|
||||
for (i = 0; i < num_gamecontrols; i++)
|
||||
{
|
||||
if (gamecontrol[i][j] == keynum) {
|
||||
result = i;
|
||||
if (modify) gamecontrol[i][j] = KEY_NULL;
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
if (gamecontrol[k][i][j] == keynum)
|
||||
{
|
||||
result = i;
|
||||
if (modify) gamecontrol[k][i][j] = KEY_NULL;
|
||||
}
|
||||
|
||||
if (result && !modify)
|
||||
return result;
|
||||
}
|
||||
if (gamecontrolbis[i][j] == keynum) {
|
||||
result = i;
|
||||
if (modify) gamecontrolbis[i][j] = KEY_NULL;
|
||||
}
|
||||
if (gamecontrol3[i][j] == keynum) {
|
||||
result = i;
|
||||
if (modify) gamecontrol3[i][j] = KEY_NULL;
|
||||
}
|
||||
if (gamecontrol4[i][j] == keynum) {
|
||||
result = i;
|
||||
if (modify) gamecontrol4[i][j] = KEY_NULL;
|
||||
}
|
||||
if (result && !modify)
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1346,11 +1317,11 @@ static void setcontrol(INT32 (*gc)[2])
|
||||
INT32 player;
|
||||
boolean nestedoverride = false;
|
||||
|
||||
if ((void*)gc == (void*)&gamecontrol4)
|
||||
if ((void*)gc == (void*)&gamecontrol[3])
|
||||
player = 3;
|
||||
else if ((void*)gc == (void*)&gamecontrol3)
|
||||
else if ((void*)gc == (void*)&gamecontrol[2])
|
||||
player = 2;
|
||||
else if ((void*)gc == (void*)&gamecontrolbis)
|
||||
else if ((void*)gc == (void*)&gamecontrol[1])
|
||||
player = 1;
|
||||
else
|
||||
player = 0;
|
||||
@@ -1413,7 +1384,7 @@ void Command_Setcontrol_f(void)
|
||||
return;
|
||||
}
|
||||
|
||||
setcontrol(gamecontrol);
|
||||
setcontrol(gamecontrol[0]);
|
||||
}
|
||||
|
||||
void Command_Setcontrol2_f(void)
|
||||
@@ -1428,7 +1399,7 @@ void Command_Setcontrol2_f(void)
|
||||
return;
|
||||
}
|
||||
|
||||
setcontrol(gamecontrolbis);
|
||||
setcontrol(gamecontrol[1]);
|
||||
}
|
||||
|
||||
void Command_Setcontrol3_f(void)
|
||||
@@ -1443,7 +1414,7 @@ void Command_Setcontrol3_f(void)
|
||||
return;
|
||||
}
|
||||
|
||||
setcontrol(gamecontrol3);
|
||||
setcontrol(gamecontrol[2]);
|
||||
}
|
||||
|
||||
void Command_Setcontrol4_f(void)
|
||||
@@ -1458,5 +1429,5 @@ void Command_Setcontrol4_f(void)
|
||||
return;
|
||||
}
|
||||
|
||||
setcontrol(gamecontrol4);
|
||||
setcontrol(gamecontrol[3]);
|
||||
}
|
||||
+6
-8
@@ -121,14 +121,12 @@ extern INT32 joyxmove[JOYAXISSET], joyymove[JOYAXISSET], joy2xmove[JOYAXISSET],
|
||||
extern UINT8 gamekeydown[NUMINPUTS];
|
||||
|
||||
// two key codes (or virtual key) per game control
|
||||
extern INT32 gamecontrol[num_gamecontrols][2];
|
||||
extern INT32 gamecontrolbis[num_gamecontrols][2]; // secondary splitscreen player
|
||||
extern INT32 gamecontrol3[num_gamecontrols][2];
|
||||
extern INT32 gamecontrol4[num_gamecontrols][2];
|
||||
#define PLAYER1INPUTDOWN(gc) (gamekeydown[gamecontrol[gc][0]] || gamekeydown[gamecontrol[gc][1]])
|
||||
#define PLAYER2INPUTDOWN(gc) (gamekeydown[gamecontrolbis[gc][0]] || gamekeydown[gamecontrolbis[gc][1]])
|
||||
#define PLAYER3INPUTDOWN(gc) (gamekeydown[gamecontrol3[gc][0]] || gamekeydown[gamecontrol3[gc][1]])
|
||||
#define PLAYER4INPUTDOWN(gc) (gamekeydown[gamecontrol4[gc][0]] || gamekeydown[gamecontrol4[gc][1]])
|
||||
extern INT32 gamecontrol[MAXSPLITSCREENPLAYERS][num_gamecontrols][2];
|
||||
|
||||
#define PLAYER1INPUTDOWN(gc) (gamekeydown[gamecontrol[0][gc][0]] || gamekeydown[gamecontrol[0][gc][1]])
|
||||
#define PLAYER2INPUTDOWN(gc) (gamekeydown[gamecontrol[1][gc][0]] || gamekeydown[gamecontrol[1][gc][1]])
|
||||
#define PLAYER3INPUTDOWN(gc) (gamekeydown[gamecontrol[2][gc][0]] || gamekeydown[gamecontrol[2][gc][1]])
|
||||
#define PLAYER4INPUTDOWN(gc) (gamekeydown[gamecontrol[3][gc][0]] || gamekeydown[gamecontrol[3][gc][1]])
|
||||
|
||||
// peace to my little coder fingers!
|
||||
// check a gamecontrol being active or not
|
||||
|
||||
+7
-7
@@ -1315,7 +1315,7 @@ boolean HU_Responder(event_t *ev)
|
||||
INT32 i;
|
||||
for (i = 0; i < num_gamecontrols; i++)
|
||||
{
|
||||
if (gamecontrol[i][0] == ev->data1 || gamecontrol[i][1] == ev->data1)
|
||||
if (gamecontrol[0][i][0] == ev->data1 || gamecontrol[0][i][1] == ev->data1)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1327,7 +1327,7 @@ boolean HU_Responder(event_t *ev)
|
||||
if (!chat_on)
|
||||
{
|
||||
// enter chat mode
|
||||
if ((ev->data1 == gamecontrol[gc_talkkey][0] || ev->data1 == gamecontrol[gc_talkkey][1])
|
||||
if ((ev->data1 == gamecontrol[0][gc_talkkey][0] || ev->data1 == gamecontrol[0][gc_talkkey][1])
|
||||
&& netgame && !OLD_MUTE) // check for old chat mute, still let the players open the chat incase they want to scroll otherwise.
|
||||
{
|
||||
chat_on = true;
|
||||
@@ -1338,7 +1338,7 @@ boolean HU_Responder(event_t *ev)
|
||||
typelines = 1;
|
||||
return true;
|
||||
}
|
||||
if ((ev->data1 == gamecontrol[gc_teamkey][0] || ev->data1 == gamecontrol[gc_teamkey][1])
|
||||
if ((ev->data1 == gamecontrol[0][gc_teamkey][0] || ev->data1 == gamecontrol[0][gc_teamkey][1])
|
||||
&& netgame && !OLD_MUTE)
|
||||
{
|
||||
chat_on = true;
|
||||
@@ -1364,8 +1364,8 @@ boolean HU_Responder(event_t *ev)
|
||||
|
||||
// Ignore non-keyboard keys, except when the talk key is bound
|
||||
if (ev->data1 >= KEY_MOUSE1
|
||||
&& (ev->data1 != gamecontrol[gc_talkkey][0]
|
||||
&& ev->data1 != gamecontrol[gc_talkkey][1]))
|
||||
&& (ev->data1 != gamecontrol[0][gc_talkkey][0]
|
||||
&& ev->data1 != gamecontrol[0][gc_talkkey][1]))
|
||||
return false;
|
||||
|
||||
M_TextInputHandle(&w_chat, c);
|
||||
@@ -1377,8 +1377,8 @@ boolean HU_Responder(event_t *ev)
|
||||
HU_SendChatMessage();
|
||||
}
|
||||
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 == gamecontrol[0][gc_talkkey][0] || c == gamecontrol[0][gc_talkkey][1]
|
||||
|| c == gamecontrol[0][gc_teamkey][0] || c == gamecontrol[0][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;
|
||||
|
||||
+2
-3
@@ -452,7 +452,7 @@ int mobj_localskin_setter(lua_State *L)
|
||||
strlcpy(skin, luaL_optstring(L, 2, "none"), sizeof skin);
|
||||
strlwr(skin); // all skin names are lowercase
|
||||
|
||||
if (strcasecmp(skin, "none"))
|
||||
if (stricmp(skin, "none"))
|
||||
{
|
||||
// Try localskins
|
||||
for (i = 0; i < numlocalskins; i++)
|
||||
@@ -468,7 +468,7 @@ int mobj_localskin_setter(lua_State *L)
|
||||
// Try other skins
|
||||
for (i = 0; i < numskins; i++)
|
||||
{
|
||||
if (fastcmp(skins[i].name, skin))
|
||||
if (stricmp(skins[i].name, skin) == 0)
|
||||
{
|
||||
mo->localskin = &skins[i];
|
||||
mo->skinlocal = false;
|
||||
@@ -483,7 +483,6 @@ int mobj_localskin_setter(lua_State *L)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
+20
-20
@@ -3887,8 +3887,8 @@ boolean M_Responder(event_t *ev)
|
||||
{
|
||||
if (currentMenu == &MISC_ChangeLevelDef || currentMenu == &MP_OfflineServerDef || currentMenu == &MP_ServerDef)
|
||||
{
|
||||
if (ch == gamecontrol[gc_fire][0]
|
||||
|| ch == gamecontrol[gc_fire][1])
|
||||
if (ch == gamecontrol[0][gc_fire][0]
|
||||
|| ch == gamecontrol[0][gc_fire][1])
|
||||
{
|
||||
COM_ImmedExecute("add kartencore 1");
|
||||
}
|
||||
@@ -4021,9 +4021,9 @@ boolean M_Responder(event_t *ev)
|
||||
|
||||
if (ch == -1)
|
||||
return false;
|
||||
else if (ch == gamecontrol[gc_systemmenu][0] || ch == gamecontrol[gc_systemmenu][1]) // allow remappable ESC key
|
||||
else if (ch == gamecontrol[0][gc_systemmenu][0] || ch == gamecontrol[0][gc_systemmenu][1]) // allow remappable ESC key
|
||||
ch = KEY_ESCAPE;
|
||||
else if ((ch == gamecontrol[gc_accelerate][0] || ch == gamecontrol[gc_accelerate][1]) && ch >= KEY_MOUSE1)
|
||||
else if ((ch == gamecontrol[0][gc_accelerate][0] || ch == gamecontrol[0][gc_accelerate][1]) && ch >= KEY_MOUSE1)
|
||||
ch = KEY_ENTER;
|
||||
|
||||
// F-Keys
|
||||
@@ -4099,7 +4099,7 @@ boolean M_Responder(event_t *ev)
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((ch == gamecontrol[gc_brake][0] || ch == gamecontrol[gc_brake][1]) && ch >= KEY_MOUSE1) // do this here, otherwise brake opens the menu mid-game
|
||||
if ((ch == gamecontrol[0][gc_brake][0] || ch == gamecontrol[0][gc_brake][1]) && ch >= KEY_MOUSE1) // do this here, otherwise brake opens the menu mid-game
|
||||
ch = KEY_ESCAPE;
|
||||
|
||||
routine = currentMenu->menuitems[itemOn].itemaction;
|
||||
@@ -6719,7 +6719,7 @@ static void M_HandleAddons(INT32 choice)
|
||||
{
|
||||
if (DumbStartsWith("KC_", dirmenu[dir_on[menudepthleft]]+DIR_STRING) || DumbStartsWith("kc_", dirmenu[dir_on[menudepthleft]]+DIR_STRING)) {
|
||||
M_StartMessage(va("%c%s\x80\nYou are loading a local skin.\nLocal skins will not be usable\nafter going back from\nthe title screen.\n\n(Press a key)\n", ('\x80' + (highlightflags>>V_CHARCOLORSHIFT)), dirmenu[dir_on[menudepthleft]]+DIR_STRING),NULL,MM_NOTHING);
|
||||
COM_BufAddText(va("addskins \"%s%s\"", menupath, dirmenu[dir_on[menudepthleft]]+DIR_STRING));
|
||||
COM_BufAddText(va("addfilelocal \"%s%s\"", menupath, dirmenu[dir_on[menudepthleft]]+DIR_STRING));
|
||||
}
|
||||
else
|
||||
S_StartSound(NULL, sfx_s26d);
|
||||
@@ -10097,7 +10097,7 @@ static void M_HandleMasterServerResetChoice(event_t *ev)
|
||||
|
||||
if (ev->type == ev_keydown)
|
||||
{
|
||||
if (choice == ' ' || choice == 'y' || choice == KEY_ENTER || choice == gamecontrol[gc_accelerate][0] || choice == gamecontrol[gc_accelerate][1])
|
||||
if (choice == ' ' || choice == 'y' || choice == KEY_ENTER || choice == gamecontrol[0][gc_accelerate][0] || choice == gamecontrol[0][gc_accelerate][1])
|
||||
{
|
||||
CV_Set(&cv_masterserver, cv_masterserver.defaultvalue);
|
||||
CV_Set(&cv_masterserver_nagattempts, cv_masterserver_nagattempts.defaultvalue);
|
||||
@@ -10251,8 +10251,8 @@ static void M_DrawLevelSelectOnly(boolean leftfade, boolean rightfade)
|
||||
if (levellistmode != LLM_RECORDATTACK) // so it doesent show in record attack menu
|
||||
{
|
||||
char encoretoggle[32] = {0};
|
||||
const char *item1 = gamecontrol[gc_fire][0] != 0 ? G_KeynumToString(gamecontrol[gc_fire][0]) : NULL;
|
||||
const char *item2 = gamecontrol[gc_fire][1] != 0 ? G_KeynumToString(gamecontrol[gc_fire][1]) : NULL;
|
||||
const char *item1 = gamecontrol[0][gc_fire][0] != 0 ? G_KeynumToString(gamecontrol[0][gc_fire][0]) : NULL;
|
||||
const char *item2 = gamecontrol[0][gc_fire][1] != 0 ? G_KeynumToString(gamecontrol[0][gc_fire][1]) : NULL;
|
||||
|
||||
if (item1 != NULL && item2 != NULL)
|
||||
snprintf(encoretoggle, 32, "%s/%s - Toggle Encore", item1, item2);
|
||||
@@ -11445,7 +11445,7 @@ static void M_HandleSetupMultiPlayer(INT32 choice)
|
||||
boolean exitmenu = false; // exit to previous menu and send name change
|
||||
const boolean gridselect = (cv_skinselectmenu.value == SKINMENUTYPE_GRID || cv_skinselectmenu.value == SKINMENUTYPE_EXTENDED); // menus with "grids"
|
||||
|
||||
if ((choice == gamecontrol[gc_fire][0] || choice == gamecontrol[gc_fire][1]) && (itemOn == 2 || (gridselect && itemOn == 1)))
|
||||
if ((choice == gamecontrol[0][gc_fire][0] || choice == gamecontrol[0][gc_fire][1]) && (itemOn == 2 || (gridselect && itemOn == 1)))
|
||||
choice = KEY_BACKSPACE; // Hack to allow resetting prefcolor on controllers
|
||||
|
||||
#define BREAKWHENLOCKED {\
|
||||
@@ -11741,8 +11741,8 @@ static void M_HandleSetupMultiPlayer(INT32 choice)
|
||||
break;
|
||||
|
||||
//c why?????
|
||||
//case gamecontrol[gc_accelerate][0]:
|
||||
//case gamecontrol[gc_accelerate][1]:
|
||||
//case gamecontrol[0][gc_accelerate][0]:
|
||||
//case gamecontrol[0][gc_accelerate][1]:
|
||||
case KEY_ENTER:
|
||||
if (cv_skinselectmenu.value == SKINMENUTYPE_2D)
|
||||
{
|
||||
@@ -12356,7 +12356,7 @@ static void M_Setup1PControlsMenu(INT32 choice)
|
||||
{
|
||||
(void)choice;
|
||||
setupcontrolplayer = 1;
|
||||
setupcontrols = gamecontrol; // was called from main Options (for console player, then)
|
||||
setupcontrols = gamecontrol[0]; // was called from main Options (for console player, then)
|
||||
currentMenu->lastOn = itemOn;
|
||||
|
||||
// Set proper gamepad options
|
||||
@@ -12379,7 +12379,7 @@ static void M_Setup2PControlsMenu(INT32 choice)
|
||||
{
|
||||
(void)choice;
|
||||
setupcontrolplayer = 2;
|
||||
setupcontrols = gamecontrolbis;
|
||||
setupcontrols = gamecontrol[1];
|
||||
currentMenu->lastOn = itemOn;
|
||||
|
||||
// Set proper gamepad options
|
||||
@@ -12402,7 +12402,7 @@ static void M_Setup3PControlsMenu(INT32 choice)
|
||||
{
|
||||
(void)choice;
|
||||
setupcontrolplayer = 3;
|
||||
setupcontrols = gamecontrol3;
|
||||
setupcontrols = gamecontrol[2];
|
||||
currentMenu->lastOn = itemOn;
|
||||
|
||||
// Set proper gamepad options
|
||||
@@ -12425,7 +12425,7 @@ static void M_Setup4PControlsMenu(INT32 choice)
|
||||
{
|
||||
(void)choice;
|
||||
setupcontrolplayer = 4;
|
||||
setupcontrols = gamecontrol4;
|
||||
setupcontrols = gamecontrol[3];
|
||||
currentMenu->lastOn = itemOn;
|
||||
|
||||
// Set proper gamepad options
|
||||
@@ -12673,17 +12673,17 @@ static void M_ResetControlsResponse(INT32 ch)
|
||||
switch (setupcontrolplayer)
|
||||
{
|
||||
case 4:
|
||||
G_ClearControlKeys(gamecontrol4, i);
|
||||
G_ClearControlKeys(gamecontrol[3], i);
|
||||
break;
|
||||
case 3:
|
||||
G_ClearControlKeys(gamecontrol3, i);
|
||||
G_ClearControlKeys(gamecontrol[2], i);
|
||||
break;
|
||||
case 2:
|
||||
G_ClearControlKeys(gamecontrolbis, i);
|
||||
G_ClearControlKeys(gamecontrol[1], i);
|
||||
break;
|
||||
case 1:
|
||||
default:
|
||||
G_ClearControlKeys(gamecontrol, i);
|
||||
G_ClearControlKeys(gamecontrol[0], i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1577,9 +1577,9 @@ boolean M_ScreenshotResponder(event_t *ev)
|
||||
if (ch >= KEY_MOUSE1 && menuactive) // If it's not a keyboard key, then don't allow it in the menus!
|
||||
return false;
|
||||
|
||||
if (ch == KEY_F8 || ch == gamecontrol[gc_screenshot][0] || ch == gamecontrol[gc_screenshot][1]) // remappable F8
|
||||
if (ch == KEY_F8 || ch == gamecontrol[0][gc_screenshot][0] || ch == gamecontrol[0][gc_screenshot][1]) // remappable F8
|
||||
M_ScreenShot();
|
||||
else if (ch == KEY_F9 || ch == gamecontrol[gc_recordgif][0] || ch == gamecontrol[gc_recordgif][1]) // remappable F9
|
||||
else if (ch == KEY_F9 || ch == gamecontrol[0][gc_recordgif][0] || ch == gamecontrol[0][gc_recordgif][1]) // remappable F9
|
||||
((moviemode) ? M_StopMovie : M_StartMovie)();
|
||||
else
|
||||
return false;
|
||||
|
||||
+7
-15
@@ -10174,21 +10174,13 @@ void P_RemoveSavegameMobj(mobj_t *mobj)
|
||||
thinker_t *th = (thinker_t*)mobj;
|
||||
|
||||
// unlink from sector and block lists
|
||||
if (th->function.acp1 == (actionf_p1)P_NullPrecipThinker)
|
||||
{
|
||||
P_UnsetPrecipThingPosition((precipmobj_t *)mobj);
|
||||
}
|
||||
else
|
||||
{
|
||||
// unlink from sector and block lists
|
||||
P_UnsetThingPosition(mobj);
|
||||
P_UnsetThingPosition(mobj);
|
||||
|
||||
// Remove touching_sectorlist from mobj.
|
||||
if (sector_list)
|
||||
{
|
||||
P_DelSeclist(sector_list);
|
||||
sector_list = NULL;
|
||||
}
|
||||
// Remove touching_sectorlist from mobj.
|
||||
if (sector_list)
|
||||
{
|
||||
P_DelSeclist(sector_list);
|
||||
sector_list = NULL;
|
||||
}
|
||||
|
||||
// stop any playing sound
|
||||
@@ -10252,7 +10244,7 @@ void P_SpawnPrecipitation(void)
|
||||
continue;
|
||||
|
||||
// Exists, but is too small for reasonable precipitation.
|
||||
if (!(precipsector->sector->floorheight <= precipsector->sector->ceilingheight - (32<<FRACBITS)))
|
||||
if (FixedDiv(precipsector->sector->ceilingheight - precipsector->sector->floorheight, mapobjectscale) < 64<<FRACBITS)
|
||||
continue;
|
||||
|
||||
// Don't set z properly yet...
|
||||
|
||||
+1
-18
@@ -2669,8 +2669,6 @@ static void P_NetUnArchiveThinkers(savebuffer_t *save)
|
||||
{
|
||||
thinker_t *currentthinker;
|
||||
thinker_t *next;
|
||||
thinker_t *currentprecipthinker;
|
||||
thinker_t *nextprecip;
|
||||
UINT8 tclass;
|
||||
UINT8 restoreNum = false;
|
||||
UINT32 i;
|
||||
@@ -2696,22 +2694,7 @@ static void P_NetUnArchiveThinkers(savebuffer_t *save)
|
||||
}
|
||||
|
||||
// remove all the current precip thinkers
|
||||
currentprecipthinker = precipcap.next;
|
||||
for (currentprecipthinker = precipcap.next; currentprecipthinker != &precipcap; currentprecipthinker = nextprecip)
|
||||
{
|
||||
nextprecip = currentprecipthinker->next;
|
||||
|
||||
#ifdef PARANOIA
|
||||
if (currentprecipthinker->function.acp1 != (actionf_p1)P_NullPrecipThinker)
|
||||
{
|
||||
(next->prev = currentprecipthinker->prev)->next = nextprecip;
|
||||
R_DestroyLevelInterpolators(currentprecipthinker);
|
||||
Z_Free(currentprecipthinker);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
P_RemoveSavegameMobj((mobj_t *)currentprecipthinker); // item isn't saved, don't remove it
|
||||
}
|
||||
P_PurgePrecipitation();
|
||||
|
||||
// we don't want the removed mobjs to come back
|
||||
iquetail = iquehead = 0;
|
||||
|
||||
+20
-17
@@ -296,6 +296,7 @@ static void P_ClearMapHeaderLighting(mapheader_lighting_t *lighting)
|
||||
static void P_ClearSingleMapHeaderInfo(INT16 i)
|
||||
{
|
||||
const INT16 num = (INT16)(i-1);
|
||||
|
||||
mapheaderinfo[num]->lvlttl[0] = '\0';
|
||||
mapheaderinfo[num]->subttl[0] = '\0';
|
||||
mapheaderinfo[num]->zonttl[0] = '\0';
|
||||
@@ -329,8 +330,10 @@ static void P_ClearSingleMapHeaderInfo(INT16 i)
|
||||
mapheaderinfo[num]->saveoverride = SAVE_DEFAULT;
|
||||
mapheaderinfo[num]->levelflags = 0;
|
||||
mapheaderinfo[num]->menuflags = (mainwads ? 0 : LF2_EXISTSHACK); // see p_setup.c - prevents replacing maps in addons with easier versions
|
||||
|
||||
// TODO grades support for delfile (pfft yeah right)
|
||||
P_DeleteGrades(num);
|
||||
|
||||
// SRB2Kart
|
||||
//mapheaderinfo[num]->automap = false;
|
||||
mapheaderinfo[num]->mobj_scale = FRACUNIT;
|
||||
@@ -752,7 +755,7 @@ INT32 P_AddLevelFlat(const char *flatname, levelflat_t *levelflat)
|
||||
// first scan through the already found flats
|
||||
//
|
||||
for (i = 0; i < numlevelflats; i++, levelflat++)
|
||||
if (strnicmp(levelflat->name,flatname,8)==0)
|
||||
if (strnicmp(levelflat->name,flatname,8) == 0)
|
||||
break;
|
||||
|
||||
// that flat was already found in the level, return the id
|
||||
@@ -947,6 +950,7 @@ static void P_LoadRawNodes(UINT8 *data)
|
||||
no->y = SHORT(mn->y)<<FRACBITS;
|
||||
no->dx = SHORT(mn->dx)<<FRACBITS;
|
||||
no->dy = SHORT(mn->dy)<<FRACBITS;
|
||||
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
no->children[j] = SHORT(mn->children[j]);
|
||||
@@ -2376,10 +2380,14 @@ static INT32 P_MakeBufferMD5(const char *buffer, size_t len, void *resblock)
|
||||
return 1;
|
||||
#else
|
||||
tic_t t = I_GetTime();
|
||||
|
||||
CONS_Debug(DBG_SETUP, "Making MD5\n");
|
||||
|
||||
if (md5_buffer(buffer, len, resblock) == NULL)
|
||||
return 1;
|
||||
|
||||
CONS_Debug(DBG_SETUP, "MD5 calc took %f seconds\n", (float)(I_GetTime() - t)/NEWTICRATE);
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
@@ -2460,6 +2468,7 @@ static void P_RunLevelScript(const char *scriptname)
|
||||
{
|
||||
COM_BufAddText(va("exec %s\n", scriptname));
|
||||
}
|
||||
|
||||
COM_BufExecute(); // Run it!
|
||||
}
|
||||
|
||||
@@ -2760,7 +2769,7 @@ static boolean P_RunSpecialWipe(boolean reloadinggamestate)
|
||||
F_WipeEndScreen();
|
||||
F_RunWipe(wipedefs[wipe_level_final], false);
|
||||
}
|
||||
else //dedicated servers can call this now, to wait the appropriate amount of time for clients to wipe
|
||||
else // dedicated servers can call this now, to wait the appropriate amount of time for clients to wipe
|
||||
{
|
||||
F_RunWipe(wipedefs[wipe_speclevel_towhite], false);
|
||||
F_RunWipe(wipedefs[wipe_level_final], false);
|
||||
@@ -2778,7 +2787,9 @@ static boolean P_RunSpecialWipe(boolean reloadinggamestate)
|
||||
I_Sleep(cv_sleep.value);
|
||||
I_UpdateTime(cv_timescale.value);
|
||||
}
|
||||
|
||||
lastwipetic = nowtime;
|
||||
|
||||
if (moviemode) // make sure we save frames for the white hold too
|
||||
M_SaveFrame();
|
||||
|
||||
@@ -2797,6 +2808,7 @@ static void P_SetupPlayer(void)
|
||||
INT32 i;
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (playeringame[i])
|
||||
{
|
||||
players[i].pflags &= ~PF_NIGHTSMODE;
|
||||
@@ -2821,6 +2833,7 @@ static void P_SetupPlayer(void)
|
||||
G_SpawnPlayer(i, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (modeattacking == ATTACKING_RECORD && !demo.playback)
|
||||
P_LoadRecordGhosts();
|
||||
@@ -3086,10 +3099,8 @@ boolean P_SetupLevel(boolean fromnetsave, boolean reloadinggamestate)
|
||||
numdmstarts = numredctfstarts = numbluectfstarts = 0;
|
||||
|
||||
// reset the player starts
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
playerstarts[i] = NULL;
|
||||
for (i = 0; i < 2; i++)
|
||||
skyboxmo[i] = NULL;
|
||||
memset(playerstarts, 0, sizeof(playerstarts));
|
||||
memset(skyboxmo, 0, sizeof(skyboxmo));
|
||||
|
||||
P_ResetWaypoints();
|
||||
|
||||
@@ -3189,12 +3200,15 @@ boolean P_SetupLevel(boolean fromnetsave, boolean reloadinggamestate)
|
||||
if (!fromnetsave) // uglier hack
|
||||
{ // to make a newly loaded level start on the second frame.
|
||||
INT32 buf = gametic % TICQUEUE;
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (playeringame[i])
|
||||
G_CopyTiccmd(&players[i].cmd, &netcmds[buf][i], 1);
|
||||
}
|
||||
|
||||
P_PreTicker(2);
|
||||
|
||||
if (!reloadinggamestate)
|
||||
LUA_HookInt(gamemap, HOOK(MapLoad));
|
||||
}
|
||||
@@ -3247,17 +3261,6 @@ boolean P_AddWadFile(const char *wadfilename, boolean local)
|
||||
return true;
|
||||
}
|
||||
|
||||
boolean P_AddWadFileLocal(const char *wadfilename)
|
||||
{
|
||||
UINT16 wadnum;
|
||||
|
||||
if ((wadnum = P_PartialAddWadFile(wadfilename, true)) == UINT16_MAX)
|
||||
return false;
|
||||
|
||||
P_MultiSetupWadFiles(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
// check for replacement votescreen backgrounds
|
||||
boolean wideracereplaced = false;
|
||||
boolean racereplaced = false;
|
||||
|
||||
+1
-1
@@ -65,8 +65,8 @@ boolean P_SetupLevel(boolean fromnetsave, boolean reloadinggamestate);
|
||||
#ifdef HWRENDER
|
||||
void HWR_LoadLevel(void);
|
||||
#endif
|
||||
|
||||
boolean P_AddWadFile(const char *wadfilename, boolean local);
|
||||
boolean P_AddWadFileLocal(const char *wadfilename);
|
||||
|
||||
extern boolean wideracereplaced;
|
||||
extern boolean racereplaced;
|
||||
|
||||
+15
-29
@@ -1721,6 +1721,19 @@ static boolean is_rain_type (INT32 weathernum)
|
||||
}
|
||||
}
|
||||
|
||||
void P_PurgePrecipitation(void)
|
||||
{
|
||||
thinker_t *think;
|
||||
thinker_t *next;
|
||||
|
||||
for (think = precipcap.next; think != NULL && think != &precipcap;)
|
||||
{
|
||||
next = think->next;
|
||||
P_FreePrecipMobj((precipmobj_t *)think);
|
||||
think = next;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// P_SwitchWeather
|
||||
//
|
||||
@@ -1729,6 +1742,7 @@ static boolean is_rain_type (INT32 weathernum)
|
||||
void P_SwitchWeather(INT32 weathernum)
|
||||
{
|
||||
boolean purge = true;
|
||||
boolean spawnprecip = false;
|
||||
|
||||
if (weathernum == curWeather)
|
||||
return;
|
||||
@@ -1739,22 +1753,7 @@ void P_SwitchWeather(INT32 weathernum)
|
||||
|
||||
if (purge)
|
||||
{
|
||||
thinker_t *think;
|
||||
thinker_t *next;
|
||||
precipmobj_t *precipmobj;
|
||||
|
||||
for (think = precipcap.next; think != &precipcap; think = next)
|
||||
{
|
||||
next = think->next;
|
||||
|
||||
#ifdef PARANOIA
|
||||
if (think->function.acp1 != (actionf_p1)P_NullPrecipThinker)
|
||||
continue; // not a precipmobj thinker
|
||||
#endif
|
||||
|
||||
precipmobj = (precipmobj_t *)think;
|
||||
P_FreePrecipMobj(precipmobj);
|
||||
}
|
||||
P_PurgePrecipitation();
|
||||
}
|
||||
else // Rather than respawn all that crap, reuse it!
|
||||
{
|
||||
@@ -1764,11 +1763,6 @@ void P_SwitchWeather(INT32 weathernum)
|
||||
|
||||
for (think = precipcap.next; think != &precipcap; think = think->next)
|
||||
{
|
||||
#ifdef PARANOIA
|
||||
if (think->function.acp1 != (actionf_p1)P_NullPrecipThinker)
|
||||
continue; // not a precipmobj thinker
|
||||
#endif
|
||||
|
||||
precipmobj = (precipmobj_t *)think;
|
||||
|
||||
INT32 z = 0;
|
||||
@@ -1813,8 +1807,6 @@ void P_SwitchWeather(INT32 weathernum)
|
||||
}
|
||||
}
|
||||
|
||||
boolean spawnprecip = false;
|
||||
|
||||
switch (weathernum)
|
||||
{
|
||||
case PRECIP_SNOW: // snow
|
||||
@@ -1822,23 +1814,17 @@ void P_SwitchWeather(INT32 weathernum)
|
||||
spawnprecip = true;
|
||||
break;
|
||||
case PRECIP_RAIN: // rain
|
||||
{
|
||||
curWeather = PRECIP_RAIN;
|
||||
spawnprecip = true;
|
||||
break;
|
||||
}
|
||||
case PRECIP_STORM: // storm
|
||||
{
|
||||
curWeather = PRECIP_STORM;
|
||||
spawnprecip = true;
|
||||
break;
|
||||
}
|
||||
case PRECIP_STORM_NOSTRIKES: // storm w/o lightning
|
||||
{
|
||||
curWeather = PRECIP_STORM_NOSTRIKES;
|
||||
spawnprecip = true;
|
||||
break;
|
||||
}
|
||||
case PRECIP_STORM_NORAIN: // storm w/o rain
|
||||
curWeather = PRECIP_STORM_NORAIN;
|
||||
break;
|
||||
|
||||
@@ -74,6 +74,7 @@ INT32 P_FindMinSurroundingLight(sector_t *sector, INT32 max);
|
||||
void P_SetupSignExit(player_t *player);
|
||||
boolean P_IsFlagAtBase(mobjtype_t flag);
|
||||
|
||||
void P_PurgePrecipitation(void);
|
||||
void P_SwitchWeather(INT32 weathernum);
|
||||
|
||||
boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller);
|
||||
|
||||
+3
-19
@@ -295,27 +295,11 @@ static void FlipCam4_OnChange(void)
|
||||
|
||||
static void Precipstuff_OnChange(void)
|
||||
{
|
||||
if (gamestate != GS_LEVEL)
|
||||
return;
|
||||
|
||||
thinker_t *think;
|
||||
thinker_t *next;
|
||||
precipmobj_t *precipmobj;
|
||||
|
||||
for (think = precipcap.next; think != &precipcap; think = next)
|
||||
if (gamestate == GS_LEVEL)
|
||||
{
|
||||
next = think->next;
|
||||
|
||||
#ifdef PARANOIA
|
||||
if (think->function.acp1 != (actionf_p1)P_NullPrecipThinker)
|
||||
continue; // not a precipmobj thinker
|
||||
#endif
|
||||
|
||||
precipmobj = (precipmobj_t *)think;
|
||||
P_FreePrecipMobj(precipmobj);
|
||||
P_PurgePrecipitation();
|
||||
P_SpawnPrecipitation();
|
||||
}
|
||||
|
||||
P_SpawnPrecipitation();
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
+13
-9
@@ -2860,7 +2860,7 @@ void R_ClipSprites(void)
|
||||
/* Check if thing may be drawn from our current view. */
|
||||
boolean R_ThingVisible (mobj_t *thing)
|
||||
{
|
||||
if (UNLIKELY(thing->sprite == SPR_NULL) || UNLIKELY((thing->flags2 & MF2_DONTDRAW)))
|
||||
if (UNLIKELY((thing->sprite == SPR_NULL) || (thing->flags2 & MF2_DONTDRAW)))
|
||||
return false;
|
||||
|
||||
if (splitscreen)
|
||||
@@ -3100,7 +3100,7 @@ INT32 R_SkinAvailable(const char *name)
|
||||
|
||||
for (i = 0; i < numskins; i++)
|
||||
{
|
||||
if (stricmp(skins[i].name,name)==0)
|
||||
if (stricmp(skins[i].name,name) == 0)
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
@@ -3114,7 +3114,7 @@ INT32 R_AnySkinAvailable(const char *name)
|
||||
|
||||
for (i = 0; i < numallskins; i++)
|
||||
{
|
||||
if (stricmp(allskins[i].name,name)==0)
|
||||
if (stricmp(allskins[i].name,name) == 0)
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
@@ -3128,7 +3128,7 @@ INT32 R_LocalSkinAvailable(const char *name, boolean local)
|
||||
{
|
||||
for (i = 0; i < numlocalskins; i++)
|
||||
{
|
||||
if (stricmp(localskins[i].name,name)==0)
|
||||
if (stricmp(localskins[i].name,name) == 0)
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
@@ -3167,11 +3167,11 @@ void SetLocalPlayerSkin(INT32 playernum, const char *skinname, consvar_t *cvar)
|
||||
INT32 i;
|
||||
player_t *player = &players[playernum];
|
||||
|
||||
if (strcasecmp(skinname, "none"))
|
||||
if (stricmp(skinname, "none"))
|
||||
{
|
||||
for (i = 0; i < numlocalskins; i++)
|
||||
{
|
||||
// search in the skin list
|
||||
// search in the localskin list
|
||||
if (stricmp(localskins[i].name, skinname) == 0)
|
||||
{
|
||||
player->localskin = 1 + i;
|
||||
@@ -3181,9 +3181,11 @@ void SetLocalPlayerSkin(INT32 playernum, const char *skinname, consvar_t *cvar)
|
||||
player->mo->localskin = &localskins[i];
|
||||
player->mo->skinlocal = true;
|
||||
}
|
||||
break;
|
||||
|
||||
goto setcvar;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < numskins; i++)
|
||||
{
|
||||
// search in the skin list
|
||||
@@ -3196,7 +3198,8 @@ void SetLocalPlayerSkin(INT32 playernum, const char *skinname, consvar_t *cvar)
|
||||
player->mo->localskin = &skins[i];
|
||||
player->mo->skinlocal = false;
|
||||
}
|
||||
break;
|
||||
|
||||
goto setcvar;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3211,6 +3214,7 @@ void SetLocalPlayerSkin(INT32 playernum, const char *skinname, consvar_t *cvar)
|
||||
}
|
||||
}
|
||||
|
||||
setcvar:
|
||||
if (cvar != NULL)
|
||||
{
|
||||
if (player->localskin > 0)
|
||||
@@ -3258,6 +3262,7 @@ void SetPlayerSkinByNum(INT32 playernum, INT32 skinnum)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Skin %d not found\n"), skinnum);
|
||||
else if(server || IsPlayerAdmin(consoleplayer))
|
||||
CONS_Alert(CONS_WARNING, "Player %d (%s) skin %d not found\n", playernum, player_names[playernum], skinnum);
|
||||
|
||||
SetPlayerSkinByNum(playernum, 0); // not found put the sonic skin
|
||||
}
|
||||
|
||||
@@ -3704,7 +3709,6 @@ next_token:
|
||||
numallskins++;
|
||||
}
|
||||
|
||||
#undef lskin
|
||||
#undef lnumskins
|
||||
//sortSkinGrid();
|
||||
|
||||
|
||||
+2
-2
@@ -506,8 +506,8 @@ static void ST_drawLevelTitle(void)
|
||||
static const char *ST_GetButtonName(INT32 control, const char *inputtext, boolean unbound, boolean gamectrl)
|
||||
{
|
||||
static char buttname[32] = "";
|
||||
const char *butt1 = (gamecontrol[control][0] != 0 ? G_KeynumToString(gamecontrol[control][0]) : NULL);
|
||||
const char *butt2 = (gamecontrol[control][1] != 0 ? G_KeynumToString(gamecontrol[control][1]) : NULL); // alternative bind
|
||||
const char *butt1 = (gamecontrol[0][control][0] != 0 ? G_KeynumToString(gamecontrol[0][control][0]) : NULL);
|
||||
const char *butt2 = (gamecontrol[0][control][1] != 0 ? G_KeynumToString(gamecontrol[0][control][1]) : NULL); // alternative bind
|
||||
|
||||
if (butt1 == NULL && butt2 == NULL) // not bound to a button
|
||||
snprintf(buttname, 32, (unbound ? "%s - %s" : (gamectrl ? "-%s - %s" : "%s - %s")), (unbound ? "Unbound" : ""), inputtext);
|
||||
|
||||
@@ -894,8 +894,10 @@ INT32 W_InitMultipleFiles(char **filenames, boolean addons)
|
||||
|
||||
//CONS_Debug(DBG_SETUP, "Loading %s\n", *filenames);
|
||||
rc = W_InitFile(*filenames, false);
|
||||
|
||||
if (rc == INT16_MAX)
|
||||
CONS_Printf(M_GetText("Errors occurred while loading %s; not added.\n"), *filenames);
|
||||
|
||||
overallrc &= (rc != INT16_MAX) ? 1 : 0;
|
||||
}
|
||||
|
||||
@@ -914,8 +916,10 @@ INT32 W_AddAutoloadedLocalFiles(char **filenames)
|
||||
for (; *filenames; filenames++)
|
||||
{
|
||||
rc = P_PartialAddWadFile(*filenames, true);
|
||||
|
||||
if (rc == UINT16_MAX)
|
||||
CONS_Printf(M_GetText("Errors occurred while loading %s; not added.\n"), *filenames);
|
||||
|
||||
overallrc &= (rc != UINT16_MAX) ? 1 : 0;
|
||||
}
|
||||
|
||||
@@ -924,6 +928,7 @@ INT32 W_AddAutoloadedLocalFiles(char **filenames)
|
||||
|
||||
if (P_PartialAddGetStage() >= 0)
|
||||
P_MultiSetupWadFiles(true);
|
||||
|
||||
return overallrc;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user