Added pm_watersinkspeed cvar.
Misc bugfixes, mostly hexen2-related. tibet5 bug is finally fixed. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4635 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
8f7931b860
commit
2e98386da2
22 changed files with 155 additions and 52 deletions
|
@ -715,7 +715,7 @@ void NPP_NQFlush(void)
|
|||
// bufferlen = 0;
|
||||
// break;
|
||||
case svc_setview:
|
||||
// requireextension = PEXT_SETVIEW;
|
||||
requireextension = PEXT_SETVIEW;
|
||||
|
||||
if (cldest) //catch it to work with all clients
|
||||
{
|
||||
|
@ -724,7 +724,7 @@ void NPP_NQFlush(void)
|
|||
if (cldest->viewent == (cldest - svs.clients)+1)
|
||||
cldest->viewent = 0; //self is the same as none
|
||||
}
|
||||
bufferlen = 0;
|
||||
// bufferlen = 0;
|
||||
break;
|
||||
case svcdp_hidelmp:
|
||||
requireextension = PEXT_SHOWPIC;
|
||||
|
|
|
@ -2677,14 +2677,18 @@ particle(origin, color, count)
|
|||
static void QCBUILTIN PF_particle (pubprogfuncs_t *prinst, globalvars_t *pr_globals) //I said it was for compatability only.
|
||||
{
|
||||
float *org, *dir;
|
||||
float color;
|
||||
float count;
|
||||
int color;
|
||||
int count;
|
||||
int i, v;
|
||||
|
||||
org = G_VECTOR(OFS_PARM0);
|
||||
dir = G_VECTOR(OFS_PARM1);
|
||||
color = G_FLOAT(OFS_PARM2);
|
||||
count = G_FLOAT(OFS_PARM3);
|
||||
|
||||
count = bound(0, count, 255);
|
||||
color &= 0xff;
|
||||
|
||||
#ifdef NQPROT
|
||||
MSG_WriteByte (&sv.nqmulticast, svc_particle);
|
||||
MSG_WriteCoord (&sv.nqmulticast, org[0]);
|
||||
|
@ -2701,6 +2705,7 @@ static void QCBUILTIN PF_particle (pubprogfuncs_t *prinst, globalvars_t *pr_glob
|
|||
}
|
||||
MSG_WriteByte (&sv.nqmulticast, count);
|
||||
MSG_WriteByte (&sv.nqmulticast, color);
|
||||
SV_MulticastProtExt(org, MULTICAST_PVS, pr_global_struct->dimension_send, 0, 0);
|
||||
#endif
|
||||
//for qw users (and not fte)
|
||||
/* if (*prinst->callargc >= 5)
|
||||
|
@ -2904,6 +2909,7 @@ static void QCBUILTIN PF_particle4 (pubprogfuncs_t *prinst, globalvars_t *pr_glo
|
|||
|
||||
static void QCBUILTIN PF_h2particleexplosion(pubprogfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
{
|
||||
//used by the ice staff
|
||||
Con_Printf("H2FIXME: PF_h2particleexplosion not implemented\n");
|
||||
/*
|
||||
float *org;
|
||||
|
@ -9365,7 +9371,7 @@ BuiltinList_t BuiltinList[] = { //nq qw h2 ebfs
|
|||
|
||||
{"isdemo", PF_Fixme, 0, 0, 0, 349, D("float()", "Returns if the client is currently playing a demo or not")},// (EXT_CSQC)
|
||||
{"isserver", PF_Fixme, 0, 0, 0, 350, D("float()", "Returns if the client is acting as the server (aka: listen server)")},//(EXT_CSQC)
|
||||
{"SetListener", PF_Fixme, 0, 0, 0, 351, D("void(vector origin, vector forward, vector right, vector up, float inwater)", "Sets the position of the view, as far as the audio subsystem is concerned. This should be called once per CSQC_UpdateView as it will otherwise revert to default.")},// (EXT_CSQC)
|
||||
{"SetListener", PF_Fixme, 0, 0, 0, 351, D("void(vector origin, vector forward, vector right, vector up, optional float inwater)", "Sets the position of the view, as far as the audio subsystem is concerned. This should be called once per CSQC_UpdateView as it will otherwise revert to default.")},// (EXT_CSQC)
|
||||
{"registercommand", PF_Fixme, 0, 0, 0, 352, D("void(string cmdname)", "Register the given console command, for easy console use.\nConsole commands that are later used will invoke CSQC_ConsoleCommand.")},//(EXT_CSQC)
|
||||
{"wasfreed", PF_WasFreed,0, 0, 0, 353, D("float(entity ent)", "Quickly check to see if the entity is currently free. This function is only valid during the two-second non-reuse window, after that it may give bad results. Try one second to make it more robust.")},//(EXT_CSQC) (should be availabe on server too)
|
||||
{"serverkey", PF_Fixme, 0, 0, 0, 354, D("string(string key)", "Look up a key in the server's public serverinfo string")},//
|
||||
|
@ -10193,7 +10199,7 @@ void PR_DumpPlatform_f(void)
|
|||
{"SpectatorDisconnect", "noref void()", QW|NQ, "Called when a spectator disconnects from the game."},
|
||||
{"SpectatorThink", "noref void()", QW|NQ, "Called each frame for each spectator."},
|
||||
{"SV_ParseClientCommand", "noref void(string cmd)", QW|NQ, "Provides QC with a way to intercept 'cmd foo' commands from the client. Very handy. Self will be set to the sending client, while the 'cmd' argument can be tokenize()d and each element retrieved via argv(argno). Unrecognised cmds MUST be passed on to the clientcommand builtin."},
|
||||
{"SV_ParseConnectionlessPacket", "noref void(string sender, string body)", QW|NQ, "Provides QC with a way to communicate between servers, or with client server browsers. Sender is the sender's ip. Body is the body of the message. You'll need to add your own password/etc support as required. Self is not valid."},
|
||||
{"SV_ParseConnectionlessPacket", "noref float(string sender, string body)", QW|NQ, "Provides QC with a way to communicate between servers, or with client server browsers. Sender is the sender's ip. Body is the body of the message. You'll need to add your own password/etc support as required. Self is not valid."},
|
||||
{"SV_PausedTic", "noref void(float pauseduration)", QW|NQ, "For each frame that the server is paused, this function will be called to give the gamecode a chance to unpause the server again. the pauseduration argument says how long the server has been paused for (the time global is frozen and will not increment while paused). Self is not valid."},
|
||||
{"SV_ShouldPause", "noref float(float newstatus)", QW|NQ, "Called to give the qc a change to block pause/unpause requests. Return false for the pause request to be ignored. newstatus is 1 if the user is trying to pause the game. For the duration of the call, self will be set to the player who tried to pause, or to world if it was triggered by a server-side event."},
|
||||
{"ClassChangeWeapon", "noref void()", H2, "Hexen2 support. Called when cl_playerclass changes. Self is set to the player who is changing class."},
|
||||
|
@ -10224,7 +10230,7 @@ void PR_DumpPlatform_f(void)
|
|||
{"CSQC_ConsoleLink", "noref 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_Ent_Update", "noref void(float isnew)", CS},
|
||||
{"CSQC_Ent_Remove", "noref void()", CS},
|
||||
{"CSQC_Event_Sound", "noref float(float entnum, float channel, float soundname, float vol, float attenuation, vector pos, float pitchmod)", CS},
|
||||
{"CSQC_Event_Sound", "noref float(float entnum, float channel, string soundname, float vol, float attenuation, vector pos, float pitchmod)", CS},
|
||||
// {"CSQC_ServerSound", "//void()", CS},
|
||||
{"CSQC_LoadResource", "noref float(string resname, string restype)", CS, "Called each time some resource is being loaded. CSQC can invoke various draw calls to provide a loading screen, until WorldLoaded is called."},
|
||||
{"CSQC_Parse_TempEntity", "noref float()", CS, "Please don't use this. Use CSQC_Parse_Event and multicasts instead."},
|
||||
|
|
|
@ -206,7 +206,7 @@ and the extension fields are added on the end and can have extra vm-specific stu
|
|||
comfieldvector(colormod,NULL)\
|
||||
comfieldvector(glowmod,NULL)\
|
||||
comfieldvector(gravitydir,"Specifies the direction in which gravity acts. Must be normalised. '0 0 0' also means down. Use '0 0 1' if you want the player to be able to run on ceilings.")\
|
||||
comfieldfunction(camera_transform,".vector(vector org, vector ang)", NULL)\
|
||||
comfieldfunction(camera_transform,".vector(vector org, vector ang)", "Provides portal transform information for portal surfaces attached to this entity. Also used to open up pvs in ssqc.")\
|
||||
comfieldfloat(pmove_flags,NULL)/*EXT_CSQC_1*/\
|
||||
comfieldfloat(geomtype,NULL)/*DP_...PHYSICS*/\
|
||||
comfieldfloat(friction,NULL)/*DP_...PHYSICS*/\
|
||||
|
|
|
@ -891,7 +891,7 @@ void SV_SaveLevelCache(char *savedir, qboolean dontharmgame)
|
|||
}
|
||||
#endif
|
||||
|
||||
f = FS_OpenVFS (name, "wb", FS_GAME);
|
||||
f = FS_OpenVFS (name, "wb", FS_GAMEONLY);
|
||||
if (!f)
|
||||
{
|
||||
Con_TPrintf ("ERROR: couldn't open %s.\n", name);
|
||||
|
|
|
@ -5115,6 +5115,7 @@ void SV_InitLocal (void)
|
|||
extern cvar_t pm_airstep;
|
||||
extern cvar_t pm_walljump;
|
||||
extern cvar_t pm_slidyslopes;
|
||||
extern cvar_t pm_watersinkspeed;
|
||||
|
||||
SV_InitOperatorCommands ();
|
||||
SV_UserInit ();
|
||||
|
@ -5167,6 +5168,7 @@ void SV_InitLocal (void)
|
|||
Cvar_Register (&sv_bigcoords, cvargroup_serverphysics);
|
||||
|
||||
Cvar_Register (&pm_bunnyspeedcap, cvargroup_serverphysics);
|
||||
Cvar_Register (&pm_watersinkspeed, cvargroup_serverphysics);
|
||||
Cvar_Register (&pm_ktjump, cvargroup_serverphysics);
|
||||
Cvar_Register (&pm_slidefix, cvargroup_serverphysics);
|
||||
Cvar_Register (&pm_slidyslopes, cvargroup_serverphysics);
|
||||
|
|
|
@ -62,6 +62,7 @@ cvar_t sv_stepheight = CVARAFD("pm_stepheight", "", "sv_stepheight", CVAR_SERV
|
|||
|
||||
cvar_t pm_ktjump = CVARF("pm_ktjump", "", CVAR_SERVERINFO);
|
||||
cvar_t pm_bunnyspeedcap = CVARFD("pm_bunnyspeedcap", "", CVAR_SERVERINFO, "0 or 1, ish. If the player is traveling faster than this speed while turning, their velocity will be gracefully reduced to match their current maxspeed. You can still rocket-jump to gain high velocity, but turning will reduce your speed back to the max. This can be used to disable bunny hopping.");
|
||||
cvar_t pm_watersinkspeed = CVARFD("pm_watersinkspeed", "", CVAR_SERVERINFO, "This is the speed tht players will sink at while inactive in water. Empty means 60.");
|
||||
cvar_t pm_slidefix = CVARF("pm_slidefix", "", CVAR_SERVERINFO);
|
||||
cvar_t pm_slidyslopes = CVARF("pm_slidyslopes", "", CVAR_SERVERINFO);
|
||||
cvar_t pm_airstep = CVARF("pm_airstep", "", CVAR_SERVERINFO);
|
||||
|
@ -707,7 +708,8 @@ static qboolean WPhys_PushAngles (world_t *w, wedict_t *pusher, vec3_t move, vec
|
|||
VectorSubtract (org2, org, move2);
|
||||
VectorAdd (check->v->origin, move2, check->v->origin);
|
||||
|
||||
check->v->flags = (int)check->v->flags & ~FL_ONGROUND;
|
||||
if (check->v->movetype != MOVETYPE_WALK)
|
||||
check->v->flags = (int)check->v->flags & ~FL_ONGROUND;
|
||||
|
||||
// may have pushed them off an edge
|
||||
if (PROG_TO_WEDICT(w->progs, check->v->groundentity) != pusher)
|
||||
|
@ -726,13 +728,34 @@ static qboolean WPhys_PushAngles (world_t *w, wedict_t *pusher, vec3_t move, vec
|
|||
// if it is ok to leave in the old position, do it
|
||||
// this is only relevent for riding entities, not pushed
|
||||
// FIXME: this doesn't acount for rotation
|
||||
VectorSubtract (check->v->origin, move, check->v->origin);
|
||||
VectorCopy (pushed_p->origin, check->v->origin);
|
||||
block = World_TestEntityPosition (w, check);
|
||||
if (!block)
|
||||
{
|
||||
pushed_p--;
|
||||
continue;
|
||||
}
|
||||
|
||||
//okay, that didn't work, try pushing the against stuff
|
||||
WPhys_PushEntity(w, check, move, 0);
|
||||
block = World_TestEntityPosition (w, check);
|
||||
if (!block)
|
||||
continue;
|
||||
|
||||
VectorCopy(check->v->origin, move);
|
||||
for (i = 0; i < 8 && block; i++)
|
||||
{
|
||||
//precision errors can strike when you least expect it. lets try and reduce them.
|
||||
check->v->origin[0] = check->v->origin[0] + ((i&1)?-1:1)/8.0;
|
||||
check->v->origin[1] = check->v->origin[1] + ((i&2)?-1:1)/8.0;
|
||||
check->v->origin[2] = check->v->origin[2] + ((i&4)?-1:1)/8.0;
|
||||
block = World_TestEntityPosition (w, check);
|
||||
}
|
||||
if (!block)
|
||||
{
|
||||
World_LinkEdict (w, check, false);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// if it is sitting on top. Do not block.
|
||||
|
@ -743,7 +766,7 @@ static qboolean WPhys_PushAngles (world_t *w, wedict_t *pusher, vec3_t move, vec
|
|||
}
|
||||
|
||||
//these pushes are contents brushes, and are not solid. water cannot crush. the player just enters the water.
|
||||
//but, the player will be moved along with the water.
|
||||
//but, the player will be moved along with the water if possible.
|
||||
if (pusher->v->skin < 0)
|
||||
continue;
|
||||
|
||||
|
@ -2449,9 +2472,7 @@ void SV_SetMoveVars(void)
|
|||
movevars.friction = sv_friction.value;
|
||||
movevars.waterfriction = sv_waterfriction.value;
|
||||
movevars.entgravity = 1.0;
|
||||
if (*sv_stepheight.string)
|
||||
movevars.stepheight = sv_stepheight.value;
|
||||
else
|
||||
movevars.stepheight = PM_DEFAULTSTEPHEIGHT;
|
||||
movevars.stepheight = *sv_stepheight.string?sv_stepheight.value:PM_DEFAULTSTEPHEIGHT;
|
||||
movevars.watersinkspeed = *pm_watersinkspeed.string?pm_watersinkspeed.value:60;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1197,7 +1197,7 @@ void SV_WriteEntityDataToMessage (client_t *client, sizebuf_t *msg, int pnum)
|
|||
MSG_WriteByte(msg, svcfte_choosesplitclient);
|
||||
MSG_WriteByte(msg, pnum);
|
||||
}
|
||||
if (!client->lockangles && (client->fteprotocolextensions2 & PEXT2_SETANGLEDELTA) && client->delta_sequence != -1)
|
||||
if (!client->lockangles && (client->fteprotocolextensions2 & PEXT2_SETANGLEDELTA) && client->delta_sequence != -1 && !client->viewent)
|
||||
{
|
||||
MSG_WriteByte (msg, svcfte_setangledelta);
|
||||
for (i=0 ; i < 3 ; i++)
|
||||
|
|
|
@ -89,6 +89,7 @@ extern cvar_t pm_slidefix;
|
|||
extern cvar_t pm_slidyslopes;
|
||||
extern cvar_t pm_airstep;
|
||||
extern cvar_t pm_walljump;
|
||||
extern cvar_t pm_watersinkspeed;
|
||||
cvar_t sv_pushplayers = SCVAR("sv_pushplayers", "0");
|
||||
|
||||
//yes, realip cvars need to be fully initialised or realip will be disabled
|
||||
|
@ -5755,6 +5756,7 @@ void SV_RunCmd (usercmd_t *ucmd, qboolean recurse)
|
|||
movevars.airstep = (pm_airstep.value != 0);
|
||||
movevars.walljump = (pm_walljump.value);
|
||||
movevars.slidyslopes = (pm_slidyslopes.value!=0);
|
||||
movevars.watersinkspeed = *pm_watersinkspeed.string?pm_watersinkspeed.value:60;
|
||||
|
||||
for (i=0 ; i<3 ; i++)
|
||||
{
|
||||
|
@ -5946,6 +5948,7 @@ void SV_RunCmd (usercmd_t *ucmd, qboolean recurse)
|
|||
movevars.airstep = (pm_airstep.value != 0);
|
||||
movevars.walljump = (pm_walljump.value);
|
||||
movevars.slidyslopes = (pm_slidyslopes.value!=0);
|
||||
movevars.watersinkspeed = *pm_watersinkspeed.string?pm_watersinkspeed.value:60;
|
||||
|
||||
if (sv_player->xv->hasted)
|
||||
movevars.maxspeed*=sv_player->xv->hasted;
|
||||
|
|
|
@ -888,7 +888,7 @@ wedict_t *World_TestEntityPosition (world_t *w, wedict_t *ent)
|
|||
trace = World_Move (w, ent->v->origin, ent->v->mins, ent->v->maxs, ent->v->origin, ((ent->v->solid == SOLID_NOT || ent->v->solid == SOLID_TRIGGER)?MOVE_NOMONSTERS:0), ent);
|
||||
|
||||
if (trace.startsolid)
|
||||
return w->edicts;
|
||||
return trace.ent?trace.ent:w->edicts;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1731,7 +1731,7 @@ trace_t World_Move (world_t *w, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t e
|
|||
clip.maxs = maxs;
|
||||
clip.type = type;
|
||||
clip.passedict = passedict;
|
||||
clip.hullnum = hullnum;
|
||||
clip.hullnum = 0;//hullnum; //BUG: hexen2's SV_ClipMoveToEntity's move_ent argument is set inconsistantly. This has the effect that the SOLID_BSP's .hull field is used instead of the SOLID_BBOX entity. We can't fix this because hexen2 depends upon it - this is the 'tibet5' bug.
|
||||
#ifdef Q2SERVER
|
||||
clip.q2passedict = NULL;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue