MCPcopy Create free account
hub / github.com/assaultcube/AC / fixcamerarange

Function fixcamerarange

source/src/physics.cpp:893–899  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

891COMMAND(crouch, "d");
892
893void fixcamerarange(physent *cam)
894{
895 if(cam->pitch>MAXPITCH) cam->pitch = MAXPITCH;
896 if(cam->pitch<-MAXPITCH) cam->pitch = -MAXPITCH;
897 while(cam->yaw<0.0f) cam->yaw += 360.0f;
898 while(cam->yaw>=360.0f) cam->yaw -= 360.0f;
899}
900
901FVARP(sensitivity, 1e-3f, 3.0f, 1000.0f); // general mouse sensitivity ("unscoped")
902FVARP(scopesens, 0, 0, 1000); // scoped mouse sensitivity (if zero, autoscopesens determines, how sensitivity is changed during scoping)

Callers 2

moveplayerFunction · 0.85
mousemoveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected