From b5e49dd9ed54f6c0b6f54c719f2cb7f6833ef322 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Sun, 12 Nov 2006 23:23:20 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@630 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/cube.h | 2 +- source/src/entities.cpp | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/source/src/cube.h b/source/src/cube.h index 1545e977..75ceffb8 100644 --- a/source/src/cube.h +++ b/source/src/cube.h @@ -406,7 +406,7 @@ struct playerent : dynent gunwait = 0; attacking = false; weaponchanging = false; - akimbo = 1; + akimbo = 0; loopi(NUMGUNS) ammo[i] = mag[i] = 0; }; }; diff --git a/source/src/entities.cpp b/source/src/entities.cpp index 59af4571..2d41c463 100644 --- a/source/src/entities.cpp +++ b/source/src/entities.cpp @@ -264,19 +264,21 @@ void setspawn(int i, bool on) { if(i=0) ents[i].spawned = on void equip(playerent *d) { - loopi(NUMGUNS) if(d->nextprimary!=i) d->ammo[i] = 0; - + if(m_pistol) d->primary = GUN_PISTOL; + else if(m_osok) d->primary = GUN_SNIPER; + else if(m_lss) d->primary = GUN_KNIFE; + else d->primary = d->nextprimary; + d->mag[GUN_KNIFE] = d->ammo[GUN_KNIFE] = 1; d->mag[GUN_GRENADE] = d->ammo[GUN_GRENADE] = 0; - if(m_pistol || d->primary==GUN_PISTOL) // pistol only mode + if(m_pistol) // pistol only mode { d->ammo[GUN_PISTOL] = itemstats[GUN_PISTOL].max; - }; - if(m_lss) + } + else if(m_lss) { d->mag[d->primary] = d->mag[GUN_PISTOL] = 0; - d->primary = GUN_KNIFE; } else if(!m_noguns) {