MCPcopy Create free account
hub / github.com/Panzerschrek/Chasm-Reverse / ClipCameraAngles

Method ClipCameraAngles

PanzerChasm/client/movement_controller.cpp:299–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297}
298
299void MovementController::ClipCameraAngles()
300{
301 const float max_ange_x=
302 is_old_style_perspective_
303 ? ( Constants::half_pi * 0.65f )
304 : Constants::half_pi;
305
306 if( angle_.z > Constants::two_pi ) angle_.z-= Constants::two_pi;
307 else if( angle_.z < 0.0f ) angle_.z+= Constants::two_pi;
308 if( angle_.x > max_ange_x ) angle_.x= max_ange_x;
309 else if( angle_.x < -max_ange_x ) angle_.x= -max_ange_x;
310}
311
312} // namespace ChasmReverse

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected