more fixes

This commit is contained in:
julianacat 2017-07-02 02:46:05 -05:00
parent afc32b6a1f
commit 79870f6c5c
2 changed files with 4 additions and 4 deletions

View File

@ -150,7 +150,7 @@ void CreateMove() {
// Check if player can aim and if aimkey allows aiming // Check if player can aim and if aimkey allows aiming
// We also preform a CanShoot check here per the old canshoot method // We also preform a CanShoot check here per the old canshoot method
if (shouldAim && UpdateAimkey() && GetCanAim(1)) { if (shouldAim && aimkeyStatus && GetCanAim(1)) {
// Check if player isnt using a huntsman // Check if player isnt using a huntsman
if (g_pLocalPlayer->weapon()->m_iClassID != CL_CLASS(CTFCompoundBow)) { if (g_pLocalPlayer->weapon()->m_iClassID != CL_CLASS(CTFCompoundBow)) {
@ -267,10 +267,10 @@ bool ShouldAim() {
} }
// Function to find a suitable target // Function to find a suitable target
CachedEntity* RetrieveBestTarget(bool aimkey) { CachedEntity* RetrieveBestTarget(bool aimkey_state) {
// If we have a previously chosen target, target lock is on, and the aimkey is allowed, then attemt to keep the previous target // If we have a previously chosen target, target lock is on, and the aimkey is allowed, then attemt to keep the previous target
if (target_lock && foundTarget && aimkey) { if (target_lock && foundTarget && aimkey_state) {
if (CE_GOOD(target_last)) { if (CE_GOOD(target_last)) {
// Check if previous target is still good // Check if previous target is still good
if (IsTargetStateGood(target_last)) { if (IsTargetStateGood(target_last)) {

View File

@ -50,7 +50,7 @@ float EffectiveTargetingRange();
CachedEntity* CurrentTarget(); CachedEntity* CurrentTarget();
bool ShouldAim(); bool ShouldAim();
CachedEntity* RetrieveBestTarget(); CachedEntity* RetrieveBestTarget(bool aimkey_state);
bool IsTargetStateGood(CachedEntity* entity); bool IsTargetStateGood(CachedEntity* entity);
void Aim(CachedEntity* entity); void Aim(CachedEntity* entity);
bool CanAutoShoot(); bool CanAutoShoot();