Skip to content
Permalink
Browse files

Remove identClient from userCmd_t

  • Loading branch information...
Kangz committed Jan 20, 2015
1 parent d06d460 commit 8b46c657fa7255a492b0fbedfe867088ee825f6e
@@ -541,7 +541,7 @@ qboolean trap_GetSnapshot( int snapshotNumber, snapshot_t *snapshot );
qboolean trap_GetServerCommand( int serverCommandNumber );
int trap_GetCurrentCmdNumber( void );
qboolean trap_GetUserCmd( int cmdNumber, usercmd_t *ucmd );
void trap_SetUserCmdValue( int stateValue, int flags, float sensitivityScale, int mpIdentClient );
void trap_SetUserCmdValue( int stateValue, int flags, float sensitivityScale );
void trap_SetClientLerpOrigin( float x, float y, float z );
int trap_MemoryRemaining( void );
qboolean trap_Key_IsDown( int keynum );
@@ -187,12 +187,11 @@ qboolean CL_GetSnapshot( int snapshotNumber, snapshot_t *snapshot )
CL_SetUserCmdValue
==============
*/
void CL_SetUserCmdValue( int userCmdValue, int flags, float sensitivityScale, int mpIdentClient )
void CL_SetUserCmdValue( int userCmdValue, int flags, float sensitivityScale )
{
cl.cgameUserCmdValue = userCmdValue;
cl.cgameFlags = flags;
cl.cgameSensitivity = sensitivityScale;
cl.cgameMpIdentClient = mpIdentClient; // NERVE - SMF
}

/*
@@ -1898,7 +1897,7 @@ intptr_t CL_CgameSystemCalls( intptr_t *args )
return CL_GetUserCmd( args[ 1 ], (usercmd_t*) VMA( 2 ) );

case CG_SETUSERCMDVALUE:
CL_SetUserCmdValue( args[ 1 ], args[ 2 ], VMF( 3 ), args[ 4 ] );
CL_SetUserCmdValue( args[ 1 ], args[ 2 ], VMF( 3 ) );
return 0;

case CG_SETCLIENTLERPORIGIN:
@@ -713,8 +713,6 @@ void CL_FinishMove( usercmd_t *cmd )

cmd->flags = cl.cgameFlags;

cmd->identClient = cl.cgameMpIdentClient; // NERVE - SMF

// send the current server time so the amount of movement
// can be determined without allowing cheating
cmd->serverTime = cl.serverTime;
@@ -143,7 +143,6 @@ typedef struct
int cgameUserCmdValue; // current weapon to add to usercmd_t
int cgameFlags; // flags that can be set by the gamecode
float cgameSensitivity;
int cgameMpIdentClient; // NERVE - SMF
vec3_t cgameClientLerpOrigin; // DHM - Nerve

// cmds[cmdNumber] is the predicted command, [cmdNumber-1] is the last
@@ -816,7 +816,7 @@ void MSG_WriteDeltaUsercmd( msg_t *msg, usercmd_t *from, usercmd_t *to )
from->upmove == to->upmove &&
!memcmp( from->buttons, to->buttons, sizeof( from->buttons ) ) &&
from->weapon == to->weapon &&
from->flags == to->flags && from->doubleTap == to->doubleTap && from->identClient == to->identClient )
from->flags == to->flags && from->doubleTap == to->doubleTap)
{
// NERVE - SMF
MSG_WriteBits( msg, 0, 1 ); // no change
@@ -837,7 +837,6 @@ void MSG_WriteDeltaUsercmd( msg_t *msg, usercmd_t *from, usercmd_t *to )
MSG_WriteDelta( msg, from->weapon, to->weapon, 8 );
MSG_WriteDelta( msg, from->flags, to->flags, 8 );
MSG_WriteDelta( msg, from->doubleTap, to->doubleTap, 3 );
MSG_WriteDelta( msg, from->identClient, to->identClient, 8 ); // NERVE - SMF
}

/*
@@ -879,7 +878,6 @@ void MSG_ReadDeltaUsercmd( msg_t *msg, usercmd_t *from, usercmd_t *to )
to->weapon = MSG_ReadDelta( msg, from->weapon, 8 );
to->flags = MSG_ReadDelta( msg, from->flags, 8 );
to->doubleTap = MSG_ReadDelta( msg, from->doubleTap, 3 ) & 0x7;
to->identClient = MSG_ReadDelta( msg, from->identClient, 8 ); // NERVE - SMF
}
else
{
@@ -893,7 +891,6 @@ void MSG_ReadDeltaUsercmd( msg_t *msg, usercmd_t *from, usercmd_t *to )
to->weapon = from->weapon;
to->flags = from->flags;
to->doubleTap = from->doubleTap;
to->identClient = from->identClient; // NERVE - SMF
}
}

@@ -2345,11 +2345,6 @@ void ByteToDir( int b, vec3_t dir );
signed char forwardmove, rightmove, upmove;
byte doubleTap; // Arnout: only 3 bits used

// rain - in ET, this can be any entity, and it's used as an array
// index, so make sure it's unsigned
// But Unv doesn't use it.
byte identClient; // NERVE - SMF

byte weapon;
byte flags;

@@ -770,9 +770,9 @@ qboolean trap_GetUserCmd( int cmdNumber, usercmd_t *ucmd )

//98.
//CL_SetUserCmdValue(args[1], args[2], VMF(3), args[4]);
void trap_SetUserCmdValue( int stateValue, int flags, float sensitivityScale, int mpIdentClient )
void trap_SetUserCmdValue( int stateValue, int flags, float sensitivityScale )
{
syscallVM( CG_SETUSERCMDVALUE, stateValue, flags, PASSFLOAT( sensitivityScale ), mpIdentClient );
syscallVM( CG_SETUSERCMDVALUE, stateValue, flags, PASSFLOAT( sensitivityScale ) );
}

//99.
@@ -1884,7 +1884,7 @@ void CG_DrawActiveFrame( int serverTime, qboolean demoPlayback )
}

// let the client system know what our weapon and zoom settings are
trap_SetUserCmdValue( cg.weaponSelect, 0, cg.zoomSensitivity, 0 );
trap_SetUserCmdValue( cg.weaponSelect, 0, cg.zoomSensitivity );

// this counter will be bumped for every valid scene we generate
cg.clientFrame++;

0 comments on commit 8b46c65

Please sign in to comment.
You can’t perform that action at this time.