mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-28 15:45:41 +03:00
Add client specific variables (#48)
Referring to HLSDK, pm_shared compiles with server and client both, so I added client specific variables and it don't errors when compiling it with CLIENT_DLL macro enabled.
This commit is contained in:
parent
ffd603a477
commit
f529673ee5
@ -19,6 +19,12 @@ int g_onladder = 0;
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CLIENT_DLL
|
||||||
|
int iJumpSpectator;
|
||||||
|
float vJumpOrigin[3];
|
||||||
|
float vJumpAngles[3];
|
||||||
|
#endif
|
||||||
|
|
||||||
void PM_SwapTextures(int i, int j)
|
void PM_SwapTextures(int i, int j)
|
||||||
{
|
{
|
||||||
char chTemp;
|
char chTemp;
|
||||||
@ -1636,6 +1642,16 @@ void PM_SpectatorMove()
|
|||||||
// targets position and real view position is calculated on client (saves server CPU)
|
// targets position and real view position is calculated on client (saves server CPU)
|
||||||
if (pmove->iuser1 == OBS_ROAMING)
|
if (pmove->iuser1 == OBS_ROAMING)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_DLL
|
||||||
|
if (iJumpSpectator)
|
||||||
|
{
|
||||||
|
VectorCopy(vJumpOrigin, pmove->origin);
|
||||||
|
VectorCopy(vJumpAngles, pmove->angles);
|
||||||
|
VectorCopy(vec3_origin, pmove->velocity);
|
||||||
|
iJumpSpectator = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
// Move around in normal spectator method
|
// Move around in normal spectator method
|
||||||
speed = Length (pmove->velocity);
|
speed = Length (pmove->velocity);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user