From a8b039065a0c298d2ed2a893d85a374b7d7ab35e Mon Sep 17 00:00:00 2001 From: Rafael Barreto Date: Sat, 10 Jul 2010 22:01:13 +0000 Subject: [PATCH] disabling the combat pistol for now git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5333 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/entities.cpp | 6 +++--- source/src/entity.h | 11 +++++------ source/src/server.cpp | 4 ++-- source/src/weapon.cpp | 3 +-- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/source/src/entities.cpp b/source/src/entities.cpp index d3184b84..40384dc9 100644 --- a/source/src/entities.cpp +++ b/source/src/entities.cpp @@ -170,8 +170,8 @@ void pickupeffects(int n, playerent *d) switch(e.type) { case I_AKIMBO: w = d->weapons[GUN_AKIMBO]; break; - case I_CLIPS: if (d->gunselect == GUN_CPISTOL) w = d->weapons[GUN_CPISTOL]; else w = d->weapons[GUN_PISTOL]; break; - case I_AMMO: if (d->primary != GUN_CPISTOL) w = d->primweap; break; + case I_CLIPS: w = d->weapons[GUN_PISTOL]; break; + case I_AMMO: w = d->primweap; break; case I_GRENADE: w = d->weapons[GUN_GRENADE]; break; } if(w) w->onammopicked(); @@ -318,7 +318,7 @@ bool selectnextprimary(int num) { switch(num) { - case GUN_CPISTOL: +// case GUN_CPISTOL: case GUN_RIFLE: case GUN_SHOTGUN: case GUN_SUBGUN: diff --git a/source/src/entity.h b/source/src/entity.h index 3758c04c..7a4f7191 100644 --- a/source/src/entity.h +++ b/source/src/entity.h @@ -237,8 +237,8 @@ public: { switch(type) { - case I_CLIPS: { /*if (gunselect == GUN_CPISTOL) return ammostats[GUN_CPISTOL]; else*/ return ammostats[GUN_PISTOL]; } - case I_AMMO: { /*if (primary != GUN_CPISTOL)*/ return ammostats[primary]; /*else return *(itemstat *)0;*/ } + case I_CLIPS: { return ammostats[GUN_PISTOL]; } + case I_AMMO: { return ammostats[primary]; } case I_GRENADE: return ammostats[GUN_GRENADE]; case I_AKIMBO: return ammostats[GUN_AKIMBO]; case I_HEALTH: @@ -254,8 +254,8 @@ public: { switch(type) { - case I_CLIPS: return ammo[akimbo ? GUN_AKIMBO : (/*primary == GUN_CPISTOL ? GUN_CPISTOL : */GUN_PISTOL)]=NUMGUNS) break; + if(gunselect<0 || gunselect>=NUMGUNS || gunselect == GUN_CPISTOL) break; cl->state.gunselect = gunselect; QUEUE_MSG; break; @@ -2796,7 +2796,7 @@ void process(ENetPacket *packet, int sender, int chan) { int ls = getint(p), gunselect = getint(p); if((cl->state.state!=CS_ALIVE && cl->state.state!=CS_DEAD && cl->state.state!=CS_SPECTATE) || - ls!=cl->state.lifesequence || cl->state.lastspawn<0 || gunselect<0 || gunselect>=NUMGUNS) break; + ls!=cl->state.lifesequence || cl->state.lastspawn<0 || gunselect<0 || gunselect>=NUMGUNS || gunselect == GUN_CPISTOL) break; cl->state.lastspawn = -1; cl->state.spawn = gamemillis; cl->upspawnp = false; diff --git a/source/src/weapon.cpp b/source/src/weapon.cpp index 5433c945..ddf1b8b8 100644 --- a/source/src/weapon.cpp +++ b/source/src/weapon.cpp @@ -1147,7 +1147,7 @@ bool assaultrifle::selectable() { return weapon::selectable() && !m_noprimary && // combat pistol cpistol::cpistol(playerent *owner) : gun(owner, GUN_CPISTOL), bursting(false) {} -bool cpistol::selectable() { return weapon::selectable() && !m_noprimary && this == owner->primweap; } +bool cpistol::selectable() { return false; /*return weapon::selectable() && !m_noprimary && this == owner->primweap;*/ } void cpistol::onselecting() { weapon::onselecting(); bursting = false; } void cpistol::ondeselecting() { bursting = false; } bool cpistol::reload() @@ -1217,7 +1217,6 @@ bool cpistol::attack(vec &targ) // modded from gun::attack // FIXME else { gunwait = info.attackdelay; - burst = false; } mag--;