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/server/neo/bot/behavior/neo_bot_behavior.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ void CNEOBotMainAction::FireWeaponAtEnemy( CNEOBot *me )
}

if ( myWeapon && me->IsCombatWeapon( myWeapon )
&& !( myWeapon->GetNeoWepBits() & NEO_WEP_BALC )
&& myWeapon->IsWeaponReloadable()
&& myWeapon->m_iClip1 <= 0 )
{
if (myWeapon->m_bInReload)
Expand Down
2 changes: 1 addition & 1 deletion src/game/server/neo/bot/neo_bot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1687,7 +1687,7 @@ void CNEOBot::ReloadIfLowClip(bool bForceReload)
return;
}

if (wepBits & NEO_WEP_BALC)
if (!myWeapon->IsWeaponReloadable())
{
return;
}
Expand Down
1 change: 1 addition & 0 deletions src/game/shared/neo/weapons/weapon_balc.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class CWeaponBALC : public CNEOBaseCombatWeapon
virtual const char *GetTracerType() override final { return "AirboatGunTracer"; }
virtual bool CanDrop() final { return false; }
virtual bool CanAim() final { return true; }
virtual bool IsWeaponReloadable() const override final { return false; }
inline virtual bool IsAutomatic(void) const override final
{
return m_bIsPrimaryFireMode;
Expand Down
1 change: 1 addition & 0 deletions src/game/shared/neo/weapons/weapon_ghost.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class CWeaponGhost : public CNEOBaseCombatWeapon
virtual void Equip(CBaseCombatCharacter *pNewOwner) override;
bool CanBePickedUpByClass(int classId) OVERRIDE;
virtual bool CanAim() final { return false; }
virtual bool IsWeaponReloadable(void) const override final { return false; }

NEO_WEP_BITS_UNDERLYING_TYPE WeaponIndex() const override { return NEO_WIDX_GHOST; }
virtual NEO_WEP_BITS_UNDERLYING_TYPE GetNeoWepBits(void) const { return NEO_WEP_GHOST; }
Expand Down
1 change: 1 addition & 0 deletions src/game/shared/neo/weapons/weapon_knife.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class CWeaponKnife : public CNEOBaseCombatWeapon
virtual bool CanDrop() final { return false; }
virtual bool CanAim() final { return false; }
virtual bool CanPerformSecondaryAttack() const override final { return false; }
virtual bool IsWeaponReloadable() const override final { return false; }

#ifdef CLIENT_DLL
virtual bool ShouldDraw() final;
Expand Down
1 change: 1 addition & 0 deletions src/game/shared/neo/weapons/weapon_neobasecombatweapon.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ class CNEOBaseCombatWeapon : public CBaseHL2MPCombatWeapon

virtual bool Reload( void ) override;
virtual void FinishReload(void) override;
virtual bool IsWeaponReloadable(void) const { return true; }

virtual bool CanBeSelected(void) override;
virtual bool IsFollowingEntity() override {
Expand Down
2 changes: 2 additions & 0 deletions src/game/shared/neo/weapons/weapon_neobaseprojectile.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
class CNEOBaseProjectile : public CNEOBaseCombatWeapon
{
DECLARE_CLASS(CNEOBaseProjectile, CNEOBaseProjectile);
public:
virtual bool IsWeaponReloadable(void) const override { return false; }
protected:
void GetThrowPos(const Vector& throwFwd, const Vector& pos, Vector& outPos) const;
inline void GetThrowPos(const Vector& throwFwd, Vector& posInPlace) const
Expand Down