Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RPG being flagged as unusable while a rocket is loaded #213

Merged
merged 1 commit into from
Aug 18, 2023
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
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