mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 18:01:15 +00:00
[nq,qw] Reset view animation pose when model changes
I think this bug has been haunting us since we introduced lerping. I do remember chasing bad pose indices 20 years ago and never finding the cause. I guess we never thought to check the view model.
This commit is contained in:
parent
740c70ba2c
commit
4dc2e6cac2
2 changed files with 11 additions and 4 deletions
|
@ -661,7 +661,11 @@ V_CalcRefdef (void)
|
|||
origin += (vec4f_t) { 0, 0, 0.5, 0};
|
||||
}
|
||||
|
||||
view->renderer.model = cl.model_precache[cl.stats[STAT_WEAPON]];
|
||||
model_t *model = cl.model_precache[cl.stats[STAT_WEAPON]];
|
||||
if (view->renderer.model != model) {
|
||||
view->animation.pose2 = -1;
|
||||
}
|
||||
view->renderer.model = model;
|
||||
view->animation.frame = cl.stats[STAT_WEAPONFRAME];
|
||||
view->renderer.skin = 0;
|
||||
|
||||
|
|
|
@ -663,11 +663,14 @@ V_CalcRefdef (void)
|
|||
origin += (vec4f_t) { 0, 0, 0.5, 0};
|
||||
}
|
||||
|
||||
model_t *model = cl.model_precache[cl.stats[STAT_WEAPON]];
|
||||
if (cl.viewstate.flags & (VF_GIB | VF_DEAD)) {
|
||||
view->renderer.model = NULL;
|
||||
} else {
|
||||
view->renderer.model = cl.model_precache[cl.stats[STAT_WEAPON]];
|
||||
model = NULL;
|
||||
}
|
||||
if (view->renderer.model != model) {
|
||||
view->animation.pose2 = -1;
|
||||
}
|
||||
view->renderer.model = model;
|
||||
view->animation.frame = cl.viewstate.weaponframe;
|
||||
view->renderer.skin = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue