vecSrc bullet should be taken into an array
This commit is contained in:
parent
449017c859
commit
95bb5cb8a5
7 changed files with 7 additions and 30 deletions
|
@ -249,7 +249,7 @@ END_RECV_TABLE()
|
|||
RecvPropFloat ( RECVINFO( m_flLaggedMovementValue )),
|
||||
RecvPropArray3 ( RECVINFO_ARRAY(m_vecBulletServerPositions), RecvPropVector( RECVINFO(m_vecBulletServerPositions[0])) ),
|
||||
RecvPropInt(RECVINFO(m_iBulletServerPositionCount)),
|
||||
RecvPropVector(RECVINFO(m_vecServerShootPosition)),
|
||||
RecvPropArray3 ( RECVINFO_ARRAY(m_vecServerShootPosition), RecvPropVector( RECVINFO(m_vecServerShootPosition[0])) ),
|
||||
END_RECV_TABLE()
|
||||
|
||||
|
||||
|
|
|
@ -642,7 +642,7 @@ public:
|
|||
int m_nTickBaseFireBullet;
|
||||
Vector m_vecBulletServerPositions[MAX_PLAYER_BULLET_SERVER_POSITIONS];
|
||||
int m_iBulletServerPositionCount;
|
||||
Vector m_vecServerShootPosition;
|
||||
Vector m_vecServerShootPosition[MAX_PLAYER_BULLET_SERVER_POSITIONS];
|
||||
};
|
||||
|
||||
EXTERN_RECV_TABLE(DT_BasePlayer);
|
||||
|
|
|
@ -2241,7 +2241,7 @@ void C_CSPlayer::Simulate( void )
|
|||
|
||||
for (int i = 0; i < m_iBulletServerPositionCount; i++)
|
||||
{
|
||||
debugoverlay->AddSweptBoxOverlay(m_vecServerShootPosition,
|
||||
debugoverlay->AddSweptBoxOverlay(m_vecServerShootPosition[i],
|
||||
m_vecBulletServerPositions[i],
|
||||
Vector(-m_lastBulletDiameter,
|
||||
-m_lastBulletDiameter,
|
||||
|
|
|
@ -7973,8 +7973,8 @@ void CMovementSpeedMod::InputSpeedMod(inputdata_t &data)
|
|||
SendPropFloat ( SENDINFO( m_flLaggedMovementValue ), 0, SPROP_NOSCALE ),
|
||||
SendPropArray3( SENDINFO_ARRAY3(m_vecBulletServerPositions), SendPropVector(SENDINFO_ARRAY(m_vecBulletServerPositions))),
|
||||
SendPropInt(SENDINFO(m_iBulletServerPositionCount)),
|
||||
SendPropVector(SENDINFO(m_vecServerShootPosition))
|
||||
END_SEND_TABLE()
|
||||
SendPropArray3( SENDINFO_ARRAY3(m_vecServerShootPosition), SendPropVector(SENDINFO_ARRAY(m_vecServerShootPosition))),
|
||||
END_SEND_TABLE()
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------------- //
|
||||
|
|
|
@ -1212,7 +1212,7 @@ public:
|
|||
virtual unsigned int PlayerSolidMask( bool brushOnly = false ) const; // returns the solid mask for the given player, so bots can have a more-restrictive set
|
||||
CNetworkArray(Vector, m_vecBulletServerPositions, MAX_PLAYER_BULLET_SERVER_POSITIONS);
|
||||
CNetworkVar(int, m_iBulletServerPositionCount);
|
||||
CNetworkVar(Vector, m_vecServerShootPosition);
|
||||
CNetworkArray(Vector, m_vecServerShootPosition, MAX_PLAYER_BULLET_SERVER_POSITIONS);
|
||||
};
|
||||
|
||||
typedef CHandle<CBasePlayer> CBasePlayerHandle;
|
||||
|
|
|
@ -478,29 +478,6 @@ void CCSPlayer::FireBullet(
|
|||
|
||||
VectorNormalize( vecDir );
|
||||
|
||||
//Adrian: visualize server/client player positions
|
||||
//This is used to show where the lag compesator thinks the player should be at.
|
||||
#if 0
|
||||
for ( int k = 1; k <= gpGlobals->maxClients; k++ )
|
||||
{
|
||||
CBasePlayer *clientClass = (CBasePlayer *)CBaseEntity::Instance( k );
|
||||
|
||||
if ( clientClass == NULL )
|
||||
continue;
|
||||
|
||||
if ( k == entindex() )
|
||||
continue;
|
||||
|
||||
#ifdef CLIENT_DLL
|
||||
debugoverlay->AddBoxOverlay( clientClass->GetAbsOrigin(), clientClass->WorldAlignMins(), clientClass->WorldAlignMaxs(), QAngle( 0, 0, 0), 255,0,0,127, 4 );
|
||||
#else
|
||||
NDebugOverlay::Box( clientClass->GetAbsOrigin(), clientClass->WorldAlignMins(), clientClass->WorldAlignMaxs(), 0,0,255,127, 4 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// HPE_BEGIN:
|
||||
|
@ -610,6 +587,7 @@ void CCSPlayer::FireBullet(
|
|||
if (m_iBulletServerPositionCount.Get() < MAX_PLAYER_BULLET_SERVER_POSITIONS)
|
||||
{
|
||||
m_vecBulletServerPositions.Set(m_iBulletServerPositionCount.Get(), tr.endpos);
|
||||
m_vecServerShootPosition.Set(m_iBulletServerPositionCount.Get(), vecSrc);
|
||||
m_iBulletServerPositionCount.Set(m_iBulletServerPositionCount.Get() + 1);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -294,7 +294,6 @@ void FX_FireBullets(
|
|||
|
||||
#ifndef CLIENT_DLL
|
||||
pPlayer->m_iBulletServerPositionCount.Set(0);
|
||||
pPlayer->m_vecServerShootPosition.Set(vOrigin);
|
||||
#endif
|
||||
for ( int iBullet=0; iBullet < pWeaponInfo->m_iBullets; iBullet++ )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue