MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / LocalPlayer_HandleFly

Function LocalPlayer_HandleFly

src/Entity.c:949–961  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

947}
948
949static cc_bool LocalPlayer_HandleFly(int key, struct InputDevice* device) {
950 struct LocalPlayer* p = &LocalPlayer_Instances[device->mappedIndex];
951 if (Gui.InputGrab) return false;
952
953 if (p->Hacks.CanFly && p->Hacks.Enabled) {
954 HacksComp_SetFlying(&p->Hacks, !p->Hacks.Flying);
955 return true;
956 } else if (!p->_warnedFly) {
957 p->_warnedFly = true;
958 if (hackPermMsgs) Chat_AddRaw("&cFlying is currently disabled");
959 }
960 return false;
961}
962
963static cc_bool LocalPlayer_HandleNoclip(int key, struct InputDevice* device) {
964 struct LocalPlayer* p = &LocalPlayer_Instances[device->mappedIndex];

Callers

nothing calls this directly

Calls 2

HacksComp_SetFlyingFunction · 0.85
Chat_AddRawFunction · 0.85

Tested by

no test coverage detected