summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/g_weapon.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c
index 18c3b8fc..2afa24b7 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -42,7 +42,8 @@ void G_ForceWeaponChange( gentity_t *ent, weapon_t weapon )
{
ent->client->ps.pm_flags |= PMF_WEAPON_SWITCH;
- if( weapon == WP_NONE )
+ if( weapon == WP_NONE
+ || !BG_InventoryContainsWeapon( weapon, ent->client->ps.stats ))
{
//switch to the first non blaster weapon
for( i = WP_NONE + 1; i < WP_NUM_WEAPONS; i++ )
@@ -63,6 +64,10 @@ void G_ForceWeaponChange( gentity_t *ent, weapon_t weapon )
}
else
ent->client->ps.persistant[ PERS_NEWWEAPON ] = weapon;
+
+ // force this here to prevent flamer effect from continuing
+ ent->client->ps.generic1 = WPM_NOTFIRING;
+
}
}