Revert "Stealth spell counts as being cloaked (#1147)"

This commit is contained in:
TotallyNotElite 2020-11-24 10:12:06 +01:00
parent 4c3fcfd962
commit d101dc9315
5 changed files with 6 additions and 6 deletions

View File

@ -73,7 +73,7 @@ void EndConVars();
bool IsPlayerInvulnerable(CachedEntity *player);
bool IsPlayerCritBoosted(CachedEntity *player);
bool IsPlayerInvisible(CachedEntity *player, bool check_stealth = true);
bool IsPlayerInvisible(CachedEntity *player);
bool IsPlayerDisguised(CachedEntity *player);
bool IsPlayerResistantToCurrentWeapon(CachedEntity *player);

View File

@ -465,7 +465,7 @@ bool ShouldAim()
if (HasCondition<TFCond_Taunting>(g_pLocalPlayer->entity))
return false;
// Is cloaked
if (IsPlayerInvisible(g_pLocalPlayer->entity, false))
if (IsPlayerInvisible(g_pLocalPlayer->entity))
return false;
}
#if ENABLE_VISUALS

View File

@ -315,7 +315,7 @@ void CreateMove()
{
if (!enabled)
return;
if (CE_BAD(LOCAL_E) || g_pLocalPlayer->life_state || CE_BAD(LOCAL_W) || !HasKnife() || IsPlayerInvisible(LOCAL_E, false) || CE_BYTE(LOCAL_E, netvar.m_bFeignDeathReady))
if (CE_BAD(LOCAL_E) || g_pLocalPlayer->life_state || CE_BAD(LOCAL_W) || !HasKnife() || IsPlayerInvisible(LOCAL_E) || CE_BYTE(LOCAL_E, netvar.m_bFeignDeathReady))
return;
if (!CanShoot())
return;

View File

@ -191,7 +191,7 @@ bool ShouldShoot()
if (HasCondition<TFCond_Taunting>(g_pLocalPlayer->entity))
return false;
// Check if player is cloaked
if (IsPlayerInvisible(g_pLocalPlayer->entity, false))
if (IsPlayerInvisible(g_pLocalPlayer->entity))
return false;
if (IsAmbassador(g_pLocalPlayer->weapon()))

View File

@ -1488,9 +1488,9 @@ bool IsPlayerCritBoosted(CachedEntity *player)
return HasConditionMask<KCritBoostMask.cond_0, KCritBoostMask.cond_1, KCritBoostMask.cond_2, KCritBoostMask.cond_3>(player);
}
bool IsPlayerInvisible(CachedEntity *player, bool check_stealth)
bool IsPlayerInvisible(CachedEntity *player)
{
return HasConditionMask<KInvisibilityMask.cond_0, KInvisibilityMask.cond_1, KInvisibilityMask.cond_2, KInvisibilityMask.cond_3>(player) || (check_stealth && HasConditionMask<KStealthedMask.cond_0, KStealthedMask.cond_1, KStealthedMask.cond_2, KStealthedMask.cond_3>(player));
return HasConditionMask<KInvisibilityMask.cond_0, KInvisibilityMask.cond_1, KInvisibilityMask.cond_2, KInvisibilityMask.cond_3>(player);
}
bool IsPlayerDisguised(CachedEntity *player)