centerprints with links now show cursors.

q2 temp entity tweaks. still more work to be done.
support sRGB (mostly)properly in gl+vk+d3d9+d3d11.
vulkan tweaks - multisample works under certain conditions. additional other changes to comply... cvars to enable some other device extensions.
removed r_viewleaf. now using clusters for q1 too.
improved compat with quakespasm's sky command.
Added vid_winthread cvar, to handle window messages on a separate thread. When set this allows the game to keep redrawing when the user is resizing the window etc.
Finally added renderers option to menusys.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5130 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2017-07-28 01:49:25 +00:00
parent d66db9930d
commit db2c378fa0
67 changed files with 6083 additions and 2281 deletions

View file

@ -11536,7 +11536,7 @@ void PR_DumpPlatform_f(void)
{"CSQC_Input_Frame", "__used void()", CS, "Called just before each time clientcommandframe is updated. You can edit the input_* globals in order to apply your own player inputs within csqc, which may allow you a convienient way to pass certain info to ssqc."},
{"CSQC_RendererRestarted", "void(string rendererdescription)", CS, "Called by the engine after the video was restarted. This serves to notify the CSQC that any render targets that it may have cached were purged, and will need to be regenerated."},
{"CSQC_ConsoleCommand", "float(string cmd)", CS, "Called if the user uses any console command registed via registercommand."},
{"CSQC_ConsoleLink", "float(string text, string info)", CS, "Called if the user clicks a ^[text\\infokey\\infovalue^] link. Use infoget to read/check each supported key. Return true if you wish the engine to not attempt to handle the link itself."},
{"CSQC_ConsoleLink", "float(string text, string info)", CS, "Called if the user clicks a ^[text\\infokey\\infovalue^] link. Use infoget to read/check each supported key. Return true if you wish the engine to not attempt to handle the link itself.\nWARNING: link text can potentially come from other players, so be careful about what you allow to be changed."},
{"CSQC_Ent_Update", "void(float isnew)", CS},
{"CSQC_Ent_Remove", "void()", CS},
{"CSQC_Event_Sound", "float(float entnum, float channel, string soundname, float vol, float attenuation, vector pos, float pitchmod, float flags"/*", float timeofs*/")", CS},

View file

@ -1343,31 +1343,42 @@ void SV_AutoSave(void)
return;
if (sv.state != ss_active)
return;
//don't bother to autosave multiplayer games.
//this may be problematic with splitscreen, but coop rules tend to apply there anyway.
if (sv.allocated_client_slots != 1)
switch(svs.gametype)
{
default: //probably broken. don't ever try.
return;
for (i = 0; i < sv.allocated_client_slots; i++)
{
if (svs.clients[i].state == cs_spawned)
#ifdef VM_LUA
case GT_LUA:
#endif
case GT_Q1QVM:
case GT_PROGS:
//don't bother to autosave multiplayer games.
//this may be problematic with splitscreen, but coop rules tend to apply there anyway.
if (sv.allocated_client_slots != 1)
return;
for (i = 0; i < sv.allocated_client_slots; i++)
{
if (svs.clients[i].edict->v->health <= 0)
return; //autosaves with a dead player are just cruel.
if (svs.clients[i].state == cs_spawned)
{
if (svs.clients[i].edict->v->health <= 0)
return; //autosaves with a dead player are just cruel.
if ((int)svs.clients[i].edict->v->flags & (FL_GODMODE | FL_NOTARGET))
return; //autosaves to highlight cheaters is also just spiteful.
if ((int)svs.clients[i].edict->v->flags & (FL_GODMODE | FL_NOTARGET))
return; //autosaves to highlight cheaters is also just spiteful.
if (svs.clients[i].edict->v->movetype != MOVETYPE_WALK)
return; //noclip|fly are cheaters, toss|bounce are bad at playing. etc.
if (svs.clients[i].edict->v->movetype != MOVETYPE_WALK)
return; //noclip|fly are cheaters, toss|bounce are bad at playing. etc.
if (!((int)svs.clients[i].edict->v->flags & FL_ONGROUND))
return; //autosaves while people are jumping are awkward.
if (!((int)svs.clients[i].edict->v->flags & FL_ONGROUND))
return; //autosaves while people are jumping are awkward.
if (svs.clients[i].edict->v->velocity[0] || svs.clients[i].edict->v->velocity[1] || svs.clients[i].edict->v->velocity[2])
return; //people running around are likely to result in poor saves
if (svs.clients[i].edict->v->velocity[0] || svs.clients[i].edict->v->velocity[1] || svs.clients[i].edict->v->velocity[2])
return; //people running around are likely to result in poor saves
}
}
break;
}
autosavename = M_ChooseAutoSave();

View file

@ -303,10 +303,10 @@ static qboolean SV_AddCSQCUpdate (client_t *client, edict_t *ent)
#ifndef PEXT_CSQC
return false;
#else
if (!(client->csqcactive))
if (!ent->xv->SendEntity)
return false;
if (!ent->xv->SendEntity)
if (!(client->csqcactive))
return false;
csqcent[csqcnuments++] = ent;
@ -3682,8 +3682,11 @@ void SV_Snapshot_BuildQ1(client_t *client, packet_entities_t *pack, pvscamera_t
}
else
{
// ignore ents without visible models
if (!ent->xv->SendEntity && (!ent->v->modelindex || !*PR_GetString(svprogfuncs, ent->v->model)) && !((int)ent->xv->pflags & PFLAGS_FULLDYNAMIC) && ent->v->skin >= 0)
// many ents are not intended to be networked.
if (!(ent->xv->SendEntity && client->csqcactive) && //if SendEntity is set then its definitely important, even if not visible.
(!ent->v->modelindex || !*PR_GetString(svprogfuncs, ent->v->model)) && // also definitely valid if it has a model
!((int)ent->xv->pflags & PFLAGS_FULLDYNAMIC) && //needs to be networked if its giving off realtime lights, even when it has no model.
ent->v->skin >= 0) //ents with negative skins are networked too. eg ladder volumes.
continue;
if (cameras) //self doesn't get a pvs test, to cover teleporters

View file

@ -75,19 +75,19 @@ cvar_t pm_walljump = CVARF("pm_walljump", "", CVAR_SERVERINFO);
#define cvargroup_serverphysics "server physics variables"
void WPhys_Init(void)
{
Cvar_Register (&sv_maxvelocity, cvargroup_serverphysics);
Cvar_Register (&sv_gravity, cvargroup_serverphysics);
Cvar_Register (&sv_stopspeed, cvargroup_serverphysics);
Cvar_Register (&sv_maxspeed, cvargroup_serverphysics);
Cvar_Register (&sv_spectatormaxspeed, cvargroup_serverphysics);
Cvar_Register (&sv_accelerate, cvargroup_serverphysics);
Cvar_Register (&sv_airaccelerate, cvargroup_serverphysics);
Cvar_Register (&sv_wateraccelerate, cvargroup_serverphysics);
Cvar_Register (&sv_friction, cvargroup_serverphysics);
Cvar_Register (&sv_waterfriction, cvargroup_serverphysics);
Cvar_Register (&sv_sound_watersplash, cvargroup_serverphysics);
Cvar_Register (&sv_sound_land, cvargroup_serverphysics);
Cvar_Register (&sv_stepheight, cvargroup_serverphysics);
Cvar_Register (&sv_maxvelocity, cvargroup_serverphysics);
Cvar_Register (&sv_gravity, cvargroup_serverphysics);
Cvar_Register (&sv_stopspeed, cvargroup_serverphysics);
Cvar_Register (&sv_maxspeed, cvargroup_serverphysics);
Cvar_Register (&sv_spectatormaxspeed, cvargroup_serverphysics);
Cvar_Register (&sv_accelerate, cvargroup_serverphysics);
Cvar_Register (&sv_airaccelerate, cvargroup_serverphysics);
Cvar_Register (&sv_wateraccelerate, cvargroup_serverphysics);
Cvar_Register (&sv_friction, cvargroup_serverphysics);
Cvar_Register (&sv_waterfriction, cvargroup_serverphysics);
Cvar_Register (&sv_sound_watersplash, cvargroup_serverphysics);
Cvar_Register (&sv_sound_land, cvargroup_serverphysics);
Cvar_Register (&sv_stepheight, cvargroup_serverphysics);
Cvar_Register (&sv_gameplayfix_noairborncorpse, cvargroup_serverphysics);
Cvar_Register (&sv_gameplayfix_multiplethinks, cvargroup_serverphysics);
@ -1365,7 +1365,7 @@ static void WPhys_Physics_Toss (world_t *w, wedict_t *ent)
#pragma warningmsg("The following line might help boost framerates a lot in rmq, not sure if they violate expected behaviour in other mods though - check that they're safe.")
VectorNegate(gravitydir, trace.plane.normal);
}
if (trace.fraction == 1)
if (trace.fraction == 1 || !trace.ent)
return;
if (ED_ISFREE(ent))
return;

View file

@ -691,6 +691,9 @@ static cvar_t *VARGS Q2Cvar_Get (const char *var_name, const char *value, int fl
//q2 gamecode knows about these flags. anything else is probably a bug, or 3rd-party extension.
flags &= (CVAR_NOSET|CVAR_SERVERINFO|CVAR_USERINFO|CVAR_ARCHIVE|CVAR_LATCH);
if (!strcmp(var_name, "gamedir"))
var_name = "fs_gamedir";
var = Cvar_Get(var_name, value, flags, "Quake2 game variables");
if (!var)
{

View file

@ -2906,7 +2906,6 @@ void SVQ3_ParseUsercmd(client_t *client, qboolean delta)
// read delta sequenced usercmds
from = &nullcmd;
from->servertime = client->lastcmd.servertime;
for(i=0, to=commands; i<cmdCount; i++, to++)
{
MSG_Q3_ReadDeltaUsercmd(key, from, to);
@ -2963,11 +2962,13 @@ void SVQ3_ParseUsercmd(client_t *client, qboolean delta)
temp.sidemove *= client->maxspeed/127.0f;
temp.forwardmove *= client->maxspeed/127.0f;
temp.upmove *= client->maxspeed/127.0f;
temp.msec = bound(0, to->servertime - temp.servertime, 255);
temp.buttons &= ~2;
if (temp.buttons & 64)
temp.buttons |= 2;
SV_RunCmd(&temp, false);
client->lastcmd.servertime = to->servertime;
}
}
if (svs.gametype != GT_QUAKE3)

View file

@ -559,7 +559,9 @@ void QDECL World_LinkEdict (world_t *w, wedict_t *ent, qboolean touch_triggers)
VectorAdd (ent->v->origin, ent->v->maxs, ent->v->absmax);
}
if (ent->v->modelindex)
if (!ent->v->solid)
ent->solidsize = ES_SOLID_BSP;
else// if (1)///*ent->v->modelindex || */ent->v->model)
{
model_t *mod = w->Get_CModel(w, ent->v->modelindex);
if (mod && mod->type == mod_brush)
@ -567,8 +569,6 @@ void QDECL World_LinkEdict (world_t *w, wedict_t *ent, qboolean touch_triggers)
else
ent->solidsize = COM_EncodeSize(ent->v->mins, ent->v->maxs);
}
else
ent->solidsize = ES_SOLID_BSP;
//
// to make items easier to pick up and allow them to be grabbed off
@ -1167,7 +1167,7 @@ static trace_t World_ClipMoveToEntity (world_t *w, wedict_t *ent, vec3_t eorg, v
}
// did we clip the move?
if (trace.fraction < 1 || trace.startsolid)
if (trace.fraction < 1 || trace.startsolid || trace.allsolid)
trace.ent = ent;
return trace;