diff --git a/src/Camera.c b/src/Camera.c index c3488a57d..01534664b 100644 --- a/src/Camera.c +++ b/src/Camera.c @@ -228,7 +228,7 @@ static void HandleRawMouseMoved(void* obj, int idx, int deltaX, int deltaY) { static void Camera_CheckThirdPerson(void* obj) { struct HacksComp* h = &LocalPlayer_Instance.Hacks; - if (!h->CanUseThirdPersonCamera || !h->Enabled) Camera_CycleActive(); + if (!h->CanUseThirdPerson || !h->Enabled) Camera_CycleActive(); } void Camera_Init(void) { @@ -254,7 +254,7 @@ void Camera_CycleActive(void) { if (Game_ClassicMode) return; Camera.Active = Camera.Active->next; - if (!p->Hacks.CanUseThirdPersonCamera || !p->Hacks.Enabled) { + if (!p->Hacks.CanUseThirdPerson || !p->Hacks.Enabled) { Camera.Active = &cam_FirstPerson; } cam_isForwardThird = Camera.Active == &cam_ForwardThird; diff --git a/src/EntityComponents.c b/src/EntityComponents.c index e3c29f10a..9f4c446f4 100644 --- a/src/EntityComponents.c +++ b/src/EntityComponents.c @@ -149,7 +149,7 @@ static void HacksComp_SetAll(struct HacksComp* hacks, cc_bool allowed) { hacks->CanAnyHacks = allowed; hacks->CanFly = allowed; hacks->CanNoclip = allowed; hacks->CanRespawn = allowed; hacks->CanSpeed = allowed; hacks->CanPushbackBlocks = allowed; - hacks->CanUseThirdPersonCamera = allowed; + hacks->CanUseThirdPerson = allowed; } void HacksComp_Init(struct HacksComp* hacks) { @@ -249,11 +249,12 @@ void HacksComp_RecheckFlags(struct HacksComp* hacks) { HacksComp_SetAll(hacks, hax); hacks->CanBePushed = true; - HacksComp_ParseFlag(hacks, "+fly", "-fly", &hacks->CanFly); - HacksComp_ParseFlag(hacks, "+noclip", "-noclip", &hacks->CanNoclip); - HacksComp_ParseFlag(hacks, "+speed", "-speed", &hacks->CanSpeed); - HacksComp_ParseFlag(hacks, "+respawn", "-respawn", &hacks->CanRespawn); - HacksComp_ParseFlag(hacks, "+push", "-push", &hacks->CanBePushed); + HacksComp_ParseFlag(hacks, "+fly", "-fly", &hacks->CanFly); + HacksComp_ParseFlag(hacks, "+noclip", "-noclip", &hacks->CanNoclip); + HacksComp_ParseFlag(hacks, "+speed", "-speed", &hacks->CanSpeed); + HacksComp_ParseFlag(hacks, "+respawn", "-respawn", &hacks->CanRespawn); + HacksComp_ParseFlag(hacks, "+push", "-push", &hacks->CanBePushed); + HacksComp_ParseFlag(hacks, "+thirdperson", "-thirdperson", &hacks->CanUseThirdPerson); if (hacks->IsOp) HacksComp_ParseAllFlag(hacks, "+ophax", "-ophax"); hacks->BaseHorSpeed = HacksComp_ParseFlagFloat("horspeed=", hacks); diff --git a/src/EntityComponents.h b/src/EntityComponents.h index 4044df503..6aa53181b 100644 --- a/src/EntityComponents.h +++ b/src/EntityComponents.h @@ -47,7 +47,7 @@ struct HacksComp { /* Whether user has allowed hacks as an option. Note 'can use X' set by the server override this */ cc_bool Enabled; - cc_bool CanAnyHacks, CanUseThirdPersonCamera, CanSpeed, CanFly; + cc_bool CanAnyHacks, CanUseThirdPerson, CanSpeed, CanFly; cc_bool CanRespawn, CanNoclip, CanPushbackBlocks,CanSeeAllNames; cc_bool CanDoubleJump, CanBePushed; float BaseHorSpeed; diff --git a/src/Input.c b/src/Input.c index a6d8e50e9..2f0030041 100644 --- a/src/Input.c +++ b/src/Input.c @@ -806,7 +806,7 @@ static void CycleViewDistanceBackwards(const short* viewDists, int count) { cc_bool InputHandler_SetFOV(int fov) { struct HacksComp* h = &LocalPlayer_Instance.Hacks; - if (!h->Enabled || !h->CanUseThirdPersonCamera) return false; + if (!h->Enabled || !h->CanUseThirdPerson) return false; Game_ZoomFov = fov; Game_SetFov(fov); @@ -818,7 +818,7 @@ static cc_bool InputHandler_DoFovZoom(float deltaPrecise) { if (!KeyBind_IsPressed(KEYBIND_ZOOM_SCROLL)) return false; h = &LocalPlayer_Instance.Hacks; - if (!h->Enabled || !h->CanUseThirdPersonCamera) return false; + if (!h->Enabled || !h->CanUseThirdPerson) return false; if (input_fovIndex == -1.0f) input_fovIndex = (float)Game_ZoomFov; input_fovIndex -= deltaPrecise * 5.0f; @@ -829,7 +829,7 @@ static cc_bool InputHandler_DoFovZoom(float deltaPrecise) { static void InputHandler_CheckZoomFov(void* obj) { struct HacksComp* h = &LocalPlayer_Instance.Hacks; - if (!h->Enabled || !h->CanUseThirdPersonCamera) Game_SetFov(Game_DefaultFov); + if (!h->Enabled || !h->CanUseThirdPerson) Game_SetFov(Game_DefaultFov); } static cc_bool HandleBlockKey(int key) { diff --git a/src/Protocol.c b/src/Protocol.c index ed55ab831..8e7f0558d 100644 --- a/src/Protocol.c +++ b/src/Protocol.c @@ -1097,11 +1097,11 @@ static void CPE_HackControl(cc_uint8* data) { struct PhysicsComp* physics; int jumpHeight; - p->Hacks.CanFly = data[0] != 0; - p->Hacks.CanNoclip = data[1] != 0; - p->Hacks.CanSpeed = data[2] != 0; - p->Hacks.CanRespawn = data[3] != 0; - p->Hacks.CanUseThirdPersonCamera = data[4] != 0; + p->Hacks.CanFly = data[0] != 0; + p->Hacks.CanNoclip = data[1] != 0; + p->Hacks.CanSpeed = data[2] != 0; + p->Hacks.CanRespawn = data[3] != 0; + p->Hacks.CanUseThirdPerson = data[4] != 0; HacksComp_Update(&p->Hacks); jumpHeight = Stream_GetU16_BE(data + 5);