mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-03-19 08:50:22 +03:00
Move .357 snap after firing to client-side
This commit is contained in:
parent
64e4b89f83
commit
bb2844b30b
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#ifdef CLIENT_DLL
|
#ifdef CLIENT_DLL
|
||||||
#include "c_hl2mp_player.h"
|
#include "c_hl2mp_player.h"
|
||||||
|
#include <prediction.h>
|
||||||
#else
|
#else
|
||||||
#include "hl2mp_player.h"
|
#include "hl2mp_player.h"
|
||||||
#endif
|
#endif
|
||||||
@ -133,16 +134,18 @@ void CWeapon357::PrimaryAttack( void )
|
|||||||
// Fire the bullets, and force the first shot to be perfectly accuracy
|
// Fire the bullets, and force the first shot to be perfectly accuracy
|
||||||
pPlayer->FireBullets( info );
|
pPlayer->FireBullets( info );
|
||||||
|
|
||||||
|
#ifdef CLIENT_DLL
|
||||||
//Disorient the player
|
//Disorient the player
|
||||||
QAngle angles = pPlayer->GetLocalAngles();
|
if ( prediction->IsFirstTimePredicted() )
|
||||||
|
{
|
||||||
|
QAngle angles;
|
||||||
|
engine->GetViewAngles( angles );
|
||||||
angles.x += random->RandomInt( -1, 1 );
|
angles.x += random->RandomInt( -1, 1 );
|
||||||
angles.y += random->RandomInt( -1, 1 );
|
angles.y += random->RandomInt( -1, 1 );
|
||||||
angles.z = 0;
|
angles.z += 0.0f;
|
||||||
|
engine->SetViewAngles( angles );
|
||||||
#ifndef CLIENT_DLL
|
}
|
||||||
pPlayer->SnapEyeAngles( angles );
|
#endif // CLIENT_DLL
|
||||||
#endif
|
|
||||||
|
|
||||||
pPlayer->ViewPunch( QAngle( -8, random->RandomFloat( -2, 2 ), 0 ) );
|
pPlayer->ViewPunch( QAngle( -8, random->RandomFloat( -2, 2 ), 0 ) );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user