diff --git a/nq/source/cl_view.c b/nq/source/cl_view.c index d21f267b1..c82b495ca 100644 --- a/nq/source/cl_view.c +++ b/nq/source/cl_view.c @@ -516,8 +516,8 @@ idle_quat (vec4f_t axis, cvar_t *cycle, cvar_t *level) } float scale = sin (cl.time * cycle->value); float ang = scale * level->value * v_idlescale->value; - float c = cos (ang); - float s = sin (ang); + float c = cos (ang * M_PI / 360); + float s = sin (ang * M_PI / 360); return axis * s + identity * c; } @@ -578,14 +578,18 @@ V_CalcViewRoll (void) static void V_CalcIntermissionRefdef (void) { + // ent is the player model (visible when out of body) + entity_t *ent = &cl_entities[cl.viewentity]; entity_t *view; float old; + vec4f_t origin = Transform_GetWorldPosition (ent->transform); + vec4f_t rotation = Transform_GetWorldRotation (ent->transform); // view is the weapon model (visible only from inside body) view = &cl.viewent; - r_data->refdef->viewposition = cl.viewstate.origin; - AngleQuat (cl.viewstate.angles, &r_data->refdef->viewrotation[0]);//FIXME + r_data->refdef->viewposition = origin; + r_data->refdef->viewrotation = rotation; view->renderer.model = NULL; // always idle in intermission diff --git a/qw/source/cl_view.c b/qw/source/cl_view.c index 0da8c09cc..cf6a51251 100644 --- a/qw/source/cl_view.c +++ b/qw/source/cl_view.c @@ -580,14 +580,18 @@ V_CalcViewRoll (void) static void V_CalcIntermissionRefdef (void) { + entity_t *ent = &cl_entities[cl.viewentity]; entity_t *view; float old; + vec4f_t origin = Transform_GetWorldPosition (ent->transform); + vec4f_t rotation = Transform_GetWorldRotation (ent->transform); // view is the weapon model (visible only from inside body) view = &cl.viewent; - r_data->refdef->viewposition = cl.viewstate.origin; - AngleQuat (cl.viewstate.angles, &r_data->refdef->viewrotation[0]);//FIXME + r_data->refdef->viewposition = origin; + r_data->refdef->viewrotation = rotation; + view->renderer.model = NULL; view->renderer.model = NULL; // always idle in intermission