Merge branch 'next' into hardcode-restat
This commit is contained in:
commit
d7ab39bc4e
27 changed files with 171 additions and 65 deletions
|
|
@ -1151,6 +1151,9 @@ void D_SRB2Loop(void)
|
||||||
//
|
//
|
||||||
void D_StartTitle(void)
|
void D_StartTitle(void)
|
||||||
{
|
{
|
||||||
|
if (dedicated)
|
||||||
|
I_Error("D_StartTitle is called on dedicated server");
|
||||||
|
|
||||||
INT32 i;
|
INT32 i;
|
||||||
|
|
||||||
S_StopMusic();
|
S_StopMusic();
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ static INT32 rebound_head, rebound_tail;
|
||||||
INT32 net_bandwidth;
|
INT32 net_bandwidth;
|
||||||
|
|
||||||
/// \brief max length per packet
|
/// \brief max length per packet
|
||||||
INT16 hardware_MAXPACKETLENGTH;
|
INT16 hardware_MAXPACKETLENGTH = 0;
|
||||||
|
|
||||||
boolean (*I_NetGet)(void) = NULL;
|
boolean (*I_NetGet)(void) = NULL;
|
||||||
void (*I_NetSend)(void) = NULL;
|
void (*I_NetSend)(void) = NULL;
|
||||||
|
|
@ -106,7 +106,7 @@ INT32 ticruned = 0, ticmiss = 0;
|
||||||
|
|
||||||
// globals
|
// globals
|
||||||
INT32 getbps, sendbps;
|
INT32 getbps, sendbps;
|
||||||
float lostpercent, duppercent, gamelostpercent;
|
float lostpercent = 0.0f, duppercent = 0.0f, gamelostpercent = 0.0f;
|
||||||
INT32 packetheaderlength;
|
INT32 packetheaderlength;
|
||||||
|
|
||||||
boolean Net_GetNetStat(void)
|
boolean Net_GetNetStat(void)
|
||||||
|
|
|
||||||
|
|
@ -656,6 +656,7 @@ consvar_t cv_kartbubble_defense_canidle = CVAR_INIT ("kartbubble_defense_canidle
|
||||||
static CV_PossibleValue_t bubble_defense_damagerate_cons_t[] = {{0, "MIN"}, {FRACUNIT, "MAX"}, {0, NULL}};
|
static CV_PossibleValue_t bubble_defense_damagerate_cons_t[] = {{0, "MIN"}, {FRACUNIT, "MAX"}, {0, NULL}};
|
||||||
consvar_t cv_kartbubble_defense_damagerate = CVAR_INIT ("kartbubble_defense_damagerate", "1.0", CV_NETVAR|CV_FLOAT, bubble_defense_damagerate_cons_t, NULL);
|
consvar_t cv_kartbubble_defense_damagerate = CVAR_INIT ("kartbubble_defense_damagerate", "1.0", CV_NETVAR|CV_FLOAT, bubble_defense_damagerate_cons_t, NULL);
|
||||||
consvar_t cv_kartbubble_boost_allow = CVAR_INIT ("kartbubble_boost_allow", "On", CV_NETVAR, CV_OnOff, NULL);
|
consvar_t cv_kartbubble_boost_allow = CVAR_INIT ("kartbubble_boost_allow", "On", CV_NETVAR, CV_OnOff, NULL);
|
||||||
|
consvar_t cv_kartbubble_boost_offroadignore = CVAR_INIT ("kartbubble_boost_offroadignore", "On", CV_NETVAR, CV_OnOff, NULL);
|
||||||
consvar_t cv_kartflame_fastfuel = CVAR_INIT ("kartflame_fastfuel", "Off", CV_NETVAR, CV_OnOff, NULL);
|
consvar_t cv_kartflame_fastfuel = CVAR_INIT ("kartflame_fastfuel", "Off", CV_NETVAR, CV_OnOff, NULL);
|
||||||
// we want this to be default now apparently
|
// we want this to be default now apparently
|
||||||
consvar_t cv_kartflame_offroadburn = CVAR_INIT ("kartflame_offroadburn", "On", CV_NETVAR, CV_OnOff, NULL);
|
consvar_t cv_kartflame_offroadburn = CVAR_INIT ("kartflame_offroadburn", "On", CV_NETVAR, CV_OnOff, NULL);
|
||||||
|
|
@ -714,7 +715,7 @@ consvar_t cv_rollingdemos = CVAR_INIT ("rollingdemos", "On", CV_SAVE, CV_OnOff,
|
||||||
static CV_PossibleValue_t pointlimit_cons_t[] = {{1, "MIN"}, {MAXSCORE, "MAX"}, {0, "None"}, {0, NULL}};
|
static CV_PossibleValue_t pointlimit_cons_t[] = {{1, "MIN"}, {MAXSCORE, "MAX"}, {0, "None"}, {0, NULL}};
|
||||||
consvar_t cv_pointlimit = CVAR_INIT ("pointlimit", "None", CV_NETVAR|CV_CALL|CV_NOINIT, pointlimit_cons_t, PointLimit_OnChange);
|
consvar_t cv_pointlimit = CVAR_INIT ("pointlimit", "None", CV_NETVAR|CV_CALL|CV_NOINIT, pointlimit_cons_t, PointLimit_OnChange);
|
||||||
static CV_PossibleValue_t timelimit_cons_t[] = {{1, "MIN"}, {99999, "MAX"}, {0, "None"}, {0, NULL}};
|
static CV_PossibleValue_t timelimit_cons_t[] = {{1, "MIN"}, {99999, "MAX"}, {0, "None"}, {0, NULL}};
|
||||||
consvar_t cv_timelimit = CVAR_INIT ("timelimit", "None", CV_NETVAR|CV_CALL|CV_NOINIT, timelimit_cons_t, TimeLimit_OnChange);
|
consvar_t cv_timelimit = CVAR_INIT ("timelimit", "2", CV_NETVAR|CV_CALL|CV_NOINIT, timelimit_cons_t, TimeLimit_OnChange);
|
||||||
|
|
||||||
static CV_PossibleValue_t numlaps_cons_t[] = {{0, "MIN"}, {MAX_LAPS, "MAX"}, {-1, "Map default"}, {0, NULL}};
|
static CV_PossibleValue_t numlaps_cons_t[] = {{0, "MIN"}, {MAX_LAPS, "MAX"}, {-1, "Map default"}, {0, NULL}};
|
||||||
consvar_t cv_numlaps = CVAR_INIT ("numlaps", "Map default", CV_NETVAR|CV_CALL|CV_CHEAT, numlaps_cons_t, NumLaps_OnChange);
|
consvar_t cv_numlaps = CVAR_INIT ("numlaps", "Map default", CV_NETVAR|CV_CALL|CV_CHEAT, numlaps_cons_t, NumLaps_OnChange);
|
||||||
|
|
@ -824,7 +825,7 @@ boolean forceresetplayers = false;
|
||||||
boolean deferencoremode = false;
|
boolean deferencoremode = false;
|
||||||
UINT8 splitscreen = 0;
|
UINT8 splitscreen = 0;
|
||||||
boolean circuitmap = false;
|
boolean circuitmap = false;
|
||||||
INT32 adminplayers[MAXPLAYERS];
|
INT32 adminplayers[MAXPLAYERS] = {};
|
||||||
|
|
||||||
#define VOTEROWS ((cv_votemaxrows.value*3) + ((cv_votemaxrows.value > 1) ? (cv_votemaxrows.value - 1) : 0))
|
#define VOTEROWS ((cv_votemaxrows.value*3) + ((cv_votemaxrows.value > 1) ? (cv_votemaxrows.value - 1) : 0))
|
||||||
#define VOTEROWSADDSONE ((cv_votemaxrows.value*3) + 1 + ((cv_votemaxrows.value > 1) ? (cv_votemaxrows.value - 1) : 0))
|
#define VOTEROWSADDSONE ((cv_votemaxrows.value*3) + 1 + ((cv_votemaxrows.value > 1) ? (cv_votemaxrows.value - 1) : 0))
|
||||||
|
|
@ -3419,8 +3420,7 @@ void D_PickVote(void)
|
||||||
SendNetXCmd(XD_PICKVOTE, &buf, 2);
|
SendNetXCmd(XD_PICKVOTE, &buf, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *ConcatCommandArgv (int start, int end)
|
||||||
ConcatCommandArgv (int start, int end)
|
|
||||||
{
|
{
|
||||||
char *final;
|
char *final;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -203,6 +203,7 @@ extern consvar_t cv_kartinvin_midtime;
|
||||||
extern consvar_t cv_kartbubble_defense_canidle;
|
extern consvar_t cv_kartbubble_defense_canidle;
|
||||||
extern consvar_t cv_kartbubble_defense_damagerate;
|
extern consvar_t cv_kartbubble_defense_damagerate;
|
||||||
extern consvar_t cv_kartbubble_boost_allow;
|
extern consvar_t cv_kartbubble_boost_allow;
|
||||||
|
extern consvar_t cv_kartbubble_boost_offroadignore;
|
||||||
extern consvar_t cv_kartflame_fastfuel;
|
extern consvar_t cv_kartflame_fastfuel;
|
||||||
extern consvar_t cv_kartflame_offroadburn;
|
extern consvar_t cv_kartflame_offroadburn;
|
||||||
extern consvar_t cv_kartaltshrink_arrowbullet;
|
extern consvar_t cv_kartaltshrink_arrowbullet;
|
||||||
|
|
|
||||||
|
|
@ -2002,7 +2002,8 @@ void CURLGetFile(void)
|
||||||
e = m->easy_handle;
|
e = m->easy_handle;
|
||||||
easyres = m->data.result;
|
easyres = m->data.result;
|
||||||
|
|
||||||
char *filename = Z_StrDup(curl_realname);
|
char *filename = malloc(strlen(curl_realname)+1);
|
||||||
|
strcpy(filename, curl_realname);
|
||||||
nameonly(filename);
|
nameonly(filename);
|
||||||
|
|
||||||
if (easyres != CURLE_OK)
|
if (easyres != CURLE_OK)
|
||||||
|
|
@ -2040,7 +2041,7 @@ void CURLGetFile(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Z_Free(filename);
|
free(filename);
|
||||||
curl_curfile->file = NULL;
|
curl_curfile->file = NULL;
|
||||||
#ifndef HAVE_THREADS
|
#ifndef HAVE_THREADS
|
||||||
curl_running = false;
|
curl_running = false;
|
||||||
|
|
|
||||||
|
|
@ -1794,5 +1794,7 @@ struct int_const_s const INT_CONST[] = {
|
||||||
{"BUMPSPARK_RESET100", BUMPSPARK_RESET100},
|
{"BUMPSPARK_RESET100", BUMPSPARK_RESET100},
|
||||||
{"BUMPSPARK_ALL", BUMPSPARK_ALL},
|
{"BUMPSPARK_ALL", BUMPSPARK_ALL},
|
||||||
|
|
||||||
|
{"BLANKART", 1},
|
||||||
|
|
||||||
{NULL,0}
|
{NULL,0}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ size_t menupathindex[menudepth];
|
||||||
size_t menudepthleft = menudepth;
|
size_t menudepthleft = menudepth;
|
||||||
|
|
||||||
char menusearchbuf[MAXSTRINGLENGTH+1];
|
char menusearchbuf[MAXSTRINGLENGTH+1];
|
||||||
textinput_t menusearch;
|
textinput_t menusearch = {};
|
||||||
|
|
||||||
char **dirmenu, **coredirmenu; // core only local for this file
|
char **dirmenu, **coredirmenu; // core only local for this file
|
||||||
size_t sizedirmenu, sizecoredirmenu; // ditto
|
size_t sizedirmenu, sizecoredirmenu; // ditto
|
||||||
|
|
@ -237,10 +237,13 @@ static boolean filemenucmp(char *haystack, char *needle)
|
||||||
{
|
{
|
||||||
static char localhaystack[128];
|
static char localhaystack[128];
|
||||||
strlcpy(localhaystack, haystack, 128);
|
strlcpy(localhaystack, haystack, 128);
|
||||||
|
|
||||||
if (!cv_addons_search_case.value)
|
if (!cv_addons_search_case.value)
|
||||||
strupr(localhaystack);
|
strupr(localhaystack);
|
||||||
|
|
||||||
if (cv_addons_search_type.value)
|
if (cv_addons_search_type.value)
|
||||||
return (strstr(localhaystack, needle) != 0);
|
return (strstr(localhaystack, needle) != NULL);
|
||||||
|
|
||||||
return (!strncmp(localhaystack, needle, menusearch.length));
|
return (!strncmp(localhaystack, needle, menusearch.length));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -174,13 +174,13 @@ UINT16 skincolor_bluering = SKINCOLOR_PERIWINKLE;
|
||||||
|
|
||||||
boolean exitfadestarted = false;
|
boolean exitfadestarted = false;
|
||||||
|
|
||||||
cutscene_t *cutscenes[128];
|
cutscene_t *cutscenes[128] = {};
|
||||||
textprompt_t *textprompts[MAX_PROMPTS];
|
textprompt_t *textprompts[MAX_PROMPTS];
|
||||||
|
|
||||||
INT16 nextmapoverride;
|
INT16 nextmapoverride;
|
||||||
UINT8 skipstats;
|
UINT8 skipstats;
|
||||||
|
|
||||||
struct quake quake;
|
struct quake quake = {};
|
||||||
|
|
||||||
// Map Header Information
|
// Map Header Information
|
||||||
mapheader_t** mapheaderinfo = {NULL};
|
mapheader_t** mapheaderinfo = {NULL};
|
||||||
|
|
@ -280,7 +280,7 @@ exitcondition_t g_exit;
|
||||||
fixed_t gravity;
|
fixed_t gravity;
|
||||||
fixed_t mapobjectscale;
|
fixed_t mapobjectscale;
|
||||||
|
|
||||||
struct maplighting maplighting;
|
struct maplighting maplighting = {};
|
||||||
|
|
||||||
INT16 autobalance; //for CTF team balance
|
INT16 autobalance; //for CTF team balance
|
||||||
INT16 teamscramble; //for CTF team scramble
|
INT16 teamscramble; //for CTF team scramble
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
#include "g_input.h"
|
#include "g_input.h"
|
||||||
#include "i_system.h"
|
#include "i_system.h"
|
||||||
|
#include "k_items.h"
|
||||||
#include "keys.h"
|
#include "keys.h"
|
||||||
#include "hu_stuff.h" // need HUFONT start & end
|
#include "hu_stuff.h" // need HUFONT start & end
|
||||||
#include "d_net.h"
|
#include "d_net.h"
|
||||||
|
|
@ -25,6 +26,7 @@
|
||||||
#include "g_game.h"
|
#include "g_game.h"
|
||||||
#include "v_video.h"
|
#include "v_video.h"
|
||||||
#include "p_local.h"
|
#include "p_local.h"
|
||||||
|
#include "k_kart.h"
|
||||||
|
|
||||||
#define MAXMOUSESENSITIVITY 100 // sensitivity steps
|
#define MAXMOUSESENSITIVITY 100 // sensitivity steps
|
||||||
|
|
||||||
|
|
@ -135,11 +137,11 @@ static void led_off_handle4(void)
|
||||||
|
|
||||||
// current state of the keys
|
// current state of the keys
|
||||||
// JOYAXISRANGE for fully pressed, 0 for not pressed
|
// JOYAXISRANGE for fully pressed, 0 for not pressed
|
||||||
INT32 gamekeydown[MAXDEVICES][NUMINPUTS];
|
INT32 gamekeydown[MAXDEVICES][NUMINPUTS] = {};
|
||||||
boolean deviceResponding[MAXDEVICES];
|
boolean deviceResponding[MAXDEVICES] = {false};
|
||||||
|
|
||||||
// several key codes (or virtual key) per game control
|
// several key codes (or virtual key) per game control
|
||||||
INT32 gamecontrol[MAXSPLITSCREENPLAYERS][num_gamecontrols][MAXINPUTMAPPING];
|
INT32 gamecontrol[MAXSPLITSCREENPLAYERS][num_gamecontrols][MAXINPUTMAPPING] = {};
|
||||||
|
|
||||||
INT32 gamecontroldefault[num_gamecontrols][MAXINPUTMAPPING] = {
|
INT32 gamecontroldefault[num_gamecontrols][MAXINPUTMAPPING] = {
|
||||||
[gc_aimforward ] = {KEY_UPARROW, KEY_AXIS1+2 }, // Left Y-
|
[gc_aimforward ] = {KEY_UPARROW, KEY_AXIS1+2 }, // Left Y-
|
||||||
|
|
@ -693,7 +695,12 @@ void G_DeviceRumbleTick(void)
|
||||||
//low = high = FRACUNIT / 6;
|
//low = high = FRACUNIT / 6;
|
||||||
low = high = FixedMul((RUMBLE_VERYSTRONG), (FixedDiv(player->spinouttimer, (3*TICRATE / 2)))); // try do some some kinda fadeout, 3*TICRATE / 2 is the "default" spinout time
|
low = high = FixedMul((RUMBLE_VERYSTRONG), (FixedDiv(player->spinouttimer, (3*TICRATE / 2)))); // try do some some kinda fadeout, 3*TICRATE / 2 is the "default" spinout time
|
||||||
}
|
}
|
||||||
else if (player->sneakertimer > (sneakertime-(TICRATE/2)))
|
else if (player->flamestore && !player->offroad)
|
||||||
|
{
|
||||||
|
high = (player->flamestore * RUMBLE_MODERATE) / FLAMESTOREMAX;
|
||||||
|
lenght = 32;
|
||||||
|
}
|
||||||
|
else if (player->sneakertimer > (sneakertime-(TICRATE/2)) || player->bubbleboost > (BUBBLEBOOSTTIME-(TICRATE/2)))
|
||||||
{
|
{
|
||||||
low = high = RUMBLE_STRONG;
|
low = high = RUMBLE_STRONG;
|
||||||
}
|
}
|
||||||
|
|
@ -706,6 +713,10 @@ void G_DeviceRumbleTick(void)
|
||||||
{
|
{
|
||||||
high = RUMBLE_WEAK;
|
high = RUMBLE_WEAK;
|
||||||
}
|
}
|
||||||
|
else if (player->flameoverheat)
|
||||||
|
{
|
||||||
|
low = RUMBLE_MODERATE;
|
||||||
|
}
|
||||||
else if (player->invincibilitytimer)
|
else if (player->invincibilitytimer)
|
||||||
{
|
{
|
||||||
high = RUMBLE_MODERATE;
|
high = RUMBLE_MODERATE;
|
||||||
|
|
|
||||||
|
|
@ -1694,6 +1694,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
||||||
|
|
||||||
// Used for height comparisons and etc across FOFs and slopes
|
// Used for height comparisons and etc across FOFs and slopes
|
||||||
fixed_t high1, highslope1, low1, lowslope1;
|
fixed_t high1, highslope1, low1, lowslope1;
|
||||||
|
fixed_t high2, highslope2, low2, lowslope2;
|
||||||
|
|
||||||
INT32 texnum;
|
INT32 texnum;
|
||||||
line_t * newline = NULL; // Multi-Property FOF
|
line_t * newline = NULL; // Multi-Property FOF
|
||||||
|
|
@ -1707,18 +1708,6 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
||||||
{
|
{
|
||||||
for (rover = gl_backsector->ffloors; rover; rover = rover->next)
|
for (rover = gl_backsector->ffloors; rover; rover = rover->next)
|
||||||
{
|
{
|
||||||
boolean bothsides = false;
|
|
||||||
// Skip if it exists on both sectors.
|
|
||||||
ffloor_t * r2;
|
|
||||||
for (r2 = gl_frontsector->ffloors; r2; r2 = r2->next)
|
|
||||||
if (rover->master == r2->master)
|
|
||||||
{
|
|
||||||
bothsides = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bothsides) continue;
|
|
||||||
|
|
||||||
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERSIDES))
|
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERSIDES))
|
||||||
continue;
|
continue;
|
||||||
if (!(rover->fofflags & FOF_ALLSIDES) && rover->fofflags & FOF_INVERTSIDES)
|
if (!(rover->fofflags & FOF_ALLSIDES) && rover->fofflags & FOF_INVERTSIDES)
|
||||||
|
|
@ -1730,6 +1719,45 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
||||||
if ((high1 < lowcut || highslope1 < lowcutslope) || (low1 > highcut || lowslope1 > highcutslope))
|
if ((high1 < lowcut || highslope1 < lowcutslope) || (low1 > highcut || lowslope1 > highcutslope))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
ffloor_t * r2;
|
||||||
|
for (r2 = gl_frontsector->ffloors; r2; r2 = r2->next)
|
||||||
|
{
|
||||||
|
if (r2->master == rover->master) // Skip if same control line.
|
||||||
|
break;
|
||||||
|
|
||||||
|
const ffloortype_e r2flags = r2->fofflags;
|
||||||
|
|
||||||
|
if (!(r2flags & FOF_EXISTS) || !(r2flags & FOF_RENDERSIDES))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (rover->fofflags & FOF_EXTRA)
|
||||||
|
{
|
||||||
|
if (!(r2flags & FOF_CUTEXTRA))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (r2flags & FOF_EXTRA && (r2flags & (FOF_TRANSLUCENT|FOF_FOG)) != (rover->fofflags & (FOF_TRANSLUCENT|FOF_FOG)))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!(r2flags & FOF_CUTSOLIDS))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
SLOPEPARAMS(*r2->t_slope, high2, highslope2, *r2->topheight)
|
||||||
|
SLOPEPARAMS(*r2->b_slope, low2, lowslope2, *r2->bottomheight)
|
||||||
|
|
||||||
|
if ((high2 < lowcut || highslope2 < lowcutslope) || (low2 > highcut || lowslope2 > highcutslope))
|
||||||
|
continue;
|
||||||
|
if ((high1 > high2 || highslope1 > highslope2) || (low1 < low2 || lowslope1 < lowslope2))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (r2)
|
||||||
|
continue;
|
||||||
|
|
||||||
texnum = R_GetTextureNum(sides[rover->master->sidenum[0]].midtexture);
|
texnum = R_GetTextureNum(sides[rover->master->sidenum[0]].midtexture);
|
||||||
|
|
||||||
if (rover->master->flags & ML_TFERLINE)
|
if (rover->master->flags & ML_TFERLINE)
|
||||||
|
|
@ -1867,18 +1895,6 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
||||||
{
|
{
|
||||||
for (rover = gl_frontsector->ffloors; rover; rover = rover->next)
|
for (rover = gl_frontsector->ffloors; rover; rover = rover->next)
|
||||||
{
|
{
|
||||||
boolean bothsides = false;
|
|
||||||
// Skip if it exists on both sectors.
|
|
||||||
ffloor_t * r2;
|
|
||||||
for (r2 = gl_backsector->ffloors; r2; r2 = r2->next)
|
|
||||||
if (rover->master == r2->master)
|
|
||||||
{
|
|
||||||
bothsides = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bothsides) continue;
|
|
||||||
|
|
||||||
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERSIDES))
|
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERSIDES))
|
||||||
continue;
|
continue;
|
||||||
if (!(rover->fofflags & FOF_ALLSIDES || rover->fofflags & FOF_INVERTSIDES))
|
if (!(rover->fofflags & FOF_ALLSIDES || rover->fofflags & FOF_INVERTSIDES))
|
||||||
|
|
@ -1890,6 +1906,44 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
||||||
if ((high1 < lowcut || highslope1 < lowcutslope) || (low1 > highcut || lowslope1 > highcutslope))
|
if ((high1 < lowcut || highslope1 < lowcutslope) || (low1 > highcut || lowslope1 > highcutslope))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
ffloor_t * r2;
|
||||||
|
for (r2 = gl_backsector->ffloors; r2; r2 = r2->next)
|
||||||
|
{
|
||||||
|
if (r2->master == rover->master) // Skip if same control line.
|
||||||
|
break;
|
||||||
|
|
||||||
|
const ffloortype_e r2flags = r2->fofflags;
|
||||||
|
|
||||||
|
if (!(r2flags & FOF_EXISTS) || !(r2flags & FOF_RENDERSIDES))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (rover->fofflags & FOF_EXTRA)
|
||||||
|
{
|
||||||
|
if (!(r2flags & FOF_CUTEXTRA))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (r2flags & FOF_EXTRA && (r2flags & (FOF_TRANSLUCENT|FOF_FOG)) != (rover->fofflags & (FOF_TRANSLUCENT|FOF_FOG)))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!(r2flags & FOF_CUTSOLIDS))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
SLOPEPARAMS(*r2->t_slope, high2, highslope2, *r2->topheight)
|
||||||
|
SLOPEPARAMS(*r2->b_slope, low2, lowslope2, *r2->bottomheight)
|
||||||
|
|
||||||
|
if ((high2 < lowcut || highslope2 < lowcutslope) || (low2 > highcut || lowslope2 > highcutslope))
|
||||||
|
continue;
|
||||||
|
if ((high1 > high2 || highslope1 > highslope2) || (low1 < low2 || lowslope1 < lowslope2))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (r2)
|
||||||
|
continue;
|
||||||
|
|
||||||
texnum = R_GetTextureNum(sides[rover->master->sidenum[0]].midtexture);
|
texnum = R_GetTextureNum(sides[rover->master->sidenum[0]].midtexture);
|
||||||
|
|
||||||
if (rover->master->flags & ML_TFERLINE)
|
if (rover->master->flags & ML_TFERLINE)
|
||||||
|
|
|
||||||
|
|
@ -671,7 +671,7 @@ typedef struct gl_shaderstate_s
|
||||||
static gl_shaderstate_t gl_shaderstate;
|
static gl_shaderstate_t gl_shaderstate;
|
||||||
|
|
||||||
// Shader info
|
// Shader info
|
||||||
static float shader_leveltime = 0;
|
static float shader_leveltime = 0.0f;
|
||||||
static float shader_light_x = 0.0f;
|
static float shader_light_x = 0.0f;
|
||||||
static float shader_light_y = 0.0f;
|
static float shader_light_y = 0.0f;
|
||||||
static float shader_light_z = 0.0f;
|
static float shader_light_z = 0.0f;
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
#include "m_fixed.h"
|
#include "m_fixed.h"
|
||||||
#include "i_system.h"
|
#include "i_system.h"
|
||||||
|
|
||||||
timestate_t g_time;
|
timestate_t g_time = {};
|
||||||
|
|
||||||
static CV_PossibleValue_t timescale_cons_t[] = {{FRACUNIT/20, "MIN"}, {20*FRACUNIT, "MAX"}, {0, NULL}};
|
static CV_PossibleValue_t timescale_cons_t[] = {{FRACUNIT/20, "MIN"}, {20*FRACUNIT, "MAX"}, {0, NULL}};
|
||||||
consvar_t cv_timescale = CVAR_INIT ("timescale", "1.0", CV_NETVAR|CV_CHEAT|CV_FLOAT, timescale_cons_t, NULL);
|
consvar_t cv_timescale = CVAR_INIT ("timescale", "1.0", CV_NETVAR|CV_CHEAT|CV_FLOAT, timescale_cons_t, NULL);
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ static patch_t *kp_racefinish[6];
|
||||||
static patch_t *kp_positionnum[NUMPOSNUMS][NUMPOSFRAMES];
|
static patch_t *kp_positionnum[NUMPOSNUMS][NUMPOSFRAMES];
|
||||||
static patch_t *kp_winnernum[NUMPOSFRAMES];
|
static patch_t *kp_winnernum[NUMPOSFRAMES];
|
||||||
|
|
||||||
patch_t *kp_facenum[MAXPLAYERS+1];
|
patch_t *kp_facenum[MAXPLAYERS+1] = {};
|
||||||
static patch_t *kp_facehighlight[8];
|
static patch_t *kp_facehighlight[8];
|
||||||
|
|
||||||
static patch_t *kp_nocontestminimap;
|
static patch_t *kp_nocontestminimap;
|
||||||
|
|
|
||||||
|
|
@ -2466,7 +2466,7 @@ void K_PlayerItemThink(player_t *player, boolean onground)
|
||||||
// experiment: don't boost, just give invulnerability
|
// experiment: don't boost, just give invulnerability
|
||||||
if (cv_kartbubble_boost_allow.value)
|
if (cv_kartbubble_boost_allow.value)
|
||||||
{
|
{
|
||||||
player->bubbleboost = 7 * sneakertime / 10;
|
player->bubbleboost = BUBBLEBOOSTTIME;
|
||||||
}
|
}
|
||||||
player->flashing = 4*TICRATE/7;
|
player->flashing = 4*TICRATE/7;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -229,6 +229,8 @@ void K_PlayerItemThink(player_t *player, boolean onground);
|
||||||
extern consvar_t cv_karteggmine_slotlock;
|
extern consvar_t cv_karteggmine_slotlock;
|
||||||
extern consvar_t cv_karteggmine_slotbrick;
|
extern consvar_t cv_karteggmine_slotbrick;
|
||||||
|
|
||||||
|
#define BUBBLEBOOSTTIME (7 * sneakertime / 10)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -421,6 +421,7 @@ void K_RegisterKartStuff(void)
|
||||||
CV_RegisterVar(&cv_kartbubble_defense_canidle);
|
CV_RegisterVar(&cv_kartbubble_defense_canidle);
|
||||||
CV_RegisterVar(&cv_kartbubble_defense_damagerate);
|
CV_RegisterVar(&cv_kartbubble_defense_damagerate);
|
||||||
CV_RegisterVar(&cv_kartbubble_boost_allow);
|
CV_RegisterVar(&cv_kartbubble_boost_allow);
|
||||||
|
CV_RegisterVar(&cv_kartbubble_boost_offroadignore);
|
||||||
CV_RegisterVar(&cv_kartflame_fastfuel);
|
CV_RegisterVar(&cv_kartflame_fastfuel);
|
||||||
CV_RegisterVar(&cv_kartflame_offroadburn);
|
CV_RegisterVar(&cv_kartflame_offroadburn);
|
||||||
CV_RegisterVar(&cv_kartaltshrink_arrowbullet);
|
CV_RegisterVar(&cv_kartaltshrink_arrowbullet);
|
||||||
|
|
@ -2158,7 +2159,7 @@ boolean K_ApplyOffroad(const player_t *player)
|
||||||
if (modeattacking != ATTACKING_NONE)
|
if (modeattacking != ATTACKING_NONE)
|
||||||
sneakertimer = player->sneakertimer > 0;
|
sneakertimer = player->sneakertimer > 0;
|
||||||
|
|
||||||
if (player->hyudorotimer || sneakertimer)
|
if (player->hyudorotimer || sneakertimer || (cv_kartbubble_boost_offroadignore.value && player->bubbleboost))
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -312,6 +312,12 @@ static int mobj_get(lua_State *L)
|
||||||
case mobj_roll:
|
case mobj_roll:
|
||||||
lua_pushangle(L, mo->roll);
|
lua_pushangle(L, mo->roll);
|
||||||
break;
|
break;
|
||||||
|
case mobj_slopepitch:
|
||||||
|
lua_pushangle(L, mo->slopepitch);
|
||||||
|
break;
|
||||||
|
case mobj_sloperoll:
|
||||||
|
lua_pushangle(L, mo->sloperoll);
|
||||||
|
break;
|
||||||
case mobj_rollangle:
|
case mobj_rollangle:
|
||||||
lua_pushangle(L, mo->rollangle);
|
lua_pushangle(L, mo->rollangle);
|
||||||
break;
|
break;
|
||||||
|
|
@ -701,6 +707,12 @@ static int mobj_set(lua_State *L)
|
||||||
case mobj_roll:
|
case mobj_roll:
|
||||||
mo->roll = luaL_checkangle(L, 3);
|
mo->roll = luaL_checkangle(L, 3);
|
||||||
break;
|
break;
|
||||||
|
case mobj_slopepitch:
|
||||||
|
mo->slopepitch = luaL_checkangle(L, 3);
|
||||||
|
break;
|
||||||
|
case mobj_sloperoll:
|
||||||
|
mo->sloperoll = luaL_checkangle(L, 3);
|
||||||
|
break;
|
||||||
case mobj_rollangle:
|
case mobj_rollangle:
|
||||||
mo->rollangle = luaL_checkangle(L, 3);
|
mo->rollangle = luaL_checkangle(L, 3);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -356,10 +356,16 @@ int LUA_PushGlobals(lua_State *L, const char *word)
|
||||||
lua_pushinteger(L, gravity);
|
lua_pushinteger(L, gravity);
|
||||||
return 1;
|
return 1;
|
||||||
} else if (fastcmp(word,"VERSION")) {
|
} else if (fastcmp(word,"VERSION")) {
|
||||||
lua_pushinteger(L, VERSION);
|
if (lua_compatmode)
|
||||||
|
lua_pushinteger(L, 1);
|
||||||
|
else
|
||||||
|
lua_pushinteger(L, VERSION);
|
||||||
return 1;
|
return 1;
|
||||||
} else if (fastcmp(word,"SUBVERSION")) {
|
} else if (fastcmp(word,"SUBVERSION")) {
|
||||||
lua_pushinteger(L, SUBVERSION);
|
if (lua_compatmode)
|
||||||
|
lua_pushinteger(L, 6);
|
||||||
|
else
|
||||||
|
lua_pushinteger(L, SUBVERSION);
|
||||||
return 1;
|
return 1;
|
||||||
} else if (fastcmp(word,"VERSIONSTRING")) {
|
} else if (fastcmp(word,"VERSIONSTRING")) {
|
||||||
lua_pushstring(L, VERSIONSTRING);
|
lua_pushstring(L, VERSIONSTRING);
|
||||||
|
|
|
||||||
|
|
@ -713,7 +713,7 @@ void Command_Resetemeralds_f(void)
|
||||||
// Devmode
|
// Devmode
|
||||||
//
|
//
|
||||||
|
|
||||||
UINT32 cht_debug;
|
UINT32 cht_debug = 0;
|
||||||
|
|
||||||
struct debugFlagNames_s const debug_flag_names[] =
|
struct debugFlagNames_s const debug_flag_names[] =
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4553,7 +4553,7 @@ INT32 MR_QuitAddons(INT32 choice)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---- REPLAY HUT -----
|
// ---- REPLAY HUT -----
|
||||||
menudemo_t *demolist;
|
menudemo_t *demolist = NULL;
|
||||||
|
|
||||||
#define DF_ENCORE 0x40
|
#define DF_ENCORE 0x40
|
||||||
static INT16 replayScrollTitle = 0;
|
static INT16 replayScrollTitle = 0;
|
||||||
|
|
@ -5578,7 +5578,7 @@ void M_RefreshPauseMenu(void)
|
||||||
// SKY ROOM
|
// SKY ROOM
|
||||||
// ========
|
// ========
|
||||||
|
|
||||||
UINT8 skyRoomMenuTranslations[MAXUNLOCKABLES];
|
UINT8 skyRoomMenuTranslations[MAXUNLOCKABLES] = {};
|
||||||
|
|
||||||
static char *M_GetConditionString(condition_t cond)
|
static char *M_GetConditionString(condition_t cond)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1490,7 +1490,7 @@ boolean P_BlockThingsIterator(INT32 x, INT32 y, BlockItReturn_t (*func)(mobj_t *
|
||||||
static intercept_t *intercepts = NULL;
|
static intercept_t *intercepts = NULL;
|
||||||
static intercept_t *intercept_p = NULL;
|
static intercept_t *intercept_p = NULL;
|
||||||
|
|
||||||
divline_t g_trace;
|
divline_t g_trace = {};
|
||||||
|
|
||||||
//SoM: 4/6/2000: Remove limit on intercepts.
|
//SoM: 4/6/2000: Remove limit on intercepts.
|
||||||
static void P_CheckIntercepts(void)
|
static void P_CheckIntercepts(void)
|
||||||
|
|
|
||||||
|
|
@ -11772,9 +11772,9 @@ void P_RemoveFloorSpriteSlope(mobj_t *mobj)
|
||||||
//
|
//
|
||||||
// P_RemoveMobj
|
// P_RemoveMobj
|
||||||
//
|
//
|
||||||
mapthing_t *itemrespawnque[ITEMQUESIZE];
|
mapthing_t *itemrespawnque[ITEMQUESIZE] = {};
|
||||||
tic_t itemrespawntime[ITEMQUESIZE];
|
tic_t itemrespawntime[ITEMQUESIZE] = {};
|
||||||
size_t iquehead, iquetail;
|
size_t iquehead = 0, iquetail = 0;
|
||||||
|
|
||||||
#ifdef PARANOIA
|
#ifdef PARANOIA
|
||||||
//#define SCRAMBLE_REMOVED // Force debug build to crash when Removed mobj is accessed
|
//#define SCRAMBLE_REMOVED // Force debug build to crash when Removed mobj is accessed
|
||||||
|
|
|
||||||
|
|
@ -537,9 +537,9 @@ void P_AllocMapHeader(INT16 i)
|
||||||
//
|
//
|
||||||
#define MAXLEVELFLATS 256
|
#define MAXLEVELFLATS 256
|
||||||
|
|
||||||
size_t nummaxflats;
|
size_t nummaxflats = 0;
|
||||||
size_t numlevelflats;
|
size_t numlevelflats = 0;
|
||||||
levelflat_t *levelflats;
|
levelflat_t *levelflats = NULL;
|
||||||
|
|
||||||
//SoM: Other files want this info.
|
//SoM: Other files want this info.
|
||||||
size_t P_PrecacheLevelFlats(void)
|
size_t P_PrecacheLevelFlats(void)
|
||||||
|
|
@ -8148,8 +8148,8 @@ void P_SetupLevelSky(const char *skytexname, boolean global)
|
||||||
R_SetupSkyDraw();
|
R_SetupSkyDraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *maplumpname;
|
static const char *maplumpname = NULL;
|
||||||
lumpnum_t lastloadedmaplumpnum; // for comparative savegame
|
lumpnum_t lastloadedmaplumpnum = LUMPERROR; // for comparative savegame
|
||||||
|
|
||||||
//
|
//
|
||||||
// P_LevelInitStuff
|
// P_LevelInitStuff
|
||||||
|
|
@ -8619,7 +8619,7 @@ static void P_InitGametype(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct minimapinfo minimapinfo;
|
struct minimapinfo minimapinfo = {};
|
||||||
|
|
||||||
static void P_InitMinimapInfo(void)
|
static void P_InitMinimapInfo(void)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -9336,6 +9336,7 @@ boolean P_AllowFriction(mobj_t *mobj)
|
||||||
if (mobj->player->invincibilitytimer
|
if (mobj->player->invincibilitytimer
|
||||||
|| mobj->player->hyudorotimer
|
|| mobj->player->hyudorotimer
|
||||||
|| mobj->player->sneakertimer
|
|| mobj->player->sneakertimer
|
||||||
|
|| (cv_kartbubble_boost_offroadignore.value && mobj->player->bubbleboost)
|
||||||
|| mobj->player->growshrinktimer > 0
|
|| mobj->player->growshrinktimer > 0
|
||||||
|| K_IsAltShrunk(mobj->player))
|
|| K_IsAltShrunk(mobj->player))
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -2033,7 +2033,7 @@ static void P_3dMovement(player_t *player)
|
||||||
// If "no" to 1, we're not reaching any limits yet, so ignore this entirely!
|
// If "no" to 1, we're not reaching any limits yet, so ignore this entirely!
|
||||||
// -Shadow Hog
|
// -Shadow Hog
|
||||||
newMagnitude = R_PointToDist2(player->mo->momx - player->cmomx, player->mo->momy - player->cmomy, 0, 0);
|
newMagnitude = R_PointToDist2(player->mo->momx - player->cmomx, player->mo->momy - player->cmomy, 0, 0);
|
||||||
if (player->offroad > 0 || !player->outruntime)
|
if (player->offroad > 0 || player->loop.radius == 0 || player->outruntime == 0)
|
||||||
{
|
{
|
||||||
if (newMagnitude > K_GetKartSpeed(player, true, true)) //topspeed)
|
if (newMagnitude > K_GetKartSpeed(player, true, true)) //topspeed)
|
||||||
{
|
{
|
||||||
|
|
@ -2721,7 +2721,7 @@ static void P_DeathThink(player_t *player)
|
||||||
// P_MoveCamera: make sure the camera is not outside the world and looks at the player avatar
|
// P_MoveCamera: make sure the camera is not outside the world and looks at the player avatar
|
||||||
//
|
//
|
||||||
|
|
||||||
camera_t camera[MAXSPLITSCREENPLAYERS]; // Four cameras, three for splitscreen
|
camera_t camera[MAXSPLITSCREENPLAYERS] = {}; // Four cameras, three for splitscreen
|
||||||
|
|
||||||
static void CV_CamRotate_OnChange(void)
|
static void CV_CamRotate_OnChange(void)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -793,7 +793,7 @@ void R_DrawMaskedColumn(drawcolumndata_t* dc, column_t *column, column_t *bright
|
||||||
dc->texturemid = basetexturemid;
|
dc->texturemid = basetexturemid;
|
||||||
}
|
}
|
||||||
|
|
||||||
INT32 lengthcol; // column->length : for flipped column function pointers and multi-patch on 2sided wall = texture->height
|
INT32 lengthcol = 0; // column->length : for flipped column function pointers and multi-patch on 2sided wall = texture->height
|
||||||
|
|
||||||
void R_DrawFlippedMaskedColumn(drawcolumndata_t* dc, column_t *column, column_t *brightmap, INT32 baseclip)
|
void R_DrawFlippedMaskedColumn(drawcolumndata_t* dc, column_t *column, column_t *brightmap, INT32 baseclip)
|
||||||
{
|
{
|
||||||
|
|
@ -3992,7 +3992,7 @@ static void R_DrawMaskedList (drawnode_t* head)
|
||||||
void R_DrawMasked(maskcount_t* masks, INT32 nummasks)
|
void R_DrawMasked(maskcount_t* masks, INT32 nummasks)
|
||||||
{
|
{
|
||||||
ZoneScoped;
|
ZoneScoped;
|
||||||
drawnode_t *heads; /**< Drawnode lists; as many as number of views/portals. */
|
drawnode_t *heads = NULL; /**< Drawnode lists; as many as number of views/portals. */
|
||||||
INT32 i;
|
INT32 i;
|
||||||
|
|
||||||
heads = static_cast<drawnode_t*>(calloc(nummasks, sizeof(drawnode_t)));
|
heads = static_cast<drawnode_t*>(calloc(nummasks, sizeof(drawnode_t)));
|
||||||
|
|
|
||||||
|
|
@ -3619,6 +3619,9 @@ INT32 V_SubStringWidth(const char *string, INT32 length, INT32 option)
|
||||||
if ((UINT8)c & 0x80) //color parsing! -Inuyasha 2.16.09
|
if ((UINT8)c & 0x80) //color parsing! -Inuyasha 2.16.09
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (c < HU_FONTSTART)
|
||||||
|
continue; // this is not a proper character.
|
||||||
|
|
||||||
c = toupper(c) - HU_FONTSTART;
|
c = toupper(c) - HU_FONTSTART;
|
||||||
if (c < 0 || c >= HU_FONTSIZE || !fontv[HU_FONT].font[c])
|
if (c < 0 || c >= HU_FONTSIZE || !fontv[HU_FONT].font[c])
|
||||||
lw += spacewidth;
|
lw += spacewidth;
|
||||||
|
|
@ -3672,6 +3675,9 @@ INT32 V_SmallSubStringWidth(const char *string, INT32 length, INT32 option)
|
||||||
if ((UINT8)c & 0x80) //color parsing! -Inuyasha 2.16.09
|
if ((UINT8)c & 0x80) //color parsing! -Inuyasha 2.16.09
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (c < HU_FONTSTART)
|
||||||
|
continue; // this is not a proper character.
|
||||||
|
|
||||||
c = toupper(c) - HU_FONTSTART;
|
c = toupper(c) - HU_FONTSTART;
|
||||||
if (c < 0 || c >= HU_FONTSIZE || !fontv[HU_FONT].font[c])
|
if (c < 0 || c >= HU_FONTSIZE || !fontv[HU_FONT].font[c])
|
||||||
lw += spacewidth;
|
lw += spacewidth;
|
||||||
|
|
@ -3724,6 +3730,9 @@ INT32 V_ThinSubStringWidth(const char *string, INT32 length, INT32 option)
|
||||||
if ((UINT8)c & 0x80) //color parsing! -Inuyasha 2.16.09
|
if ((UINT8)c & 0x80) //color parsing! -Inuyasha 2.16.09
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (c < HU_FONTSTART)
|
||||||
|
continue; // this is not a proper character.
|
||||||
|
|
||||||
if (!lowercase || !fontv[TINY_FONT].font[c-HU_FONTSTART])
|
if (!lowercase || !fontv[TINY_FONT].font[c-HU_FONTSTART])
|
||||||
c = toupper(c);
|
c = toupper(c);
|
||||||
c -= HU_FONTSTART;
|
c -= HU_FONTSTART;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue