Compare commits
82
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
982cd7bde2 | ||
|
|
d6bd289fcf | ||
|
|
ba44e61733 | ||
|
|
845652cbfe | ||
|
|
ceafa06efc | ||
|
|
e6f487474b | ||
|
|
d8461bb44f | ||
|
|
e25d366728 | ||
|
|
2abf0b98ac | ||
|
|
0f087d13bb | ||
|
|
2e914c61d1 | ||
|
|
3f599d5a28 | ||
|
|
6ef1f73d4d | ||
|
|
38b84baf9d | ||
|
|
fae50c0e19 | ||
|
|
50f7e2084c | ||
|
|
67cc5402cf | ||
|
|
2259d4f309 | ||
|
|
f8d903e7d2 | ||
|
|
805cde8ae8 | ||
|
|
b23906e327 | ||
|
|
2052afdb66 | ||
|
|
d9c7a40d4a | ||
|
|
cb2e017bcf | ||
|
|
d91fbf5d36 | ||
|
|
9859e43be7 | ||
|
|
306fec6f9e | ||
|
|
3e8b3e868b | ||
|
|
9261d9c5b2 | ||
|
|
f97941f86e | ||
|
|
a4810bd6c8 | ||
|
|
93cbba218a | ||
|
|
e749346f0c | ||
|
|
a658883664 | ||
|
|
d94c10014f | ||
|
|
45629386bb | ||
|
|
ffec9d64d5 | ||
|
|
3e9f17af86 | ||
|
|
03ff2fc007 | ||
|
|
4492c00840 | ||
|
|
e15319ac9b | ||
|
|
fa012aefe1 | ||
|
|
e681d2d24d | ||
|
|
76e54762d8 | ||
|
|
3b7d517be2 | ||
|
|
f4da64e3fa | ||
|
|
384acf8e31 | ||
|
|
a423451383 | ||
|
|
66cfceedaf | ||
|
|
fe9107fa9d | ||
|
|
e4f2db54e7 | ||
|
|
2f5fe01ae0 | ||
|
|
1bb7bd0abc | ||
|
|
a84ec88bc3 | ||
|
|
4a2e78081a | ||
|
|
d09d2cb445 | ||
|
|
1faa585e83 | ||
|
|
7479c82691 | ||
|
|
cfab2236da | ||
|
|
d2ee344b22 | ||
|
|
b22737223e | ||
|
|
578158c060 | ||
|
|
8eda0f78f7 | ||
|
|
2c2c82dc1a | ||
|
|
d8c9522ec9 | ||
|
|
492aef2165 | ||
|
|
fc0409e967 | ||
|
|
8a89b57e48 | ||
|
|
0f6b9ba181 | ||
|
|
8f1b4004c9 | ||
|
|
bee5250940 | ||
|
|
c61a2e6ba2 | ||
|
|
d293bb9672 | ||
|
|
9fb3f4c9a3 | ||
|
|
b13793b2a4 | ||
|
|
68cb96ab97 | ||
|
|
83bb908ff0 | ||
|
|
fa3dcdb24f | ||
|
|
311258dda0 | ||
|
|
a0f8816de7 | ||
|
|
c546b6225c | ||
|
|
f6c6621af8 |
No files matched your search
+20
-3
@@ -152,6 +152,8 @@ boolean dedicated = false;
|
||||
|
||||
boolean loaded_config = false; // true once config.cfg loaded AND executed
|
||||
|
||||
static void D_CleanFile(char **filearray);
|
||||
|
||||
//
|
||||
// D_PostEvent
|
||||
// Called by the I/O functions when input is detected
|
||||
@@ -896,9 +898,24 @@ void D_SRB2Loop(void)
|
||||
rendertimefrac_unpaused = FRACUNIT;
|
||||
}
|
||||
|
||||
if ((interp || doDisplay) && !frameskip)
|
||||
if (interp || doDisplay)
|
||||
{
|
||||
ranwipe = D_Display();
|
||||
if (!frameskip)
|
||||
{
|
||||
ranwipe = D_Display();
|
||||
}
|
||||
else if (!dedicated)
|
||||
{
|
||||
// always update console and hud
|
||||
// otherwise it may take minutes to open it
|
||||
CON_Drawer();
|
||||
|
||||
if (gamestate == GS_LEVEL)
|
||||
{
|
||||
ST_Drawer();
|
||||
HU_Drawer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Only take screenshots after drawing.
|
||||
@@ -1215,7 +1232,7 @@ void D_AddPostloadFiles(void)
|
||||
postautoloaded = true;
|
||||
}
|
||||
|
||||
void D_CleanFile(char **filearray)
|
||||
static void D_CleanFile(char **filearray)
|
||||
{
|
||||
size_t pnumwadfiles;
|
||||
for (pnumwadfiles = 0; filearray[pnumwadfiles]; pnumwadfiles++)
|
||||
|
||||
@@ -85,8 +85,6 @@ void D_PostEvent(const event_t *ev);
|
||||
|
||||
void D_ProcessEvents(void);
|
||||
|
||||
void D_CleanFile(char **filearray);
|
||||
|
||||
const char *D_Home(void);
|
||||
|
||||
//
|
||||
|
||||
@@ -1185,6 +1185,18 @@ filestatus_t findfile(char *filename, const UINT8 *wantedmd5sum, boolean complet
|
||||
badmd5 = true;
|
||||
// if not found at all, just move on without doing anything
|
||||
|
||||
if (cv_addons_option.value == 3 && *cv_addons_folder.string != '\0')
|
||||
{
|
||||
// next, check any custom directory if specified
|
||||
homecheck = filesearch(filename, cv_addons_folder.string, wantedmd5sum, completepath, 10);
|
||||
|
||||
if (homecheck == FS_FOUND) // we found the file, so return that we have :)
|
||||
return FS_FOUND;
|
||||
else if (homecheck == FS_MD5SUMBAD) // file has a bad md5; move on and look for a file with the right md5
|
||||
badmd5 = true;
|
||||
// if not found at all, just move on without doing anything
|
||||
}
|
||||
|
||||
// finally check "." directory
|
||||
homecheck = filesearch(filename, ".", wantedmd5sum, completepath, 10);
|
||||
|
||||
|
||||
@@ -152,3 +152,8 @@ boolean I_UseNativeKeyboard(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void I_SetBorderlessWindow(void)
|
||||
{
|
||||
|
||||
}
|
||||
+2
-2
@@ -111,8 +111,8 @@ extern char logfilename[1024];
|
||||
#else
|
||||
#define VERSION 1 // Game version
|
||||
#define SUBVERSION 6 // more precise version number
|
||||
#define VERSIONSTRING "Saturn v8.2"
|
||||
#define VERSIONSTRINGW L"Saturn v8.2"
|
||||
#define VERSIONSTRING "Saturn v8.3"
|
||||
#define VERSIONSTRINGW L"Saturn v8.3"
|
||||
// Hey! If you change this, add 1 to the MODVERSION below! Otherwise we can't force updates!
|
||||
// And change CMakeLists.txt (not src/, but in root), for CMake users!
|
||||
// AND appveyor.yml, for the build bots!
|
||||
|
||||
+35
-32
@@ -109,7 +109,7 @@ boolean addedtogame;
|
||||
player_t players[MAXPLAYERS];
|
||||
|
||||
INT32 consoleplayer; // player taking events and displaying
|
||||
INT32 displayplayers[MAXSPLITSCREENPLAYERS]; // view being displayed
|
||||
INT32 displayplayers[MAXSPLITSCREENPLAYERS] = {0}; // view being displayed
|
||||
|
||||
tic_t gametic;
|
||||
tic_t levelstarttic; // gametic at level start
|
||||
@@ -681,47 +681,49 @@ INT32 JoyAxis(axis_input_e axissel, UINT8 player)
|
||||
INT32 axisval;
|
||||
boolean flp = false;
|
||||
|
||||
UINT8 pnum = player-1;
|
||||
|
||||
//find what axis to get
|
||||
switch (axissel)
|
||||
{
|
||||
case AXISTURN:
|
||||
axisval = cv_turnaxis[player-1].value;
|
||||
axisval = cv_turnaxis[pnum].value;
|
||||
break;
|
||||
case AXISMOVE:
|
||||
axisval = cv_moveaxis[player-1].value;
|
||||
axisval = cv_moveaxis[pnum].value;
|
||||
break;
|
||||
case AXISCAMTURN:
|
||||
axisval = cv_camturnaxis[player-1].value;
|
||||
axisval = cv_camturnaxis[pnum].value;
|
||||
break;
|
||||
case AXISCAMSTRAFE:
|
||||
axisval = cv_camstrafeaxis[player-1].value;
|
||||
axisval = cv_camstrafeaxis[pnum].value;
|
||||
break;
|
||||
case AXISBRAKE:
|
||||
axisval = cv_brakeaxis[player-1].value;
|
||||
axisval = cv_brakeaxis[pnum].value;
|
||||
break;
|
||||
case AXISAIM:
|
||||
axisval = cv_aimaxis[player-1].value;
|
||||
axisval = cv_aimaxis[pnum].value;
|
||||
break;
|
||||
case AXISLOOK:
|
||||
axisval = cv_lookaxis[player-1].value;
|
||||
axisval = cv_lookaxis[pnum].value;
|
||||
break;
|
||||
case AXISFIRE:
|
||||
axisval = cv_fireaxis[player-1].value;
|
||||
axisval = cv_fireaxis[pnum].value;
|
||||
break;
|
||||
case AXISDRIFT:
|
||||
axisval = cv_driftaxis[player-1].value;
|
||||
axisval = cv_driftaxis[pnum].value;
|
||||
break;
|
||||
case AXISLOOKBACK:
|
||||
axisval = cv_lookbackaxis[player-1].value;
|
||||
axisval = cv_lookbackaxis[pnum].value;
|
||||
break;
|
||||
case AXISCUSTOM1:
|
||||
axisval = cv_custom1axis[player-1].value;
|
||||
axisval = cv_custom1axis[pnum].value;
|
||||
break;
|
||||
case AXISCUSTOM2:
|
||||
axisval = cv_custom2axis[player-1].value;
|
||||
axisval = cv_custom2axis[pnum].value;
|
||||
break;
|
||||
case AXISCUSTOM3:
|
||||
axisval = cv_custom3axis[player-1].value;
|
||||
axisval = cv_custom3axis[pnum].value;
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
@@ -732,44 +734,51 @@ INT32 JoyAxis(axis_input_e axissel, UINT8 player)
|
||||
axisval = -axisval;
|
||||
flp = true;
|
||||
}
|
||||
|
||||
if (axisval > JOYAXISSET*2 || axisval == 0) //not there in array or None
|
||||
return 0;
|
||||
|
||||
if (axisval%2)
|
||||
if (axisval % 2)
|
||||
{
|
||||
axisval /= 2;
|
||||
retaxis = joyxmove[axisval];
|
||||
retaxis = joyxmove[pnum][axisval];
|
||||
|
||||
if (retaxis < (-JOYAXISRANGE))
|
||||
retaxis = -JOYAXISRANGE;
|
||||
if (retaxis > (+JOYAXISRANGE))
|
||||
retaxis = +JOYAXISRANGE;
|
||||
if (!Joystick[player-1].bGamepadStyle && axissel < AXISDEAD)
|
||||
if (!Joystick[pnum].bGamepadStyle && axissel < AXISDEAD)
|
||||
{
|
||||
const INT32 jdeadzone = ((JOYAXISRANGE-1) * cv_xdeadzone[player-1].value) >> FRACBITS;
|
||||
const INT32 jdeadzone = ((JOYAXISRANGE-1) * cv_xdeadzone[pnum].value) >> FRACBITS;
|
||||
if (abs(retaxis) <= jdeadzone)
|
||||
return 0;
|
||||
}
|
||||
if (flp) retaxis = -retaxis; //flip it around
|
||||
|
||||
if (flp)
|
||||
retaxis = -retaxis; // flip it around
|
||||
|
||||
return retaxis;
|
||||
}
|
||||
else
|
||||
{
|
||||
axisval--;
|
||||
axisval /= 2;
|
||||
retaxis = joyymove[axisval];
|
||||
retaxis = joyymove[pnum][axisval];
|
||||
|
||||
if (retaxis < (-JOYAXISRANGE))
|
||||
retaxis = -JOYAXISRANGE;
|
||||
if (retaxis > (+JOYAXISRANGE))
|
||||
retaxis = +JOYAXISRANGE;
|
||||
if (!Joystick[player-1].bGamepadStyle && axissel < AXISDEAD)
|
||||
if (!Joystick[pnum].bGamepadStyle && axissel < AXISDEAD)
|
||||
{
|
||||
const INT32 jdeadzone = ((JOYAXISRANGE-1) * cv_ydeadzone[player-1].value) >> FRACBITS;
|
||||
const INT32 jdeadzone = ((JOYAXISRANGE-1) * cv_ydeadzone[pnum].value) >> FRACBITS;
|
||||
if (abs(retaxis) <= jdeadzone)
|
||||
return 0;
|
||||
}
|
||||
if (flp) retaxis = -retaxis; //flip it around
|
||||
|
||||
if (flp)
|
||||
retaxis = -retaxis; // flip it around
|
||||
|
||||
return retaxis;
|
||||
}
|
||||
}
|
||||
@@ -1216,15 +1225,9 @@ static void G_DoLoadLevel(boolean resetplayer)
|
||||
}
|
||||
|
||||
// clear cmd building stuff
|
||||
memset(gamekeydown, 0, sizeof (gamekeydown));
|
||||
|
||||
for (i = 0; i < JOYAXISSET; i++)
|
||||
{
|
||||
joyxmove[i] = joyymove[i] = 0;
|
||||
joy2xmove[i] = joy2ymove[i] = 0;
|
||||
joy3xmove[i] = joy3ymove[i] = 0;
|
||||
joy4xmove[i] = joy4ymove[i] = 0;
|
||||
}
|
||||
memset(gamekeydown, 0, sizeof(gamekeydown));
|
||||
memset(joyxmove, 0, sizeof(joyxmove));
|
||||
memset(joyymove, 0, sizeof(joyymove));
|
||||
mousex = mousey = 0;
|
||||
|
||||
// clear hud messages remains (usually from game startup)
|
||||
|
||||
+9
-19
@@ -114,8 +114,7 @@ INT32 mousex, mousey;
|
||||
INT32 mlooky; // like mousey but with a custom sensitivity for mlook
|
||||
|
||||
// joystick values are repeated
|
||||
INT32 joyxmove[JOYAXISSET], joyymove[JOYAXISSET], joy2xmove[JOYAXISSET], joy2ymove[JOYAXISSET],
|
||||
joy3xmove[JOYAXISSET], joy3ymove[JOYAXISSET], joy4xmove[JOYAXISSET], joy4ymove[JOYAXISSET];
|
||||
INT32 joyxmove[MAXSPLITSCREENPLAYERS][JOYAXISSET], joyymove[MAXSPLITSCREENPLAYERS][JOYAXISSET];
|
||||
|
||||
// current state of the keys: true if pushed
|
||||
UINT8 gamekeydown[NUMINPUTS];
|
||||
@@ -187,32 +186,32 @@ void G_MapEventsToControls(event_t *ev)
|
||||
i = ev->data1;
|
||||
if (i >= JOYAXISSET || menuactive || CON_Ready() || chat_on)
|
||||
break;
|
||||
if (ev->data2 != INT32_MAX) joyxmove[i] = ev->data2;
|
||||
if (ev->data3 != INT32_MAX) joyymove[i] = ev->data3;
|
||||
if (ev->data2 != INT32_MAX) joyxmove[0][i] = ev->data2;
|
||||
if (ev->data3 != INT32_MAX) joyymove[0][i] = ev->data3;
|
||||
break;
|
||||
|
||||
case ev_joystick2: // buttons are virtual keys
|
||||
i = ev->data1;
|
||||
if (i >= JOYAXISSET || menuactive)
|
||||
break;
|
||||
if (ev->data2 != INT32_MAX) joy2xmove[i] = ev->data2;
|
||||
if (ev->data3 != INT32_MAX) joy2ymove[i] = ev->data3;
|
||||
if (ev->data2 != INT32_MAX) joyxmove[1][i] = ev->data2;
|
||||
if (ev->data3 != INT32_MAX) joyymove[1][i] = ev->data3;
|
||||
break;
|
||||
|
||||
case ev_joystick3:
|
||||
i = ev->data1;
|
||||
if (i >= JOYAXISSET)
|
||||
break;
|
||||
if (ev->data2 != INT32_MAX) joy3xmove[i] = ev->data2;
|
||||
if (ev->data3 != INT32_MAX) joy3ymove[i] = ev->data3;
|
||||
if (ev->data2 != INT32_MAX) joyxmove[2][i] = ev->data2;
|
||||
if (ev->data3 != INT32_MAX) joyymove[2][i] = ev->data3;
|
||||
break;
|
||||
|
||||
case ev_joystick4:
|
||||
i = ev->data1;
|
||||
if (i >= JOYAXISSET)
|
||||
break;
|
||||
if (ev->data2 != INT32_MAX) joy4xmove[i] = ev->data2;
|
||||
if (ev->data3 != INT32_MAX) joy4ymove[i] = ev->data3;
|
||||
if (ev->data2 != INT32_MAX) joyxmove[3][i] = ev->data2;
|
||||
if (ev->data3 != INT32_MAX) joyymove[3][i] = ev->data3;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -258,15 +257,6 @@ void G_ResetControls(void)
|
||||
memset(joyxmove, 0, sizeof(joyxmove));
|
||||
memset(joyymove, 0, sizeof(joyymove));
|
||||
|
||||
memset(joy2xmove, 0, sizeof(joy2xmove));
|
||||
memset(joy2ymove, 0, sizeof(joy2ymove));
|
||||
|
||||
memset(joy3xmove, 0, sizeof(joy3xmove));
|
||||
memset(joy3ymove, 0, sizeof(joy3ymove));
|
||||
|
||||
memset(joy4xmove, 0, sizeof(joy4xmove));
|
||||
memset(joy4ymove, 0, sizeof(joy4ymove));
|
||||
|
||||
// reset those just in case the game missed the keyup event
|
||||
memset(dpadscrollstate, false, sizeof(dpadscrollstate));
|
||||
}
|
||||
|
||||
+8
-5
@@ -41,10 +41,12 @@ typedef enum
|
||||
KEY_DBLJOY1 = KEY_DBLMOUSE1 + MOUSEBUTTONS,
|
||||
KEY_DBLHAT1 = KEY_DBLJOY1 + JOYBUTTONS,
|
||||
|
||||
KEY_2JOY1 = KEY_DBLHAT1 + MOUSEBUTTONS,
|
||||
KEY_2MOUSE1 = KEY_DBLHAT1 + JOYHATS*4,
|
||||
KEY_2JOY1 = KEY_2MOUSE1 + MOUSEBUTTONS,
|
||||
KEY_2HAT1 = KEY_2JOY1 + JOYBUTTONS,
|
||||
|
||||
KEY_DBL2JOY1 = KEY_2HAT1 + MOUSEBUTTONS,
|
||||
KEY_DBL2MOUSE1 = KEY_2HAT1 + JOYHATS*4,
|
||||
KEY_DBL2JOY1 = KEY_DBL2MOUSE1 + MOUSEBUTTONS,
|
||||
KEY_DBL2HAT1 = KEY_DBL2JOY1 + JOYBUTTONS,
|
||||
|
||||
KEY_3JOY1 = KEY_DBL2HAT1 + JOYHATS*4,
|
||||
@@ -61,8 +63,10 @@ typedef enum
|
||||
|
||||
KEY_MOUSEWHEELUP = KEY_DBL4HAT1 + JOYHATS*4,
|
||||
KEY_MOUSEWHEELDOWN = KEY_MOUSEWHEELUP + 1,
|
||||
KEY_2MOUSEWHEELUP = KEY_MOUSEWHEELDOWN + 1,
|
||||
KEY_2MOUSEWHEELDOWN = KEY_2MOUSEWHEELUP + 1,
|
||||
|
||||
NUMINPUTS = KEY_MOUSEWHEELDOWN + 1,
|
||||
NUMINPUTS = KEY_2MOUSEWHEELDOWN + 1, // FIXME: all the mouse 2 stuff should be removed, but it screws up mappings somehow
|
||||
} key_input_e;
|
||||
|
||||
typedef enum
|
||||
@@ -113,8 +117,7 @@ extern consvar_t cv_gamepadled[MAXSPLITSCREENPLAYERS];
|
||||
extern INT32 mousex, mousey;
|
||||
extern INT32 mlooky; //mousey with mlookSensitivity
|
||||
|
||||
extern INT32 joyxmove[JOYAXISSET], joyymove[JOYAXISSET], joy2xmove[JOYAXISSET], joy2ymove[JOYAXISSET],
|
||||
joy3xmove[JOYAXISSET], joy3ymove[JOYAXISSET], joy4xmove[JOYAXISSET], joy4ymove[JOYAXISSET];
|
||||
extern INT32 joyxmove[MAXSPLITSCREENPLAYERS][JOYAXISSET], joyymove[MAXSPLITSCREENPLAYERS][JOYAXISSET];
|
||||
|
||||
// current state of the keys: true if pushed
|
||||
extern UINT8 gamekeydown[NUMINPUTS];
|
||||
|
||||
+6
-8
@@ -310,7 +310,7 @@ void HU_LoadGraphics(void)
|
||||
lt_font[0] = (patch_t *)W_CachePatchName("LTFNT039", PU_HUDGFX); /// \note fake start hack
|
||||
|
||||
// Number support
|
||||
lt_font[9] = (patch_t *)W_CachePatchName("LTFNT048", PU_HUDGFX);
|
||||
lt_font[9] = (patch_t *)W_CachePatchName("LTFNT048", PU_HUDGFX);
|
||||
lt_font[10] = (patch_t *)W_CachePatchName("LTFNT049", PU_HUDGFX);
|
||||
lt_font[11] = (patch_t *)W_CachePatchName("LTFNT050", PU_HUDGFX);
|
||||
lt_font[12] = (patch_t *)W_CachePatchName("LTFNT051", PU_HUDGFX);
|
||||
@@ -747,7 +747,7 @@ static void Command_CSay_f(void)
|
||||
return;
|
||||
}
|
||||
|
||||
if(!server && !IsPlayerAdmin(consoleplayer))
|
||||
if (!server && !IsPlayerAdmin(consoleplayer))
|
||||
{
|
||||
CONS_Alert(CONS_NOTICE, M_GetText("Only servers and admins can use csay.\n"));
|
||||
return;
|
||||
@@ -2881,13 +2881,11 @@ void HU_DoCEcho(const char *msg)
|
||||
*p = '\n';
|
||||
|
||||
CONS_Printf("%s\n", temp);
|
||||
|
||||
return;
|
||||
}
|
||||
else if (cv_cechotoggle.value)
|
||||
cechotimer = cechoduration;
|
||||
|
||||
I_OutputMsg("%s\n", msg); // print to log
|
||||
|
||||
if (!cv_cechotoggle.value)
|
||||
return;
|
||||
|
||||
cechotimer = cechoduration;
|
||||
I_OutputMsg("%s\n", msg); // ALWAYS print to log
|
||||
}
|
||||
@@ -145,6 +145,8 @@ boolean I_UseNativeKeyboard(void);
|
||||
|
||||
boolean I_CheckNativeRes(void);
|
||||
|
||||
void I_SetBorderlessWindow(void);
|
||||
|
||||
#ifdef USE_FBO_OGL
|
||||
|
||||
void RefreshOGLSDLSurface(void);
|
||||
|
||||
+6
-5
@@ -3081,14 +3081,12 @@ static void K_SpawnDriftSparks(player_t *player)
|
||||
if (leveltime % 2 == 1)
|
||||
return;
|
||||
|
||||
if (cv_airsparks.value)
|
||||
goto skipground;
|
||||
const boolean onground = P_IsObjectOnGround(player->mo);
|
||||
|
||||
if (!P_IsObjectOnGround(player->mo))
|
||||
// kinda sketchy
|
||||
if (!cv_airsparks.value && !onground)
|
||||
return;
|
||||
|
||||
skipground: // idk im sleepy
|
||||
|
||||
if (!player->kartstuff[k_drift] || player->kartstuff[k_driftcharge] < K_GetKartDriftSparkValue(player))
|
||||
return;
|
||||
|
||||
@@ -3105,6 +3103,8 @@ skipground: // idk im sleepy
|
||||
newy = player->mo->y + P_ReturnThrustY(player->mo, thrustangle, smolscale);
|
||||
spark = P_SpawnMobj(newx, newy, player->mo->z, MT_DRIFTSPARK);
|
||||
|
||||
spark->islocal = cv_airsparks.value && !onground;
|
||||
|
||||
P_SetTarget(&spark->target, player->mo);
|
||||
spark->angle = travelangle-(ANGLE_45/5)*player->kartstuff[k_drift];
|
||||
|
||||
@@ -5361,6 +5361,7 @@ FUNCINLINE static ATTRINLINE void K_SpawnNormalSpeedLines(player_t *player, bool
|
||||
fast->momx = 3*player->mo->momx/4;
|
||||
fast->momy = 3*player->mo->momy/4;
|
||||
fast->momz = 3*player->mo->momz/4;
|
||||
fast->islocal = !synched;
|
||||
P_SetTarget(&fast->target, player->mo); // easier lua access
|
||||
|
||||
K_MatchGenericExtraFlags(fast, player->mo);
|
||||
|
||||
+2
-1
@@ -150,7 +150,8 @@ static const udata_field_t mobj_fields[] = {
|
||||
FIELD(mobj_t, cvmem, udatalib_getter_int32, udatalib_setter_int32),
|
||||
FIELD(mobj_t, standingslope, udatalib_getter_slope, mobj_standingslope_noset),
|
||||
FIELD(mobj_t, colorized, udatalib_getter_boolean, udatalib_setter_boolean),
|
||||
FIELD(mobj_t, mirrored, udatalib_getter_boolean, udatalib_setter_boolean),
|
||||
FIELD(mobj_t, mirrored, udatalib_getter_boolean, udatalib_setter_boolean),
|
||||
FIELD(mobj_t, islocal, udatalib_getter_boolean, udatalib_setter_boolean),
|
||||
{ NULL, 0, NULL, NULL },
|
||||
};
|
||||
#undef FIELD
|
||||
|
||||
+13
-12
@@ -1114,10 +1114,10 @@ static menuitem_t MP_PlayerSetupMenu[] =
|
||||
#ifndef NONET
|
||||
static menuitem_t MP_ConnectMenu[] =
|
||||
{
|
||||
{IT_STRING | IT_KEYHANDLER, NULL, "", M_HandleServerSearch,0},
|
||||
{IT_STRING | IT_CVAR, NULL, "Sort By", &cv_serversort, 16},
|
||||
{IT_STRING | IT_KEYHANDLER, NULL, "Page", M_HandleServerPage, 24},
|
||||
{IT_STRING | IT_CALL, NULL, "Refresh", M_Refresh, 32},
|
||||
{IT_STRING | IT_CVAR, NULL, "Sort By", &cv_serversort, 0},
|
||||
{IT_STRING | IT_KEYHANDLER, NULL, "Page", M_HandleServerPage, 8},
|
||||
{IT_STRING | IT_CALL, NULL, "Refresh", M_Refresh, 16},
|
||||
{IT_STRING | IT_KEYHANDLER, NULL, "", M_HandleServerSearch,25},
|
||||
|
||||
{IT_STRING | IT_SPACE, NULL, "", M_Connect, 48},
|
||||
{IT_STRING | IT_SPACE, NULL, "", M_Connect, 60},
|
||||
@@ -1133,10 +1133,10 @@ static menuitem_t MP_ConnectMenu[] =
|
||||
|
||||
enum
|
||||
{
|
||||
mp_connect_search,
|
||||
mp_connect_sort,
|
||||
mp_connect_page,
|
||||
mp_connect_refresh,
|
||||
mp_connect_search,
|
||||
FIRSTSERVERLINE
|
||||
};
|
||||
#endif
|
||||
@@ -6072,8 +6072,8 @@ static void M_AddonsOptions(INT32 choice)
|
||||
M_SetupNextMenu(&OP_AddonsOptionsDef);
|
||||
}
|
||||
|
||||
#define LOCATIONSTRING1 "Visit \x83SRB2.ORG/MODS\x80 to get & make addons!"
|
||||
#define LOCATIONSTRING2 "Visit \x88SRB2.ORG/MODS\x80 to get & make addons!"
|
||||
#define LOCATIONSTRING1 "Visit \x83mb.srb2.org/addons\x80 to get & make addons!"
|
||||
#define LOCATIONSTRING2 "Visit \x88mb.srb2.org/addons\x80 to get & make addons!"
|
||||
|
||||
static void M_AddonsInternal(void)
|
||||
{
|
||||
@@ -9884,15 +9884,16 @@ static void M_DrawConnectMenu(void)
|
||||
M_DrawServerLines(currentMenu->x, serverlistpage);
|
||||
}
|
||||
|
||||
V_DrawFill(currentMenu->x, currentMenu->y, MAXSTRINGLENGTH*8+6, 8+6, 239);
|
||||
INT32 input_y = currentMenu->menuitems[mp_connect_search].alphaKey;
|
||||
|
||||
V_DrawFill(currentMenu->x, currentMenu->y+input_y, MAXSTRINGLENGTH*8+6, 8+6, 239);
|
||||
|
||||
const INT32 xoff = 3, yoff = 3;
|
||||
|
||||
|
||||
if (itemOn != 0)
|
||||
V_DrawString(currentMenu->x+xoff, currentMenu->y+yoff, V_ALLOWLOWERCASE, menuinput.buffer);
|
||||
if (itemOn != mp_connect_search)
|
||||
V_DrawString(currentMenu->x+xoff, currentMenu->y+yoff+input_y, V_ALLOWLOWERCASE, menuinput.buffer);
|
||||
else
|
||||
M_DrawTextInput(currentMenu->x+xoff, currentMenu->y+yoff, &menuinput, 0);
|
||||
M_DrawTextInput(currentMenu->x+xoff, currentMenu->y+yoff+input_y, &menuinput, 0);
|
||||
|
||||
localservercount = serverlistcount;
|
||||
|
||||
|
||||
+1498
-1425
File diff suppressed because it is too large.
Load diff
@@ -414,6 +414,7 @@ typedef struct mobj_s
|
||||
boolean init_salty;
|
||||
|
||||
// WARNING: New fields must be added separately to savegame and Lua.
|
||||
boolean islocal; // BEWARE: islocal does not exist in vanilla, strictly to be used for locally loaded addons to not cause desynchs with the mobj linedef trigger check. DO NOT USE THIS IN ACTUAL ADDONS YOU INTEND TO USE ON YOUR SERVER
|
||||
} mobj_t;
|
||||
|
||||
//
|
||||
|
||||
+8
-20
@@ -42,13 +42,13 @@ static CV_PossibleValue_t fpscap_cons_t[] = {
|
||||
{0, NULL}
|
||||
};
|
||||
|
||||
consvar_t cv_fpscap = {"fpscap", "Match refresh rate", CV_SAVE, fpscap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_fpscap = {"fpscap", "Match refresh rate", CV_SAVE, fpscap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_fpscapbg = {"fpscapbackground", "Match refresh rate", CV_SAVE, fpscap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_precipinterp = {"precipinterpolation", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
ps_metric_t ps_interp_frac = {0};
|
||||
ps_metric_t ps_interp_lag = {0};
|
||||
ps_metric_t ps_interp_lag = {0};
|
||||
|
||||
static boolean R_UseBackgroundFramerateCap(void)
|
||||
{
|
||||
@@ -67,21 +67,21 @@ static boolean R_UseBackgroundFramerateCap(void)
|
||||
return false;
|
||||
}
|
||||
|
||||
static UINT32 R_GetBackgroundFramerateCap(void)
|
||||
static UINT32 R_GetFrameCap(INT32 val)
|
||||
{
|
||||
if (cv_fpscapbg.value == 0)
|
||||
if (val == 0)
|
||||
{
|
||||
// 0: Match refresh rate
|
||||
return I_GetRefreshRate();
|
||||
}
|
||||
|
||||
if (cv_fpscapbg.value < 0)
|
||||
if (val < 0)
|
||||
{
|
||||
// -1: Unlimited
|
||||
return 0;
|
||||
}
|
||||
|
||||
return cv_fpscapbg.value;
|
||||
return val;
|
||||
}
|
||||
|
||||
UINT32 R_GetFramerateCap(void)
|
||||
@@ -95,22 +95,10 @@ UINT32 R_GetFramerateCap(void)
|
||||
|
||||
if (R_UseBackgroundFramerateCap())
|
||||
{
|
||||
return R_GetBackgroundFramerateCap();
|
||||
return R_GetFrameCap(cv_fpscapbg.value);
|
||||
}
|
||||
|
||||
if (cv_fpscap.value == 0)
|
||||
{
|
||||
// 0: Match refresh rate
|
||||
return I_GetRefreshRate();
|
||||
}
|
||||
|
||||
if (cv_fpscap.value < 0)
|
||||
{
|
||||
// -1: Unlimited
|
||||
return 0;
|
||||
}
|
||||
|
||||
return cv_fpscap.value;
|
||||
return R_GetFrameCap(cv_fpscap.value);
|
||||
}
|
||||
|
||||
boolean R_UsingFrameInterpolation(void)
|
||||
|
||||
+34
-32
@@ -1133,7 +1133,6 @@ static void R_SetupSkyScale(player_t *player, camera_t *thiscam, mapheader_t *mh
|
||||
{
|
||||
if (skyboxmo[1])
|
||||
{
|
||||
angle_t ang;
|
||||
fixed_t x = 0, y = 0;
|
||||
|
||||
if (mh->skybox_scalex > 0)
|
||||
@@ -1165,8 +1164,8 @@ static void R_SetupSkyScale(player_t *player, camera_t *thiscam, mapheader_t *mh
|
||||
newview->y -= x;
|
||||
break;
|
||||
default:
|
||||
ang = viewmobj->angle>>ANGLETOFINESHIFT;
|
||||
newview->x += FixedMul(x,FINECOSINE(ang)) - FixedMul(y, FINESINE(ang));
|
||||
angle_t ang = viewmobj->angle>>ANGLETOFINESHIFT;
|
||||
newview->x += FixedMul(x,FINECOSINE(ang)) - FixedMul(y, FINESINE(ang));
|
||||
newview->y += FixedMul(x, FINESINE(ang)) + FixedMul(y,FINECOSINE(ang));
|
||||
break;
|
||||
}
|
||||
@@ -1192,14 +1191,14 @@ static void R_SetupSkyScale(player_t *player, camera_t *thiscam, mapheader_t *mh
|
||||
}
|
||||
}
|
||||
|
||||
void R_SkyboxFrame(int s)
|
||||
void R_SkyboxFrame(UINT8 pnum)
|
||||
{
|
||||
player_t *player = &players[displayplayers[s]];
|
||||
camera_t *thiscam = &camera[s];
|
||||
subsector_t *subsector = NULL;
|
||||
player_t *player = &players[displayplayers[pnum]];
|
||||
camera_t *thiscam = &camera[pnum];
|
||||
sector_t *viewsec = NULL;
|
||||
mapheader_t *mh = mapheaderinfo[gamemap-1];
|
||||
|
||||
R_SetViewContext(static_cast<viewcontext_e>(VIEWCONTEXT_SKY1 + s));
|
||||
R_SetViewContext(static_cast<viewcontext_e>(VIEWCONTEXT_SKY1 + pnum));
|
||||
|
||||
// cut-away view stuff
|
||||
newview->sky = true;
|
||||
@@ -1215,35 +1214,38 @@ void R_SkyboxFrame(int s)
|
||||
|
||||
R_SetupAimingFrame(player, thiscam);
|
||||
|
||||
newview->angle += viewmobj->angle;
|
||||
if (!P_MobjWasRemoved(viewmobj))
|
||||
{
|
||||
newview->angle += viewmobj->angle;
|
||||
|
||||
newview->x = viewmobj->x;
|
||||
newview->y = viewmobj->y;
|
||||
newview->z = (viewmobj->spawnpoint) ? (((fixed_t)viewmobj->spawnpoint->angle)<<FRACBITS) : 0;
|
||||
newview->x = viewmobj->x;
|
||||
newview->y = viewmobj->y;
|
||||
newview->z = (viewmobj->spawnpoint) ? (((fixed_t)viewmobj->spawnpoint->angle) << FRACBITS) : 0;
|
||||
|
||||
if (viewmobj->subsector)
|
||||
viewsec = viewmobj->subsector->sector;
|
||||
}
|
||||
|
||||
if (mh)
|
||||
{
|
||||
R_SetupSkyScale(player, thiscam, mh);
|
||||
}
|
||||
|
||||
if (!P_MobjWasRemoved(viewmobj) && viewmobj->subsector && viewmobj->subsector->sector)
|
||||
subsector = viewmobj->subsector;
|
||||
|
||||
R_SetupCommonFrame(player, subsector->sector);
|
||||
R_SetupCommonFrame(player, viewsec);
|
||||
}
|
||||
|
||||
void R_SetupFrame(int s, boolean skybox)
|
||||
void R_SetupFrame(UINT8 pnum, boolean skybox)
|
||||
{
|
||||
player_t *player = &players[displayplayers[s]];
|
||||
camera_t *thiscam = &camera[s];
|
||||
boolean chasecam = (cv_chasecam[s].value);
|
||||
sector_t * sector = NULL;
|
||||
player_t *player = &players[displayplayers[pnum]];
|
||||
camera_t *thiscam = &camera[pnum];
|
||||
boolean chasecam = (cv_chasecam[pnum].value);
|
||||
sector_t *viewsec = NULL;
|
||||
|
||||
R_SetViewContext(static_cast<viewcontext_e>(VIEWCONTEXT_PLAYER1 + s));
|
||||
R_SetViewContext(static_cast<viewcontext_e>(VIEWCONTEXT_PLAYER1 + pnum));
|
||||
|
||||
if (thiscam->reset)
|
||||
{
|
||||
R_ResetViewInterpolation(s);
|
||||
R_ResetViewInterpolation(pnum);
|
||||
thiscam->reset = false;
|
||||
}
|
||||
|
||||
@@ -1278,10 +1280,10 @@ void R_SetupFrame(int s, boolean skybox)
|
||||
newview->y = viewmobj->y;
|
||||
newview->z = viewmobj->z + 20*FRACUNIT;
|
||||
|
||||
if (viewmobj->subsector && viewmobj->subsector->sector)
|
||||
sector = viewmobj->subsector->sector;
|
||||
if (viewmobj->subsector)
|
||||
viewsec = viewmobj->subsector->sector;
|
||||
|
||||
R_SetupCommonFrame(player, sector);
|
||||
R_SetupCommonFrame(player, viewsec);
|
||||
}
|
||||
else if (thiscam && chasecam) // use outside cam view
|
||||
{
|
||||
@@ -1292,10 +1294,10 @@ void R_SetupFrame(int s, boolean skybox)
|
||||
newview->y = thiscam->y;
|
||||
newview->z = thiscam->z + (thiscam->height>>1);
|
||||
|
||||
if (thiscam->subsector && thiscam->subsector->sector)
|
||||
sector = thiscam->subsector->sector;
|
||||
if (thiscam->subsector)
|
||||
viewsec = thiscam->subsector->sector;
|
||||
|
||||
R_SetupCommonFrame(player, sector);
|
||||
R_SetupCommonFrame(player, viewsec);
|
||||
}
|
||||
else if (player->mo) // use the player's eyes view
|
||||
{
|
||||
@@ -1306,10 +1308,10 @@ void R_SetupFrame(int s, boolean skybox)
|
||||
newview->y = viewmobj->y;
|
||||
newview->z = player->viewz;
|
||||
|
||||
if (viewmobj->subsector && viewmobj->subsector->sector)
|
||||
sector = viewmobj->subsector->sector;
|
||||
if (viewmobj->subsector)
|
||||
viewsec = viewmobj->subsector->sector;
|
||||
|
||||
R_SetupCommonFrame(player, sector);
|
||||
R_SetupCommonFrame(player, viewsec);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -215,8 +215,8 @@ void R_SetViewSize(void);
|
||||
void R_ExecuteSetViewSize(void);
|
||||
|
||||
fixed_t R_GetPlayerFov(player_t *player);
|
||||
void R_SkyboxFrame(int s);
|
||||
void R_SetupFrame(int s, boolean skybox);
|
||||
void R_SkyboxFrame(UINT8 pnum);
|
||||
void R_SetupFrame(UINT8 pnum, boolean skybox);
|
||||
|
||||
// Called by G_Drawer.
|
||||
void R_RenderPlayerView(player_t *player);
|
||||
|
||||
+5
-1
@@ -66,7 +66,9 @@ static void Highreshudscale_OnChange(void)
|
||||
|
||||
static void SCR_ChangeFullscreen (void);
|
||||
|
||||
consvar_t cv_fullscreen = {"fullscreen", "Yes", CV_SAVE|CV_CALL, CV_YesNo, SCR_ChangeFullscreen, 0, NULL, NULL, 0, 0, NULL};
|
||||
static CV_PossibleValue_t fullscreen_cons_t[] = {{0, "No"}, {1, "Yes"}, {2, "Borderless Window"}, {0, NULL}};
|
||||
|
||||
consvar_t cv_fullscreen = {"fullscreen", "Yes", CV_SAVE|CV_CALL, fullscreen_cons_t, SCR_ChangeFullscreen, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
static CV_PossibleValue_t accuratefps_cons_t[] = {{0, "Inaccurate"}, {1, "Accurate"}, {0, NULL}};
|
||||
consvar_t cv_accuratefps = {"fpssampling", "1", CV_SAVE, accuratefps_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
@@ -325,6 +327,8 @@ void SCR_SetDefaultMode(void)
|
||||
void SCR_ChangeFullscreen(void)
|
||||
{
|
||||
#ifdef DIRECTFULLSCREEN
|
||||
I_SetBorderlessWindow(); // Running this here so we can have borderless window at startup
|
||||
|
||||
// allow_fullscreen is set by VID_PrepareModeList
|
||||
// it is used to prevent switching to fullscreen during startup
|
||||
if (!allow_fullscreen)
|
||||
|
||||
+8
-1
@@ -150,7 +150,7 @@ UINT8 graphics_started = 0; // Is used in console.c and screen.c
|
||||
// To disable fullscreen at startup; is set in VID_PrepareModeList
|
||||
boolean allow_fullscreen = false;
|
||||
static SDL_bool disable_fullscreen = SDL_FALSE;
|
||||
#define USE_FULLSCREEN (disable_fullscreen||!allow_fullscreen)?0:cv_fullscreen.value
|
||||
#define USE_FULLSCREEN (disable_fullscreen||!allow_fullscreen)? 0: (cv_fullscreen.value == 1)
|
||||
static SDL_bool disable_mouse = SDL_FALSE;
|
||||
#define USE_MOUSEINPUT (!disable_mouse && cv_usemouse.value && havefocus)
|
||||
#define MOUSE_MENU false //(!disable_mouse && cv_usemouse.value && menuactive && !USE_FULLSCREEN)
|
||||
@@ -1353,6 +1353,7 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen)
|
||||
{
|
||||
wasfullscreen = SDL_TRUE;
|
||||
SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP);
|
||||
I_SetBorderlessWindow();
|
||||
}
|
||||
else // windowed mode
|
||||
{
|
||||
@@ -2157,4 +2158,10 @@ static void Impl_SetVsync(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
void I_SetBorderlessWindow(void)
|
||||
{
|
||||
SDL_bool borderless = (cv_fullscreen.value == 2) ? SDL_FALSE : SDL_TRUE;
|
||||
SDL_SetWindowBordered(window, borderless);
|
||||
}
|
||||
|
||||
#endif
|
||||
+17
-16
@@ -419,27 +419,28 @@ static void ST_drawDebugInfo(void)
|
||||
|
||||
static void ST_drawLevelTitle(void)
|
||||
{
|
||||
char *lvlttl = mapheaderinfo[gamemap-1]->lvlttl;
|
||||
char *subttl = mapheaderinfo[gamemap-1]->subttl;
|
||||
char *zonttl = mapheaderinfo[gamemap-1]->zonttl; // SRB2kart
|
||||
char *actnum = mapheaderinfo[gamemap-1]->actnum;
|
||||
INT32 lvlttlxpos;
|
||||
INT32 ttlnumxpos;
|
||||
INT32 zonexpos;
|
||||
INT32 dupcalc = (vid.width/vid.dupx);
|
||||
UINT8 gtc = G_GetGametypeColor(gametype);
|
||||
char *lvlttl, *subttl, *zonttl, *actnum;
|
||||
INT32 lvlttlxpos, ttlnumxpos, zonexpos;
|
||||
INT32 dupcalc;
|
||||
UINT8 gtc;
|
||||
INT32 sub = 0;
|
||||
INT32 bary = (splitscreen)
|
||||
? BASEVIDHEIGHT/2
|
||||
: 163;
|
||||
INT32 bary;
|
||||
INT32 lvlw;
|
||||
|
||||
if (!cv_stagetitle.value)
|
||||
if (!cv_stagetitle.value || (timeinmap > 113))
|
||||
return;
|
||||
|
||||
if (timeinmap > 113)
|
||||
if (*mapheaderinfo[gamemap-1]->lvlttl == '\0')
|
||||
return;
|
||||
|
||||
lvlttl = mapheaderinfo[gamemap-1]->lvlttl;
|
||||
subttl = mapheaderinfo[gamemap-1]->subttl;
|
||||
zonttl = mapheaderinfo[gamemap-1]->zonttl; // SRB2kart
|
||||
actnum = mapheaderinfo[gamemap-1]->actnum;
|
||||
dupcalc = (vid.width/vid.dupx);
|
||||
gtc = G_GetGametypeColor(gametype);
|
||||
bary = (splitscreen) ? BASEVIDHEIGHT/2 : 163;
|
||||
|
||||
lvlw = V_LevelNameWidth(lvlttl);
|
||||
|
||||
if (actnum[0])
|
||||
@@ -603,7 +604,7 @@ static void ST_overlayDrawer(void)
|
||||
}
|
||||
|
||||
// draw level title Tails
|
||||
if (*mapheaderinfo[gamemap-1]->lvlttl != '\0' && !(hu_showscores && (netgame || multiplayer) && !mapreset) && LUA_HudEnabled(hud_stagetitle) && !forceshowhud)
|
||||
if (!(hu_showscores && (netgame || multiplayer) && !mapreset) && LUA_HudEnabled(hud_stagetitle) && !forceshowhud)
|
||||
ST_drawLevelTitle();
|
||||
|
||||
if (!hu_showscores && netgame && !mapreset)
|
||||
@@ -740,7 +741,7 @@ void ST_Drawer(void)
|
||||
UINT8 i;
|
||||
|
||||
#ifdef SEENAMES
|
||||
if (cv_seenames.value && cv_allowseenames.value && displayplayers[0] == consoleplayer && seenplayer && seenplayer->mo && !mapreset)
|
||||
if (UNLIKELY(cv_seenames.value && cv_allowseenames.value && displayplayers[0] == consoleplayer && seenplayer && seenplayer->mo && !mapreset))
|
||||
{
|
||||
if (cv_seenames.value == 1)
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2 + 15, V_HUDTRANSHALF, player_names[seenplayer-players]);
|
||||
|
||||
Reference in new issue
Block a user