Players now only get their YAW adjusted when sitting on a rotating entity.

This commit is contained in:
Andrei Drexler 2011-03-23 16:36:08 +00:00
parent 50f6027d24
commit 43abda6afa

View file

@ -750,9 +750,15 @@ void CG_PredictPlayerState(void)
vec3_t adjusted;
//Makro - made it so that angles get adjusted, too
CG_AdjustPositionForMover(cg.predictedPlayerState.origin,
cg.predictedPlayerState.groundEntityNum, cg.physicsTime,
cg.oldTime, adjusted, cg.predictedPlayerState.viewangles);
{
vec3_t angles;
VectorCopy(cg.predictedPlayerState.viewangles, angles);
CG_AdjustPositionForMover(cg.predictedPlayerState.origin,
cg.predictedPlayerState.groundEntityNum, cg.physicsTime,
cg.oldTime, adjusted, angles);
// only YAW for players, though
cg.predictedPlayerState.viewangles[YAW] = angles[YAW];
}
if (cg_showmiss.integer) {
if (!VectorCompare(oldPlayerState.origin, adjusted)) {
@ -855,9 +861,15 @@ void CG_PredictPlayerState(void)
}
// adjust for the movement of the groundentity
//Makro - made it so that angles get adjusted, too
CG_AdjustPositionForMover(cg.predictedPlayerState.origin,
cg.predictedPlayerState.groundEntityNum,
cg.physicsTime, cg.time, cg.predictedPlayerState.origin, cg.predictedPlayerState.viewangles);
{
vec3_t angles;
VectorCopy(cg.predictedPlayerState.viewangles, angles);
CG_AdjustPositionForMover(cg.predictedPlayerState.origin,
cg.predictedPlayerState.groundEntityNum,
cg.physicsTime, cg.time, cg.predictedPlayerState.origin, angles);
// only YAW for players, though
cg.predictedPlayerState.viewangles[YAW] = angles[YAW];
}
if (cg_showmiss.integer) {
if (cg.predictedPlayerState.eventSequence > oldPlayerState.eventSequence + MAX_PS_EVENTS) {