From a033b1553556bf436004b85a37a3e962ab242c84 Mon Sep 17 00:00:00 2001 From: flowtron Date: Mon, 27 Jul 2009 19:55:53 +0000 Subject: [PATCH] allow players to be left-handed in trunk too git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4589 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/rendermodel.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/src/rendermodel.cpp b/source/src/rendermodel.cpp index d78c6d77..3084c62e 100644 --- a/source/src/rendermodel.cpp +++ b/source/src/rendermodel.cpp @@ -336,12 +336,23 @@ void endmodelbatches(bool flush) } VAR(dbgmbatch, 0, 0, 1); +VARP(playerisrighthanded, 0, 1, 1); // flowtron 20090727 void rendermodel(const char *mdl, int anim, int tex, float rad, const vec &o, float yaw, float pitch, float speed, int basetime, playerent *d, modelattach *a, float scale) { model *m = loadmodel(mdl); if(!m || (stenciling && (m->shadowdist <= 0 || anim&ANIM_TRANSLUCENT))) return; + if(playerisrighthanded == 0) // flowtron 20090727 + { + bool isagun = ((anim&ANIM_GUN_IDLE) || (anim&ANIM_GUN_RELOAD) || (anim&ANIM_GUN_SHOOT) || (anim&ANIM_GUN_THROW)); + if(isagun) + { + if(anim&ANIM_MIRROR) anim &= ~ANIM_MIRROR; + else anim |= ANIM_MIRROR; + } + } + if(rad >= 0) { if(!rad) rad = m->radius;