diff options
author | Tim Angus <tim@ngus.net> | 2006-07-31 21:45:24 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2006-07-31 21:45:24 +0000 |
commit | ae15fd3f111ba37c32a273e65b6a2ee35b579c86 (patch) | |
tree | de079c9249dca1e637ceca2028f0a4120d95f43e /src | |
parent | 965b4ecd1b64328e60a13c9d0643f3c718f128af (diff) |
* Fix to weapon changing bugs #2780 #2777 #2778 #2779 (tjw)
Diffstat (limited to 'src')
-rw-r--r-- | src/game/g_weapon.c | 7 |
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; + } } |