| 1258 | } |
| 1259 | |
| 1260 | static void CPE_HackControl(cc_uint8* data) { |
| 1261 | struct LocalPlayer* p = Entities.CurPlayer; |
| 1262 | int jumpHeight; |
| 1263 | |
| 1264 | p->Hacks.CanFly = data[0] != 0; |
| 1265 | p->Hacks.CanNoclip = data[1] != 0; |
| 1266 | p->Hacks.CanSpeed = data[2] != 0; |
| 1267 | p->Hacks.CanRespawn = data[3] != 0; |
| 1268 | p->Hacks.CanUseThirdPerson = data[4] != 0; |
| 1269 | HacksComp_Update(&p->Hacks); |
| 1270 | jumpHeight = Stream_GetU16_BE(data + 5); |
| 1271 | |
| 1272 | if (jumpHeight == UInt16_MaxValue) { /* special value of -1 to reset default */ |
| 1273 | LocalPlayer_ResetJumpVelocity(p); |
| 1274 | } else { |
| 1275 | p->Physics.JumpVel = PhysicsComp_CalcJumpVelocity(jumpHeight / 32.0f); |
| 1276 | p->Physics.ServerJumpVel = p->Physics.JumpVel; |
| 1277 | } |
| 1278 | } |
| 1279 | |
| 1280 | static void CPE_ExtAddEntity2(cc_uint8* data) { |
| 1281 | cc_string name, skin; |
nothing calls this directly
no test coverage detected