From 6f95cebb11aeb7e5d530d70c4522ef89b5a67dfb Mon Sep 17 00:00:00 2001 From: Andrei Drexler Date: Fri, 11 Mar 2011 07:34:54 +0000 Subject: [PATCH] Bug fixed: when you had the bandolier, 2 or 3 clips for the pistol and already had akimbo, if you picked up another pistol, no ammo extra clips would be given for the pistol. --- reaction/code/game/g_items.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reaction/code/game/g_items.c b/reaction/code/game/g_items.c index 6e5e8642..e3acfc02 100644 --- a/reaction/code/game/g_items.c +++ b/reaction/code/game/g_items.c @@ -330,14 +330,14 @@ int Pickup_Weapon(gentity_t * ent, gentity_t * other, int bandolierFactor) //Elder: special case //Someone can optimize this code later, but for now, it works. if (!(other->client->ps.stats[STAT_WEAPONS] & (1 << WP_AKIMBO))) { - trap_SendServerCommand(other - g_entities, va("print \"[skipnotify]Picked up " RQ3_AKIMBO_NAME "^7\n\"")); + trap_SendServerCommand(other - g_entities, va("print \"[skipnotify]Picked up " RQ3_PISTOL_NAME "^7\n\"")); other->client->ps.stats[STAT_WEAPONS] |= (1 << WP_AKIMBO); other->client->ps.ammo[WP_AKIMBO] = other->client->ps.ammo[WP_PISTOL] + RQ3_PISTOL_AMMO; //Elder: always reset back to full clip like Action if first pistol picked up ammotoadd = RQ3_PISTOL_AMMO; } //Elder: Already have akimbo - technically should have pistol - else if (other->client->numClips[WP_PISTOL] < 2) { + else if (other->client->numClips[WP_PISTOL] < 2 * bandolierFactor) { //give an extra clip - make < 2 + 2 * hasBandolier(0/1) or something for bando when it's in trap_SendServerCommand(other - g_entities, va("print \"[skipnotify]Picked up an extra clip^7\n\"")); other->client->numClips[WP_PISTOL]++;