From 25fef4826c3bbce85a52c55d763c579483324447 Mon Sep 17 00:00:00 2001 From: pierow Date: Tue, 14 Aug 2018 22:51:44 -0400 Subject: [PATCH] fixed sv_jumpmode 1 server/client prediction and made it default again --- main/source/dlls/game.cpp | 2 +- main/source/pm_shared/pm_shared.cpp | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/main/source/dlls/game.cpp b/main/source/dlls/game.cpp index de78280d..32fa9196 100644 --- a/main/source/dlls/game.cpp +++ b/main/source/dlls/game.cpp @@ -121,7 +121,7 @@ cvar_t avh_autoconcede = {kvAutoConcede, "4", FCVAR_SERVER}; cvar_t avh_combattime = {kvCombatTime, "10", FCVAR_SERVER}; cvar_t avh_mapvoteratio = {kvMapVoteRatio, ".6", FCVAR_SERVER}; cvar_t avh_blockscripts = {kvBlockScripts, "1", FCVAR_SERVER}; -cvar_t avh_jumpmode = {kvJumpMode, "2", FCVAR_SERVER}; +cvar_t avh_jumpmode = {kvJumpMode, "1", FCVAR_SERVER}; #ifdef DEBUG cvar_t avh_testing = {kvTesting, "0", FCVAR_SERVER}; #endif diff --git a/main/source/pm_shared/pm_shared.cpp b/main/source/pm_shared/pm_shared.cpp index 7a4d98d3..929768d9 100644 --- a/main/source/pm_shared/pm_shared.cpp +++ b/main/source/pm_shared/pm_shared.cpp @@ -132,7 +132,6 @@ bool AvHSHUGetCenterPositionForGroup(int inGroupNumber, float* inPlayerOrigin, f float PM_GetDesiredTopDownCameraHeight(qboolean& outFoundEntity); qboolean PM_CanWalljump(); qboolean PM_CanFlap(); -qboolean jumpheld; void PM_Overwatch(); bool PM_TopDown(); void PM_Jump(void); @@ -5342,8 +5341,7 @@ void PM_Jump (void) if (pmove->dead || GetHasUpgrade(pmove->iuser4, MASK_ENSNARED)) { - //pmove->oldbuttons |= IN_JUMP ; // don't jump again until released - jumpheld = true; + pmove->flags |= FL_JUMPHELD; return; } @@ -5474,7 +5472,7 @@ void PM_Jump (void) if (queuedjump) { - if (jumpheld) + if (pmove->flags & FL_JUMPHELD) return; } @@ -5530,7 +5528,7 @@ void PM_Jump (void) // Flag that we jumped. //pmove->oldbuttons |= IN_JUMP; // don't jump again until released - jumpheld = true; + pmove->flags |= FL_JUMPHELD; } /* @@ -6701,7 +6699,7 @@ void PM_PlayerMove ( qboolean server ) else { pmove->oldbuttons &= ~IN_JUMP; - jumpheld = false; + pmove->flags &= ~FL_JUMPHELD; } // Fricion is handled before we add in any base velocity. That way, if we are on a conveyor,