bugfix patch:
prevent shift+alt from triggering the menu while in demo playback. hopefully solve toggleconsole issues on german keymaps. gl_texturemode2d is now in presets, using nearest in vanilla preset. waterwarp edge textures now force linear sampling. no weird blocky edges. fix serverflags reset issue on saved games. fix $currentrender to not glitch on fbos too much. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4720 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
362d8f820f
commit
583d8aa46c
6 changed files with 44 additions and 15 deletions
|
@ -6056,14 +6056,14 @@ void CLQW_ParseServerMessage (void)
|
||||||
case svcqw_updatestatbyte:
|
case svcqw_updatestatbyte:
|
||||||
i = MSG_ReadByte ();
|
i = MSG_ReadByte ();
|
||||||
j = MSG_ReadByte ();
|
j = MSG_ReadByte ();
|
||||||
CL_SetStatInt (destsplit, i, j);
|
|
||||||
CL_SetStatFloat (destsplit, i, j);
|
CL_SetStatFloat (destsplit, i, j);
|
||||||
|
CL_SetStatInt (destsplit, i, j);
|
||||||
break;
|
break;
|
||||||
case svcqw_updatestatlong:
|
case svcqw_updatestatlong:
|
||||||
i = MSG_ReadByte ();
|
i = MSG_ReadByte ();
|
||||||
j = MSG_ReadLong (); //make qbyte if nq compatability?
|
j = MSG_ReadLong (); //make qbyte if nq compatability?
|
||||||
CL_SetStatInt (destsplit, i, j);
|
|
||||||
CL_SetStatFloat (destsplit, i, j);
|
CL_SetStatFloat (destsplit, i, j);
|
||||||
|
CL_SetStatInt (destsplit, i, j);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case svcfte_updatestatstring:
|
case svcfte_updatestatstring:
|
||||||
|
|
|
@ -2076,10 +2076,26 @@ void Key_Event (int devid, int key, unsigned int unicode, qboolean down)
|
||||||
//
|
//
|
||||||
// during demo playback, most keys bring up the main menu
|
// during demo playback, most keys bring up the main menu
|
||||||
//
|
//
|
||||||
if (cls.demoplayback && cls.demoplayback != DPB_MVD && cls.demoplayback != DPB_EZTV && down && conkey && key != K_TAB && !Key_Dest_Has(~kdm_game))
|
if (cls.demoplayback && cls.demoplayback != DPB_MVD && cls.demoplayback != DPB_EZTV && down && conkey && !Key_Dest_Has(~kdm_game))
|
||||||
{
|
{
|
||||||
M_ToggleMenu_f ();
|
switch (key)
|
||||||
return;
|
{ //these keys don't force the menu to appear while playing the demo reel
|
||||||
|
case K_LSHIFT:
|
||||||
|
case K_RSHIFT:
|
||||||
|
case K_LALT:
|
||||||
|
case K_RALT:
|
||||||
|
case K_LCTRL:
|
||||||
|
// case K_RCTRL:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
dc = keybindings[key][modifierstate];
|
||||||
|
//toggleconsole or +showFOO keys should do their regular bind action
|
||||||
|
if (!dc || (strcmp(dc, "toggleconsole") && strncmp(dc, "+show", 5)))
|
||||||
|
{
|
||||||
|
M_ToggleMenu_f ();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -545,6 +545,7 @@ const char *presetexec[] =
|
||||||
// 286 options (also the first commands to be execed in the chain)
|
// 286 options (also the first commands to be execed in the chain)
|
||||||
"seta m_preset_chosen 1;"
|
"seta m_preset_chosen 1;"
|
||||||
"seta gl_texturemode nn;"
|
"seta gl_texturemode nn;"
|
||||||
|
"seta gl_texturemode2d n;"
|
||||||
"seta gl_blendsprites 0;"
|
"seta gl_blendsprites 0;"
|
||||||
"seta r_particlesystem null;"
|
"seta r_particlesystem null;"
|
||||||
"seta r_particledesc \"\";"
|
"seta r_particledesc \"\";"
|
||||||
|
@ -584,6 +585,7 @@ const char *presetexec[] =
|
||||||
|
|
||||||
, // fast options
|
, // fast options
|
||||||
"gl_texturemode ln;"
|
"gl_texturemode ln;"
|
||||||
|
"gl_texturemode2d n;"
|
||||||
"r_particlesystem classic;"
|
"r_particlesystem classic;"
|
||||||
"r_particledesc classic;"
|
"r_particledesc classic;"
|
||||||
"r_drawflat 0;"
|
"r_drawflat 0;"
|
||||||
|
@ -607,7 +609,9 @@ const char *presetexec[] =
|
||||||
"cl_rollangle 2.0;"
|
"cl_rollangle 2.0;"
|
||||||
"cl_bob 0.02;"
|
"cl_bob 0.02;"
|
||||||
//these things are perhaps a little extreme
|
//these things are perhaps a little extreme
|
||||||
|
"r_loadlit 0;"
|
||||||
"gl_texturemode nn;" //yup, we went there.
|
"gl_texturemode nn;" //yup, we went there.
|
||||||
|
"gl_texturemode2d n;" //yeah, 2d too.
|
||||||
"r_part_classic_square 1;" //blocky baby!
|
"r_part_classic_square 1;" //blocky baby!
|
||||||
"cl_sbar 1;" //its a style thing
|
"cl_sbar 1;" //its a style thing
|
||||||
"sv_nqplayerphysics 1;" //gb wanted this
|
"sv_nqplayerphysics 1;" //gb wanted this
|
||||||
|
@ -627,9 +631,11 @@ const char *presetexec[] =
|
||||||
"r_coronas 1;"
|
"r_coronas 1;"
|
||||||
"r_lerpmuzzlehack 1;"
|
"r_lerpmuzzlehack 1;"
|
||||||
"gl_texturemode ln;"
|
"gl_texturemode ln;"
|
||||||
|
"gl_texturemode2d l;"
|
||||||
"cl_sbar 0;"
|
"cl_sbar 0;"
|
||||||
"sv_nqplayerphysics 0;"
|
"sv_nqplayerphysics 0;"
|
||||||
"cl_demoreel 0;"
|
"cl_demoreel 0;"
|
||||||
|
"r_loadlit 1;"
|
||||||
|
|
||||||
, // nice options
|
, // nice options
|
||||||
"r_stains 0.75;"
|
"r_stains 0.75;"
|
||||||
|
|
|
@ -1002,23 +1002,25 @@ int GLBE_SetupForShadowMap(texid_t shadowmaptex, int texwidth, int texheight, fl
|
||||||
static void T_Gen_CurrentRender(int tmu)
|
static void T_Gen_CurrentRender(int tmu)
|
||||||
{
|
{
|
||||||
int vwidth, vheight;
|
int vwidth, vheight;
|
||||||
|
int pwidth = vid.fbpwidth;
|
||||||
|
int pheight = vid.fbpheight;
|
||||||
if (r_refdef.recurse)
|
if (r_refdef.recurse)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (r_config.texture_non_power_of_two)
|
if (r_config.texture_non_power_of_two)
|
||||||
{
|
{
|
||||||
vwidth = vid.pixelwidth;
|
vwidth = pwidth;
|
||||||
vheight = vid.pixelheight;
|
vheight = pheight;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vwidth = 1;
|
vwidth = 1;
|
||||||
vheight = 1;
|
vheight = 1;
|
||||||
while (vwidth < vid.pixelwidth)
|
while (vwidth < pwidth)
|
||||||
{
|
{
|
||||||
vwidth *= 2;
|
vwidth *= 2;
|
||||||
}
|
}
|
||||||
while (vheight < vid.pixelheight)
|
while (vheight < pheight)
|
||||||
{
|
{
|
||||||
vheight *= 2;
|
vheight *= 2;
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,8 +159,8 @@ void GL_SetupSceneProcessingTextures (void)
|
||||||
if (!gl_config.arb_shader_objects)
|
if (!gl_config.arb_shader_objects)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
TEXASSIGN(scenepp_texture_warp, GL_AllocNewTexture("***postprocess_warp***", PP_WARP_TEX_SIZE, PP_WARP_TEX_SIZE, IF_NOMIPMAP|IF_NOGAMMA));
|
TEXASSIGN(scenepp_texture_warp, GL_AllocNewTexture("***postprocess_warp***", PP_WARP_TEX_SIZE, PP_WARP_TEX_SIZE, IF_NOMIPMAP|IF_NOGAMMA|IF_LINEAR));
|
||||||
TEXASSIGN(scenepp_texture_edge, GL_AllocNewTexture("***postprocess_edge***", PP_WARP_TEX_SIZE, PP_WARP_TEX_SIZE, IF_NOMIPMAP|IF_NOGAMMA));
|
TEXASSIGN(scenepp_texture_edge, GL_AllocNewTexture("***postprocess_edge***", PP_WARP_TEX_SIZE, PP_WARP_TEX_SIZE, IF_NOMIPMAP|IF_NOGAMMA|IF_LINEAR));
|
||||||
|
|
||||||
// init warp texture - this specifies offset in
|
// init warp texture - this specifies offset in
|
||||||
for (y=0; y<PP_WARP_TEX_SIZE; y++)
|
for (y=0; y<PP_WARP_TEX_SIZE; y++)
|
||||||
|
|
|
@ -717,7 +717,6 @@ qboolean SV_LoadLevelCache(char *savename, char *level, char *startspot, qboolea
|
||||||
|
|
||||||
PR_LoadGlabalStruct();
|
PR_LoadGlabalStruct();
|
||||||
|
|
||||||
pr_global_struct->serverflags = svs.serverflags;
|
|
||||||
pr_global_struct->time = sv.time = sv.world.physicstime = time;
|
pr_global_struct->time = sv.time = sv.world.physicstime = time;
|
||||||
sv.starttime = Sys_DoubleTime() - sv.time;
|
sv.starttime = Sys_DoubleTime() - sv.time;
|
||||||
|
|
||||||
|
@ -1094,6 +1093,8 @@ void SV_Savegame (char *savename)
|
||||||
|
|
||||||
VFS_PRINTF (f, "%s\n", sv.name);
|
VFS_PRINTF (f, "%s\n", sv.name);
|
||||||
|
|
||||||
|
VFS_PRINTF (f, "%g\n", (float)svs.serverflags);
|
||||||
|
|
||||||
VFS_CLOSE(f);
|
VFS_CLOSE(f);
|
||||||
|
|
||||||
#ifdef Q2SERVER
|
#ifdef Q2SERVER
|
||||||
|
@ -1225,9 +1226,9 @@ void SV_Loadgame_f (void)
|
||||||
for (trim = str+strlen(str)-1; trim>=str && *trim <= ' '; trim--)
|
for (trim = str+strlen(str)-1; trim>=str && *trim <= ' '; trim--)
|
||||||
*trim='\0';
|
*trim='\0';
|
||||||
for (trim = str; *trim <= ' ' && *trim; trim++)
|
for (trim = str; *trim <= ' ' && *trim; trim++)
|
||||||
|
;
|
||||||
if (*str == '(')
|
if (*trim == '(')
|
||||||
cl->spawn_parms[len] = atof(str);
|
cl->spawn_parms[len] = atof(trim+1);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
version = atoi(str);
|
version = atoi(str);
|
||||||
|
@ -1320,6 +1321,10 @@ void SV_Loadgame_f (void)
|
||||||
for (trim = str; *trim <= ' ' && *trim; trim++)
|
for (trim = str; *trim <= ' ' && *trim; trim++)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
//serverflags is reset on restart, so we need to read the value as it was at the start of the current map.
|
||||||
|
VFS_GETS(f, filename, sizeof(filename)-1);
|
||||||
|
svs.serverflags = atof(filename);
|
||||||
|
|
||||||
VFS_CLOSE(f);
|
VFS_CLOSE(f);
|
||||||
|
|
||||||
#ifdef Q2SERVER
|
#ifdef Q2SERVER
|
||||||
|
|
Loading…
Reference in a new issue