From: Mario Date: Mon, 8 Aug 2016 11:16:57 +0000 (+1000) Subject: Allow melee while crouching (the technical limitation preventing this before no longe... X-Git-Tag: xonotic-v0.8.2~733 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2d338f2c2457f27336f8e68790797225592d31c2;p=xonotic%2Fxonotic-data.pk3dir.git Allow melee while crouching (the technical limitation preventing this before no longer exists, disallowing it is unintuitive) --- diff --git a/qcsrc/common/physics/player.qc b/qcsrc/common/physics/player.qc index 9341f1b2b..6823c2963 100644 --- a/qcsrc/common/physics/player.qc +++ b/qcsrc/common/physics/player.qc @@ -134,10 +134,6 @@ void PM_ClientMovement_UpdateStatus(entity this) do_crouch = false; if(STAT(FROZEN, this)) do_crouch = false; - if((activeweapon.spawnflags & WEP_TYPE_MELEE_PRI) && viewmodel.animstate_startframe == viewmodel.anim_fire1_x && time < viewmodel.weapon_nextthink) - do_crouch = false; - if((activeweapon.spawnflags & WEP_TYPE_MELEE_SEC) && viewmodel.animstate_startframe == viewmodel.anim_fire2_x && time < viewmodel.weapon_nextthink) - do_crouch = false; if (do_crouch) { diff --git a/qcsrc/common/weapons/weapon/shockwave.qc b/qcsrc/common/weapons/weapon/shockwave.qc index f143bd1cc..f8f41f1b4 100644 --- a/qcsrc/common/weapons/weapon/shockwave.qc +++ b/qcsrc/common/weapons/weapon/shockwave.qc @@ -718,7 +718,6 @@ METHOD(Shockwave, wr_think, void(entity thiswep, entity actor, .entity weaponent else if(fire & 2) { //if(actor.clip_load >= 0) // we are not currently reloading - if(!actor.crouch) // no crouchmelee please if(weapon_prepareattack(thiswep, actor, weaponentity, true, WEP_CVAR(shockwave, melee_refire))) { // attempt forcing playback of the anim by switching to another anim (that we never play) here... diff --git a/qcsrc/common/weapons/weapon/shotgun.qc b/qcsrc/common/weapons/weapon/shotgun.qc index b03c6fb4d..d8de5ee0f 100644 --- a/qcsrc/common/weapons/weapon/shotgun.qc +++ b/qcsrc/common/weapons/weapon/shotgun.qc @@ -270,7 +270,6 @@ METHOD(Shotgun, wr_think, void(entity thiswep, entity actor, .entity weaponentit } } if(actor.clip_load >= 0) // we are not currently reloading - if(!actor.crouch) // no crouchmelee please if(WEP_CVAR(shotgun, secondary) == 1) if(((fire & 1) && actor.(thiswep.ammo_field) <= 0 && !(actor.items & IT_UNLIMITED_WEAPON_AMMO)) || (fire & 2)) if(weapon_prepareattack(thiswep, actor, weaponentity, true, WEP_CVAR_SEC(shotgun, refire))) diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index b9ada9722..a1e6c7cca 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -2329,7 +2329,6 @@ void PlayerPreThink (entity this) this.prevorigin = this.origin; bool do_crouch = PHYS_INPUT_BUTTON_CROUCH(this); - .entity weaponentity = weaponentities[0]; // TODO: unhardcode if (this.hook.state) { do_crouch = false; } else if (this.waterlevel >= WATERLEVEL_SWIMMING) { @@ -2338,10 +2337,6 @@ void PlayerPreThink (entity this) do_crouch = false; } else if (STAT(FROZEN, this)) { do_crouch = false; - } else if ((PS(this).m_weapon.spawnflags & WEP_TYPE_MELEE_PRI) && this.(weaponentity).wframe == WFRAME_FIRE1 && time < this.(weaponentity).weapon_nextthink) { - do_crouch = false; - } else if ((PS(this).m_weapon.spawnflags & WEP_TYPE_MELEE_SEC) && this.(weaponentity).wframe == WFRAME_FIRE2 && time < this.(weaponentity).weapon_nextthink) { - do_crouch = false; } if (do_crouch) {