Server: Fix that you're unable to pick up weapons when you've hit the ammo
cap of said weapon.
This commit is contained in:
parent
bfad97f6eb
commit
a80def1d12
2 changed files with 7 additions and 10 deletions
|
@ -63,7 +63,6 @@ NSSurfacePropEntity::ParentUpdate(void)
|
|||
NSRenderableEntity::ParentUpdate();
|
||||
}
|
||||
|
||||
|
||||
/* Burning, fire, flames, etc. */
|
||||
void
|
||||
NSSurfacePropEntity::Ignite(entity attacker, float flLifetime, int iWeapon)
|
||||
|
@ -73,6 +72,7 @@ NSSurfacePropEntity::Ignite(entity attacker, float flLifetime, int iWeapon)
|
|||
m_iBurnWeapon = iWeapon;
|
||||
m_flBurnTime = time + flLifetime;
|
||||
}
|
||||
|
||||
void
|
||||
NSSurfacePropEntity::Extinguish(void)
|
||||
{
|
||||
|
@ -81,6 +81,7 @@ NSSurfacePropEntity::Extinguish(void)
|
|||
m_iBurnWeapon =
|
||||
m_flBurnTime = 0;
|
||||
}
|
||||
|
||||
int
|
||||
NSSurfacePropEntity::IsOnFire(void)
|
||||
{
|
||||
|
@ -169,7 +170,6 @@ NSSurfacePropEntity::Input(entity eAct, string strInput, string strData)
|
|||
default:
|
||||
NSRenderableEntity::Input(eAct, strInput, strData);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -252,7 +252,6 @@ NSSurfacePropEntity::PropDataFinish(void)
|
|||
PropData_SetStage(m_strPropData);
|
||||
m_iPropData = PropData_Finish();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void
|
||||
|
@ -267,7 +266,6 @@ NSSurfacePropEntity::SetModel(string newModel)
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
NSSurfacePropEntity::NSSurfacePropEntity(void)
|
||||
{
|
||||
|
|
|
@ -156,18 +156,17 @@ Weapons_AddItem(base_player pl, int w, int startammo)
|
|||
} else {
|
||||
/* call pickup to handle the ammo */
|
||||
if (pl.g_items & g_weapons[w].id) {
|
||||
/* we have the item already, se let's see if we hit maxammo */
|
||||
value = g_weapons[w].pickup(FALSE, startammo);
|
||||
|
||||
/* FALSE means maxammo is hit */
|
||||
if (!value)
|
||||
return value;
|
||||
} else {
|
||||
/* new to our arsenal */
|
||||
value = g_weapons[w].pickup(TRUE, startammo);
|
||||
|
||||
if (!value)
|
||||
return value;
|
||||
|
||||
/* new to our arsenal, so always return TRUE */
|
||||
g_weapons[w].pickup(TRUE, startammo);
|
||||
pl.g_items |= g_weapons[w].id;
|
||||
value = TRUE;
|
||||
|
||||
/* it's new, so autoswitch? */
|
||||
if (pl.activeweapon == 0 && autocvar_sv_forceweapondraw == 1) {
|
||||
|
|
Loading…
Reference in a new issue