engine: share playermove ClearPhysEnts function

This commit is contained in:
Alibek Omarov
2023-01-06 00:28:24 +03:00
parent 0bec78a958
commit 787d3bc5dd
9 changed files with 14 additions and 28 deletions
-1
View File
@@ -2458,7 +2458,6 @@ pfnSetTraceHull
void GAME_EXPORT CL_SetTraceHull( int hull )
{
clgame.pmove->usehull = bound( 0, hull, 3 );
}
/*
+2 -1
View File
@@ -22,6 +22,7 @@ GNU General Public License for more details.
#include "vgui_draw.h"
#include "library.h"
#include "vid_common.h"
#include "pm_local.h"
#define MAX_TOTAL_CMDS 32
#define MAX_CMD_BUFFER 8000
@@ -1380,7 +1381,7 @@ void CL_ClearState( void )
CL_ClearEffects ();
CL_FreeEdicts ();
CL_ClearPhysEnts ();
PM_ClearPhysEnts( clgame.pmove );
NetAPI_CancelAllRequests();
// wipe the entire cl structure
+1 -15
View File
@@ -26,20 +26,6 @@ GNU General Public License for more details.
#define MIN_PREDICTION_EPSILON 0.5f // complain if error is > this and we have cl_showerror set
#define MAX_PREDICTION_ERROR 64.0f // above this is assumed to be a teleport, don't smooth, etc.
/*
=============
CL_ClearPhysEnts
=============
*/
void CL_ClearPhysEnts( void )
{
clgame.pmove->numtouch = 0;
clgame.pmove->numvisent = 0;
clgame.pmove->nummoveent = 0;
clgame.pmove->numphysent = 0;
}
/*
=============
CL_PushPMStates
@@ -807,7 +793,7 @@ void CL_InitClientMove( void )
clgame.pmove->Con_Printf = Con_Printf;
clgame.pmove->Sys_FloatTime = Sys_DoubleTime;
clgame.pmove->PM_StuckTouch = pfnStuckTouch;
clgame.pmove->PM_PointContents = PM_CL_PointContents;
clgame.pmove->PM_PointContents = (void*)PM_CL_PointContents;
clgame.pmove->PM_TruePointContents = pfnTruePointContents;
clgame.pmove->PM_HullPointContents = pfnHullPointContents;
clgame.pmove->PM_PlayerTrace = pfnPlayerTrace;
-1
View File
@@ -926,7 +926,6 @@ void CL_PopTraceBounds( void );
void CL_MoveSpectatorCamera( void );
void CL_SetLastUpdate( void );
void CL_RedoPrediction( void );
void CL_ClearPhysEnts( void );
void CL_PushPMStates( void );
void CL_PopPMStates( void );
void CL_SetUpPlayerPrediction( int dopred, int bIncludeLocalClient );