From b27dbf8f937f307f72f903b7b9913e76a8b2017b Mon Sep 17 00:00:00 2001 From: driAn Date: Mon, 15 Jan 2007 23:56:54 +0000 Subject: [PATCH] no message git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@821 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/md2.h | 12 ++++++++++++ source/src/weapon.cpp | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/source/src/md2.h b/source/src/md2.h index 12b2ce45..f95d5092 100644 --- a/source/src/md2.h +++ b/source/src/md2.h @@ -183,6 +183,18 @@ struct md2 : vertmodel parts[0]->render(anim, varseed, speed, basetime, d); glPopMatrix(); + if(d) + { + glPushMatrix(); + glTranslatef(x, y, z); + glRotatef(yaw+180, 0, -1, 0); + glRotatef(90, -1, 0, 0); + GLUquadricObj *bb = gluNewQuadric(); + gluQuadricDrawStyle(bb, GLU_LINE); + gluCylinder(bb, d->radius, d->radius, d->eyeheight + d->aboveeye, 12, 1); + glPopMatrix(); + } + if(vwepmdl) { ((md2 *)vwepmdl)->parts[0]->index = parts.length(); diff --git a/source/src/weapon.cpp b/source/src/weapon.cpp index 1579319c..1312ee17 100644 --- a/source/src/weapon.cpp +++ b/source/src/weapon.cpp @@ -496,7 +496,8 @@ void raydamage(vec &from, vec &to, playerent *d) else if((o = intersectclosest(from, to, i, d))) { playerent head = *o; // check headshot - head.eyeheight = head.aboveeye/3; + head.eyeheight = head.aboveeye/4; + head.radius = 2; if(d->gunselect == GUN_SNIPER && intersect(&head, from, to)) gdam = guns[d->gunselect].damage * 3; hitpush(i, gdam, o, d, from, to);