diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index 448e6fb60..f64b81107 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -1118,6 +1118,7 @@ void CL_CheckServerInfo(void) cl.bunnyspeedcap = Q_atof(Info_ValueForKey(cl.serverinfo, "pm_bunnyspeedcap")); movevars.slidefix = (Q_atof(Info_ValueForKey(cl.serverinfo, "pm_slidefix")) != 0); movevars.airstep = (Q_atof(Info_ValueForKey(cl.serverinfo, "pm_airstep")) != 0); + movevars.walljump = (Q_atof(Info_ValueForKey(cl.serverinfo, "pm_walljump")) != 0); movevars.ktjump = Q_atof(Info_ValueForKey(cl.serverinfo, "pm_ktjump")); // Initialize cl.maxpitch & cl.minpitch diff --git a/engine/client/cl_ui.c b/engine/client/cl_ui.c index 698d9d0e2..da926f895 100644 --- a/engine/client/cl_ui.c +++ b/engine/client/cl_ui.c @@ -702,7 +702,7 @@ long UI_SystemCallsEx(void *offset, unsigned int mask, int fn, const long *arg) case UI_DRAW_IMAGE: if (Draw_Image) - Draw_Image(VM_FLOAT(arg[0]), VM_FLOAT(arg[1]), VM_FLOAT(arg[2]), VM_FLOAT(arg[3]), VM_FLOAT(arg[4]), VM_FLOAT(arg[5]), VM_FLOAT(arg[6]), VM_FLOAT(arg[7]), (qpic_t *)VM_LONG(arg[8])); + Draw_Image(VM_FLOAT(arg[0]), VM_FLOAT(arg[1]), VM_FLOAT(arg[2]), VM_FLOAT(arg[3]), VM_FLOAT(arg[4]), VM_FLOAT(arg[5]), VM_FLOAT(arg[6]), VM_FLOAT(arg[7]), (mpic_t *)VM_LONG(arg[8])); break; case UI_LERP_TAG: //Lerp tag... diff --git a/engine/common/pmove.c b/engine/common/pmove.c index 79bd5cb42..2c8e0254d 100644 --- a/engine/common/pmove.c +++ b/engine/common/pmove.c @@ -168,6 +168,15 @@ int PM_SlideMove (void) // for (i=0 ; i200 && pmove.cmd.buttons & 2 && !pmove.jump_held) + { + PM_ClipVelocity (original_velocity, planes[i], pmove.velocity, 2); + pmove.velocity[2] = 270; + pmove.jump_msec = pmove.cmd.msec; + pmove.jump_held = true; + return 0; + } PM_ClipVelocity (original_velocity, planes[i], pmove.velocity, 1); for (j=0 ; jtime = sv.time; - memset (&svs.clients[i].edict->v, 0, pr_edict_size-svprogparms.edictsize); + SetUpClientEdict(&svs.clients[i], svs.clients[i].edict); svs.clients[i].edict->v.netname = PR_SetString(svprogfuncs, "Console"); @@ -2665,18 +2667,19 @@ void SV_Impulse_f (void) pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, svs.clients[i].edict); PR_ExecuteProgram (svprogfuncs, pr_global_struct->PutClientInServer); + pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, svs.clients[i].edict); + PR_ExecuteProgram (svprogfuncs, pr_global_struct->PlayerPreThink); + pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, svs.clients[i].edict); + PR_ExecuteProgram (svprogfuncs, svs.clients[i].edict->v.think); + pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, svs.clients[i].edict); + PR_ExecuteProgram (svprogfuncs, pr_global_struct->PlayerPostThink); + svs.clients[i].edict->v.impulse = atoi(Cmd_Argv(1)); pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, svs.clients[i].edict); PR_ExecuteProgram (svprogfuncs, pr_global_struct->PlayerPreThink); - pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, svs.clients[i].edict); PR_ExecuteProgram (svprogfuncs, svs.clients[i].edict->v.think); - { - char buffer[256] = "self.ishuman"; - pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, svs.clients[i].edict); - Con_Printf("Result: %s\n", svprogfuncs->EvaluateDebugString(svprogfuncs, buffer)); - } pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, svs.clients[i].edict); PR_ExecuteProgram (svprogfuncs, pr_global_struct->PlayerPostThink); @@ -2848,6 +2851,7 @@ void SV_InitLocal (void) extern cvar_t pm_ktjump; extern cvar_t pm_slidefix; extern cvar_t pm_airstep; + extern cvar_t pm_walljump; SV_InitOperatorCommands (); SV_UserInit (); @@ -2911,6 +2915,7 @@ void SV_InitLocal (void) Cvar_Register (&pm_ktjump, cvargroup_serverphysics); Cvar_Register (&pm_slidefix, cvargroup_serverphysics); Cvar_Register (&pm_airstep, cvargroup_serverphysics); + Cvar_Register (&pm_walljump, cvargroup_serverphysics); Cvar_Register (&sv_compatablehulls, cvargroup_serverphysics); diff --git a/engine/server/sv_phys.c b/engine/server/sv_phys.c index 63ad9194a..c28ef9fe9 100644 --- a/engine/server/sv_phys.c +++ b/engine/server/sv_phys.c @@ -57,6 +57,7 @@ cvar_t pm_ktjump = {"pm_ktjump", "", NULL, CVAR_SERVERINFO}; cvar_t pm_bunnyspeedcap = {"pm_bunnyspeedcap", "", NULL, CVAR_SERVERINFO}; cvar_t pm_slidefix = {"pm_slidefix", "", NULL, CVAR_SERVERINFO}; cvar_t pm_airstep = {"pm_airstep", "", NULL, CVAR_SERVERINFO}; +cvar_t pm_walljump = {"pm_walljump", "", NULL, CVAR_SERVERINFO}; extern cvar_t sv_nomsec; @@ -405,7 +406,7 @@ SV_AddGravity */ void SV_AddGravity (edict_t *ent, float scale) { - ent->v.velocity[2] -= scale * movevars.gravity * host_frametime; + ent->v.velocity[2] -= scale * sv_gravity.value/*movevars.gravity*/ * host_frametime; } /* diff --git a/engine/server/sv_user.c b/engine/server/sv_user.c index f24f5b1a2..b102b715b 100644 --- a/engine/server/sv_user.c +++ b/engine/server/sv_user.c @@ -68,6 +68,7 @@ extern cvar_t pm_bunnyspeedcap; extern cvar_t pm_ktjump; extern cvar_t pm_slidefix; extern cvar_t pm_airstep; +extern cvar_t pm_walljump; char sv_votinggroup[] = "server voting"; @@ -1011,7 +1012,7 @@ void SV_PreSpawn_f (void) } } -static void SetUpClientEdict (client_t *cl, edict_t *ent); +void SetUpClientEdict (client_t *cl, edict_t *ent); /* ================== SV_Spawn_f @@ -2491,7 +2492,7 @@ void Cmd_SetPos_f(void) } void ED_ClearEdict (progfuncs_t *progfuncs, edict_t *e); -static void SetUpClientEdict (client_t *cl, edict_t *ent) +void SetUpClientEdict (client_t *cl, edict_t *ent) { extern int pr_teamfield; ED_ClearEdict(svprogfuncs, ent); @@ -2528,23 +2529,27 @@ void Cmd_Join_f (void) if (!host_client->spectator) return; // already a player - if (!(host_client->zquake_extensions & Z_EXT_JOIN_OBSERVE)) { + if (!(host_client->zquake_extensions & Z_EXT_JOIN_OBSERVE)) + { Con_Printf ("Your QW client doesn't support this command\n"); return; } - if (password.string[0] && stricmp(password.string, "none")) { + if (password.string[0] && stricmp(password.string, "none")) + { Con_Printf ("This server requires a %s password. Please disconnect, set the password and reconnect as %s.\n", "player", "player"); return; } // count players already on server numclients = 0; - for (i=0,cl=svs.clients ; istate != cs_free && !cl->spectator) numclients++; } - if (numclients >= maxclients.value) { + if (numclients >= maxclients.value) + { Con_Printf ("Can't join, all player slots full\n"); return; } @@ -3772,6 +3777,7 @@ void SV_RunCmd (usercmd_t *ucmd, qboolean recurse) movevars.ktjump = pm_ktjump.value; movevars.slidefix = (pm_slidefix.value != 0); movevars.airstep = (pm_airstep.value != 0); + movevars.walljump = (pm_walljump.value != 0); if (sv_player->v.hasted) movevars.maxspeed*=sv_player->v.hasted;