WEAPON_PIPEBOMB: apparently the pipebomb launcher shares the magazine field with the glauncher, so fixed that.
This commit is contained in:
parent
d2d3f54592
commit
dc9ac96279
2 changed files with 5 additions and 13 deletions
|
@ -44,7 +44,6 @@ class player:NSClientPlayer
|
|||
PREDICTED_INT(mag_dbs)
|
||||
PREDICTED_INT(mag_rpg)
|
||||
PREDICTED_INT(mag_glauncher)
|
||||
PREDICTED_INT(mag_pipebomb)
|
||||
|
||||
/* ammo 2 */
|
||||
PREDICTED_INT(m_iAmmoRockets)
|
||||
|
@ -113,7 +112,6 @@ player::ReceiveEntity(float new, float fl)
|
|||
mag_dbs = readbyte();
|
||||
mag_rpg = readbyte();
|
||||
mag_glauncher = readbyte();
|
||||
mag_pipebomb = readbyte();
|
||||
}
|
||||
|
||||
if (fl & PLAYER_AMMO2) {
|
||||
|
@ -175,7 +173,6 @@ player::PredictPreFrame(void)
|
|||
SAVE_STATE(mag_dbs);
|
||||
SAVE_STATE(mag_rpg);
|
||||
SAVE_STATE(mag_glauncher);
|
||||
SAVE_STATE(mag_pipebomb);
|
||||
|
||||
SAVE_STATE(m_iAmmoRockets);
|
||||
SAVE_STATE(m_iAmmoNails);
|
||||
|
@ -211,7 +208,6 @@ player::PredictPostFrame(void)
|
|||
ROLL_BACK(mag_dbs);
|
||||
ROLL_BACK(mag_rpg);
|
||||
ROLL_BACK(mag_glauncher);
|
||||
ROLL_BACK(mag_pipebomb);
|
||||
|
||||
ROLL_BACK(m_iAmmoRockets);
|
||||
ROLL_BACK(m_iAmmoNails);
|
||||
|
@ -245,8 +241,6 @@ player::EvaluateEntity(void)
|
|||
SendFlags |= PLAYER_AMMO1;
|
||||
else if (ATTR_CHANGED(mag_glauncher))
|
||||
SendFlags |= PLAYER_AMMO1;
|
||||
else if (ATTR_CHANGED(mag_pipebomb))
|
||||
SendFlags |= PLAYER_AMMO1;
|
||||
|
||||
/* ammo 2 type updates */
|
||||
if (ATTR_CHANGED(m_iAmmoRockets))
|
||||
|
@ -272,7 +266,6 @@ player::EvaluateEntity(void)
|
|||
SAVE_STATE(mag_dbs);
|
||||
SAVE_STATE(mag_rpg);
|
||||
SAVE_STATE(mag_glauncher);
|
||||
SAVE_STATE(mag_pipebomb);
|
||||
|
||||
SAVE_STATE(m_iAmmoRockets);
|
||||
SAVE_STATE(m_iAmmoNails);
|
||||
|
@ -552,7 +545,6 @@ player::SendEntity(entity ePEnt, float flChanged)
|
|||
WriteByte(MSG_ENTITY, mag_dbs);
|
||||
WriteByte(MSG_ENTITY, mag_rpg);
|
||||
WriteByte(MSG_ENTITY, mag_glauncher);
|
||||
WriteByte(MSG_ENTITY, mag_pipebomb);
|
||||
}
|
||||
|
||||
if (flChanged & PLAYER_AMMO2) {
|
||||
|
|
|
@ -31,14 +31,14 @@ w_pipebomb_precache(void)
|
|||
void
|
||||
w_pipebomb_updateammo(player pl)
|
||||
{
|
||||
Weapons_UpdateAmmo(pl, pl.mag_pipebomb, pl.m_iAmmoRockets, __NULL__);
|
||||
Weapons_UpdateAmmo(pl, pl.mag_glauncher, pl.m_iAmmoRockets, __NULL__);
|
||||
}
|
||||
|
||||
int
|
||||
w_pipebomb_pickup(player pl, int new, int startammo)
|
||||
{
|
||||
#ifdef SERVER
|
||||
pl.mag_pipebomb = bound(0, pl.mag_pipebomb + 6, 6);
|
||||
pl.mag_glauncher = bound(0, pl.mag_glauncher + 6, 6);
|
||||
#endif
|
||||
return (1);
|
||||
}
|
||||
|
@ -104,13 +104,13 @@ w_pipebomb_shootnade(player pl)
|
|||
void
|
||||
w_pipebomb_reload(player pl)
|
||||
{
|
||||
w_baseshotgun_reload(player::mag_pipebomb, player::m_iAmmoRockets, 6);
|
||||
w_baseshotgun_reload(player::mag_glauncher, player::m_iAmmoRockets, 6);
|
||||
}
|
||||
|
||||
void
|
||||
w_pipebomb_release(player pl)
|
||||
{
|
||||
int s = w_baseshotgun_release(player::mag_pipebomb, player::m_iAmmoRockets, 6);
|
||||
int s = w_baseshotgun_release(player::mag_glauncher, player::m_iAmmoRockets, 6);
|
||||
|
||||
switch (s) {
|
||||
case SHOTGUN_IDLE:
|
||||
|
@ -133,7 +133,7 @@ w_pipebomb_release(player pl)
|
|||
void
|
||||
w_pipebomb_primary(player pl)
|
||||
{
|
||||
int s = w_baseprojectile_fire(pl, WEAPON_PIPEBOMB, player::mag_pipebomb, w_pipebomb_shootnade);
|
||||
int s = w_baseprojectile_fire(pl, WEAPON_PIPEBOMB, player::mag_glauncher, w_pipebomb_shootnade);
|
||||
|
||||
switch (s) {
|
||||
case AUTO_FIRE_FAILED:
|
||||
|
|
Loading…
Reference in a new issue