Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/game/client/swarm/c_asw_concommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ void rd_reset_level_and_promotion_f()

Msg( "All done, your level and promotion have been reset!\n" );
}
ConCommand rd_reset_level_and_promotion( "rd_reset_level_and_promotion", rd_reset_level_and_promotion_f, "Resets promotion (rank, level etc.)", FCVAR_DEVELOPMENTONLY );
ConCommand rd_reset_level_and_promotion( "rd_reset_level_and_promotion", rd_reset_level_and_promotion_f, "Resets promotion (rank, level etc.)", FCVAR_CHEAT | FCVAR_NOT_CONNECTED );

void asw_show_xp_f()
{
Expand Down
1 change: 1 addition & 0 deletions src/game/client/swarm/c_asw_weapon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ ConVar rd_drop_magazine_force_up( "rd_drop_magazine_force_up", "50", FCVAR_NONE,
ConVar rd_drop_magazine_spin( "rd_drop_magazine_spin", "1000", FCVAR_NONE, "Amount of random angular velocity to apply to dropped magazine" );
ConVar rd_drop_magazine_lifetime( "rd_drop_magazine_lifetime", "4", FCVAR_NONE, "Time before a dropped magazine fades" );
ConVar rd_strange_device_model( "rd_strange_device_model", "0", FCVAR_NONE, "Should items with strange devices attached display them in the world?" );
ConVar rd_weapon_autoaim( "rd_weapon_autoaim", "1", FCVAR_NONE, "Enable or disable weapon auto-aim if available." );

extern ConVar asw_use_particle_tracers;
extern ConVar muzzleflash_light;
Expand Down
24 changes: 22 additions & 2 deletions src/game/shared/swarm/asw_weapon_autogun_shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,28 @@ class CASW_Weapon_Autogun : public CASW_Weapon_Rifle

//float GetFireRate( void ) { return 0.1f; }

virtual const float GetAutoAimAmount() { return 0.36f; }
virtual const float GetAutoAimRadiusScale() { return 1.5f; }
#ifdef CLIENT_DLL
virtual const float GetAutoAimAmount()
{
extern ConVar rd_weapon_autoaim;
return rd_weapon_autoaim.GetBool() ? 0.36f : 0.0f;
}
virtual const float GetAutoAimRadiusScale()
{
extern ConVar rd_weapon_autoaim;
return rd_weapon_autoaim.GetBool() ? 1.5f : 0.0f;
}
#else
virtual const float GetAutoAimAmount()
{
return 0.36f;
}
virtual const float GetAutoAimRadiusScale()
{
return 1.5f;
}
#endif

virtual bool ShouldFlareAutoaim() { return true; }
virtual const Vector& GetBulletSpread( void );

Expand Down
23 changes: 21 additions & 2 deletions src/game/shared/swarm/asw_weapon_prifle_shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,27 @@ class CASW_Weapon_PRifle : public CASW_Weapon_Rifle
virtual ~CASW_Weapon_PRifle();
void Precache();

virtual const float GetAutoAimAmount() { return 0.26f; }
virtual const float GetAutoAimRadiusScale() { return 1.5f; }
#ifdef CLIENT_DLL
virtual const float GetAutoAimAmount()
{
extern ConVar rd_weapon_autoaim;
return rd_weapon_autoaim.GetBool() ? 0.26f : 0.0f;
}
virtual const float GetAutoAimRadiusScale()
{
extern ConVar rd_weapon_autoaim;
return rd_weapon_autoaim.GetBool() ? 1.5f : 0.0f;
}
#else
virtual const float GetAutoAimAmount()
{
return 0.26f;
}
virtual const float GetAutoAimRadiusScale()
{
return 1.5f;
}
#endif
virtual float GetFireRate();
virtual float GetWeaponBaseDamageOverride();
virtual int GetWeaponSkillId();
Expand Down
Loading