| 867 | } |
| 868 | |
| 869 | void 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 | |
| 879 | void crouch(bool on) |
| 880 | { |
no test coverage detected