| 693 | } |
| 694 | |
| 695 | static void LocalPlayer_HandleInput(struct LocalPlayer* p, float* xMoving, float* zMoving) { |
| 696 | struct HacksComp* hacks = &p->Hacks; |
| 697 | struct LocalPlayerInput* input; |
| 698 | if (Gui.InputGrab) return; |
| 699 | |
| 700 | /* keyboard input, touch, joystick, etc */ |
| 701 | for (input = sources_head; input; input = input->next) { |
| 702 | input->GetMovement(p, xMoving, zMoving); |
| 703 | } |
| 704 | *xMoving *= 0.98f; |
| 705 | *zMoving *= 0.98f; |
| 706 | |
| 707 | if (hacks->WOMStyleHacks && hacks->Enabled && hacks->CanNoclip) { |
| 708 | if (hacks->Noclip) { |
| 709 | /* need a { } block because it's a macro */ |
| 710 | Vec3_Set(p->Base.Velocity, 0,0,0); |
| 711 | } |
| 712 | HacksComp_SetNoclip(hacks, hacks->_noclipping); |
| 713 | } |
| 714 | } |
| 715 | |
| 716 | static void LocalPlayer_SetLocation(struct Entity* e, struct LocationUpdate* update) { |
| 717 | struct LocalPlayer* p = (struct LocalPlayer*)e; |
no test coverage detected