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
|
@ -63,7 +63,6 @@ NSSurfacePropEntity::ParentUpdate(void)
|
||||||
NSRenderableEntity::ParentUpdate();
|
NSRenderableEntity::ParentUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Burning, fire, flames, etc. */
|
/* Burning, fire, flames, etc. */
|
||||||
void
|
void
|
||||||
NSSurfacePropEntity::Ignite(entity attacker, float flLifetime, int iWeapon)
|
NSSurfacePropEntity::Ignite(entity attacker, float flLifetime, int iWeapon)
|
||||||
|
@ -73,6 +72,7 @@ NSSurfacePropEntity::Ignite(entity attacker, float flLifetime, int iWeapon)
|
||||||
m_iBurnWeapon = iWeapon;
|
m_iBurnWeapon = iWeapon;
|
||||||
m_flBurnTime = time + flLifetime;
|
m_flBurnTime = time + flLifetime;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
NSSurfacePropEntity::Extinguish(void)
|
NSSurfacePropEntity::Extinguish(void)
|
||||||
{
|
{
|
||||||
|
@ -81,6 +81,7 @@ NSSurfacePropEntity::Extinguish(void)
|
||||||
m_iBurnWeapon =
|
m_iBurnWeapon =
|
||||||
m_flBurnTime = 0;
|
m_flBurnTime = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
NSSurfacePropEntity::IsOnFire(void)
|
NSSurfacePropEntity::IsOnFire(void)
|
||||||
{
|
{
|
||||||
|
@ -169,7 +170,6 @@ NSSurfacePropEntity::Input(entity eAct, string strInput, string strData)
|
||||||
default:
|
default:
|
||||||
NSRenderableEntity::Input(eAct, strInput, strData);
|
NSRenderableEntity::Input(eAct, strInput, strData);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -252,7 +252,6 @@ NSSurfacePropEntity::PropDataFinish(void)
|
||||||
PropData_SetStage(m_strPropData);
|
PropData_SetStage(m_strPropData);
|
||||||
m_iPropData = PropData_Finish();
|
m_iPropData = PropData_Finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -267,7 +266,6 @@ NSSurfacePropEntity::SetModel(string newModel)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
NSSurfacePropEntity::NSSurfacePropEntity(void)
|
NSSurfacePropEntity::NSSurfacePropEntity(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -156,18 +156,17 @@ Weapons_AddItem(base_player pl, int w, int startammo)
|
||||||
} else {
|
} else {
|
||||||
/* call pickup to handle the ammo */
|
/* call pickup to handle the ammo */
|
||||||
if (pl.g_items & g_weapons[w].id) {
|
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);
|
value = g_weapons[w].pickup(FALSE, startammo);
|
||||||
|
|
||||||
|
/* FALSE means maxammo is hit */
|
||||||
if (!value)
|
if (!value)
|
||||||
return value;
|
return value;
|
||||||
} else {
|
} else {
|
||||||
/* new to our arsenal */
|
/* new to our arsenal, so always return TRUE */
|
||||||
value = g_weapons[w].pickup(TRUE, startammo);
|
g_weapons[w].pickup(TRUE, startammo);
|
||||||
|
|
||||||
if (!value)
|
|
||||||
return value;
|
|
||||||
|
|
||||||
pl.g_items |= g_weapons[w].id;
|
pl.g_items |= g_weapons[w].id;
|
||||||
|
value = TRUE;
|
||||||
|
|
||||||
/* it's new, so autoswitch? */
|
/* it's new, so autoswitch? */
|
||||||
if (pl.activeweapon == 0 && autocvar_sv_forceweapondraw == 1) {
|
if (pl.activeweapon == 0 && autocvar_sv_forceweapondraw == 1) {
|
||||||
|
|
Loading…
Reference in New Issue