Skip to content

Commit

Permalink
Merge pull request #213 from Toodles2You/rpg
Browse files Browse the repository at this point in the history
Fix RPG being flagged as unusable while a rocket is loaded
  • Loading branch information
SamVanheer authored Aug 18, 2023
2 parents 0285a6e + e3899cc commit 183de9b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
11 changes: 0 additions & 11 deletions dlls/rpg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,17 +547,6 @@ void CRpg::UpdateSpot()
#endif
}

bool CRpg::IsUseable()
{
// The client needs to fall through to WeaponIdle so check the ammo here.
if (m_pPlayer->ammo_rockets <= 0)
{
return false;
}

return CBasePlayerWeapon::IsUseable();
}

class CRpgAmmo : public CBasePlayerAmmo
{
void Spawn() override
Expand Down
2 changes: 0 additions & 2 deletions dlls/weapons.h
Original file line number Diff line number Diff line change
Expand Up @@ -799,8 +799,6 @@ class CRpg : public CBasePlayerWeapon
void UpdateSpot();
bool ShouldWeaponIdle() override { return true; }

bool IsUseable() override;

CLaserSpot* m_pSpot;
bool m_fSpotActive;
int m_cActiveRockets; // how many missiles in flight from this launcher right now?
Expand Down

0 comments on commit 183de9b

Please sign in to comment.