| 1042 | VARP(righthanded, 0, 1, 1); // flowtron 20090727 |
| 1043 | |
| 1044 | void weapon::renderhudmodel(int lastaction, int index) |
| 1045 | { |
| 1046 | playerent *p = owner; |
| 1047 | vec unitv; |
| 1048 | float dist = worldpos.dist(p->o, unitv); |
| 1049 | unitv.div(dist); |
| 1050 | |
| 1051 | weaponmove wm; |
| 1052 | if(!intermission || !ispaused) wm.calcmove(unitv, lastaction, p); |
| 1053 | defformatstring(path)("weapons/%s", info.modelname); |
| 1054 | bool emit = (wm.anim&ANIM_INDEX)==ANIM_GUN_SHOOT && (lastmillis - lastaction) < flashtime(); |
| 1055 | rendermodel(path, wm.anim|ANIM_DYNALLOC|(righthanded==index ? ANIM_MIRROR : 0)|(emit ? ANIM_PARTICLE : 0), 0, -1, wm.pos, 0, p->yaw+90, p->pitch+wm.k_rot, 40.0f, wm.basetime, NULL, NULL, 1.28f); |
| 1056 | } |
| 1057 | |
| 1058 | void weapon::updatetimers(int millis) |
| 1059 | { |
no test coverage detected