Skip to content
Merged
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/c_baseplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2593,7 +2593,7 @@ void C_BasePlayer::PhysicsSimulate( void )
ctx->cmd.upmove = 0;
ctx->cmd.impulse = 0;
ctx->cmd.buttons &= ~(IN_ATTACK | IN_JUMP | IN_SPEED |
IN_ALT1 | IN_ALT2 | IN_BACK | IN_FORWARD | IN_MOVELEFT | IN_MOVERIGHT | IN_RUN | IN_ZOOM);
IN_ALT1 | IN_ALT2 | IN_BACK | IN_FORWARD | IN_MOVELEFT | IN_MOVERIGHT | IN_RUN);
const bool isTachi = (dynamic_cast<CWeaponTachi*>(GetActiveWeapon()) != NULL);
if (!isTachi)
{
Expand Down
13 changes: 13 additions & 0 deletions src/game/client/neo/c_neo_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,19 @@ void C_NEO_Player::ItemPreFrame( void )
void C_NEO_Player::ItemPostFrame( void )
{
BaseClass::ItemPostFrame();

auto pWeapon = static_cast<CNEOBaseCombatWeapon *>(GetActiveWeapon());
if (pWeapon && pWeapon->GetNeoWepBits() & NEO_WEP_SCOPEDWEAPON)
{
if (IsInAim())
{
GetNEOViewModel()->AddEffects(EF_NODRAW);
}
else
{
GetNEOViewModel()->RemoveEffects(EF_NODRAW);
}
}
}

float C_NEO_Player::GetMinFOV() const
Expand Down
2 changes: 1 addition & 1 deletion src/game/server/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3946,7 +3946,7 @@ void CBasePlayer::PlayerRunCommand(CUserCmd *ucmd, IMoveHelper *moveHelper)
}

ucmd->buttons &= ~(IN_ATTACK | IN_JUMP | IN_SPEED |
IN_ALT1 | IN_ALT2 | IN_BACK | IN_FORWARD | IN_MOVELEFT | IN_MOVERIGHT | IN_RUN | IN_ZOOM);
IN_ALT1 | IN_ALT2 | IN_BACK | IN_FORWARD | IN_MOVELEFT | IN_MOVERIGHT | IN_RUN);
const bool isTachi = (dynamic_cast<CWeaponTachi*>(GetActiveWeapon()) != NULL);
if (!isTachi)
{
Expand Down
17 changes: 0 additions & 17 deletions src/game/shared/neo/neo_predicted_viewmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,23 +275,6 @@ int CNEOPredictedViewModel::DrawModel(int flags)

return BaseClass::DrawModel(flags);
}

bool CNEOPredictedViewModel::ShouldDraw()
{
const auto* owner = ToNEOPlayer(GetOwner());
if (!owner || !owner->IsInAim())
return BaseClass::ShouldDraw();

const auto* wep = assert_cast<CNEOBaseCombatWeapon*>(GetOwningWeapon());
if (!wep)
return BaseClass::ShouldDraw();

const bool isScopedWithSniper = wep->GetNeoWepBits() & NEO_WEP_SCOPEDWEAPON;
if (!isScopedWithSniper)
return BaseClass::ShouldDraw();

return false;
}
#endif

float EaseOut(float current, float target, float step)
Expand Down
1 change: 0 additions & 1 deletion src/game/shared/neo/neo_predicted_viewmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ class CNEOPredictedViewModel : public CPredictedViewModel
virtual void ClientThink() override;

virtual int DrawModel(int flags);
virtual bool ShouldDraw() override;
virtual void ProcessMuzzleFlashEvent() final override;

virtual RenderGroup_t GetRenderGroup() override;
Expand Down
2 changes: 1 addition & 1 deletion src/game/shared/neo/weapons/weapon_srs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,4 @@ bool CWeaponSRS::Reload()
bool CWeaponSRS::CanBePickedUpByClass(int classId)
{
return classId != NEO_CLASS_JUGGERNAUT;
}
}