Merge pull request #209 from AruMoon/fix-angles
fix spectator free mode wrong angles
This commit is contained in:
commit
5e6e7503bb
@ -2615,9 +2615,9 @@ void CBasePlayer::JumptoPosition(const Vector &origin, const QAngle &angles)
|
|||||||
neworigin.y = clamp( origin.y, MIN_COORD_FLOAT, MAX_COORD_FLOAT );
|
neworigin.y = clamp( origin.y, MIN_COORD_FLOAT, MAX_COORD_FLOAT );
|
||||||
neworigin.z = clamp( origin.z, MIN_COORD_FLOAT, MAX_COORD_FLOAT );
|
neworigin.z = clamp( origin.z, MIN_COORD_FLOAT, MAX_COORD_FLOAT );
|
||||||
|
|
||||||
newangles.x = clamp( newangles.x, MIN_COORD_FLOAT, MAX_COORD_FLOAT );
|
newangles.x = clamp( angles.x, MIN_COORD_FLOAT, MAX_COORD_FLOAT );
|
||||||
newangles.y = clamp( newangles.y, MIN_COORD_FLOAT, MAX_COORD_FLOAT );
|
newangles.y = clamp( angles.y, MIN_COORD_FLOAT, MAX_COORD_FLOAT );
|
||||||
newangles.z = clamp( newangles.z, MIN_COORD_FLOAT, MAX_COORD_FLOAT ); // not clamped in original valve's code, idk why
|
newangles.z = clamp( angles.z, MIN_COORD_FLOAT, MAX_COORD_FLOAT ); // not clamped in original valve's code, idk why
|
||||||
|
|
||||||
SetAbsOrigin( neworigin );
|
SetAbsOrigin( neworigin );
|
||||||
SetAbsVelocity( vec3_origin ); // stop movement
|
SetAbsVelocity( vec3_origin ); // stop movement
|
||||||
@ -9373,4 +9373,4 @@ uint64 CBasePlayer::GetSteamIDAsUInt64( void )
|
|||||||
return steamIDForPlayer.ConvertToUint64();
|
return steamIDForPlayer.ConvertToUint64();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif // NO_STEAM
|
#endif // NO_STEAM
|
||||||
|
Loading…
Reference in New Issue
Block a user