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

Function updatecrouch

source/src/physics.cpp:869–877  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

867}
868
869void updatecrouch(playerent *p, bool on)
870{
871 if(p->crouching == on) return;
872 if(p->state == CS_EDITING) return; // don't apply regular crouch physics in editfly
873 const float crouchspeed = 0.6f;
874 p->crouching = on;
875 p->eyeheightvel = on ? -crouchspeed : crouchspeed;
876 if(p==player1) audiomgr.playsoundc(on ? S_CROUCH : S_UNCROUCH);
877}
878
879void crouch(bool on)
880{

Callers 2

moveplayerFunction · 0.85
parsepositionsFunction · 0.85

Calls 1

playsoundcMethod · 0.80

Tested by

no test coverage detected