mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-23 20:52:16 +00:00
Fixed death cam.
This commit is contained in:
parent
b50af1df78
commit
6ca865580a
2 changed files with 6 additions and 5 deletions
|
@ -2671,6 +2671,9 @@ void CG_Player(centity_t * cent)
|
||||||
{
|
{
|
||||||
memcpy(cg.headAxis, head.axis, sizeof(head.axis));
|
memcpy(cg.headAxis, head.axis, sizeof(head.axis));
|
||||||
memcpy(cg.headPos, head.origin, sizeof(head.origin));
|
memcpy(cg.headPos, head.origin, sizeof(head.origin));
|
||||||
|
cg.headPos[2] += 16;
|
||||||
|
if (cg.snap->ps.stats[STAT_HEALTH] > 0)
|
||||||
|
memcpy(cg.oldHeadPos, cg.headPos, sizeof(cg.headPos));
|
||||||
}
|
}
|
||||||
|
|
||||||
head.shadowPlane = shadowPlane;
|
head.shadowPlane = shadowPlane;
|
||||||
|
|
|
@ -442,23 +442,21 @@ void CG_PositionRotatedEntityOnTag(refEntity_t * entity, const refEntity_t * par
|
||||||
*/
|
*/
|
||||||
static void CG_DeadPlayerView()
|
static void CG_DeadPlayerView()
|
||||||
{
|
{
|
||||||
if (cg.renderingThirdPerson)
|
if (cg.renderingThirdPerson || 0 != (cg.snap->ps.eFlags & EF_HEADLESS))
|
||||||
{
|
{
|
||||||
cg.refdefViewAngles[ROLL] = 40;
|
cg.refdefViewAngles[ROLL] = 40;
|
||||||
cg.refdefViewAngles[PITCH] = -15;
|
cg.refdefViewAngles[PITCH] = -15;
|
||||||
cg.refdefViewAngles[YAW] = cg.snap->ps.stats[STAT_DEAD_YAW];
|
cg.refdefViewAngles[YAW] = cg.snap->ps.stats[STAT_DEAD_YAW];
|
||||||
cg.refdef.vieworg[2] += cg.predictedPlayerState.viewheight;
|
cg.refdef.vieworg[2] += cg.predictedPlayerState.viewheight;
|
||||||
} else {
|
} else {
|
||||||
vec3_t dir;
|
|
||||||
trace_t tr;
|
trace_t tr;
|
||||||
|
|
||||||
memcpy(cg.refdef.vieworg, cg.headPos, sizeof(cg.headPos));
|
memcpy(cg.refdef.vieworg, cg.headPos, sizeof(cg.headPos));
|
||||||
memcpy(cg.refdef.viewaxis, cg.headAxis, sizeof(cg.headAxis));
|
memcpy(cg.refdef.viewaxis, cg.headAxis, sizeof(cg.headAxis));
|
||||||
cg.refdef.vieworg[2] += 16;
|
|
||||||
|
|
||||||
VectorSubtract(cg.refdef.vieworg, cg.oldHeadPos, dir);
|
|
||||||
CG_Trace(&tr, cg.oldHeadPos, NULL, NULL, cg.refdef.vieworg, cg.clientNum, CONTENTS_SOLID);
|
CG_Trace(&tr, cg.oldHeadPos, NULL, NULL, cg.refdef.vieworg, cg.clientNum, CONTENTS_SOLID);
|
||||||
VectorCopy(tr.endpos, cg.refdef.vieworg);
|
VectorCopy(tr.endpos, cg.refdef.vieworg);
|
||||||
VectorCopy(cg.refdef.vieworg, cg.oldHeadPos);
|
VectorCopy(cg.headPos, cg.oldHeadPos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue