diff --git a/ChaosMod/Components/SplashTexts.h b/ChaosMod/Components/SplashTexts.h index 0c26de77e..2c2e747ff 100644 --- a/ChaosMod/Components/SplashTexts.h +++ b/ChaosMod/Components/SplashTexts.h @@ -7,7 +7,6 @@ #include #include - class SplashTexts : public Component { private: diff --git a/ChaosMod/Effects/db/Misc/MiscMuffledAudio.cpp b/ChaosMod/Effects/db/Misc/MiscMuffledAudio.cpp index 295c29765..a2c31340a 100644 --- a/ChaosMod/Effects/db/Misc/MiscMuffledAudio.cpp +++ b/ChaosMod/Effects/db/Misc/MiscMuffledAudio.cpp @@ -1,5 +1,5 @@ /* - Effect By Rylxnd + Effect By Rylxnd */ #include diff --git a/ChaosMod/Effects/db/Peds/PedsGiveProps.cpp b/ChaosMod/Effects/db/Peds/PedsGiveProps.cpp index 65d6d8c97..a6cbf0b5b 100644 --- a/ChaosMod/Effects/db/Peds/PedsGiveProps.cpp +++ b/ChaosMod/Effects/db/Peds/PedsGiveProps.cpp @@ -1,5 +1,5 @@ /* - Effect By Rylxnd + Effect By Rylxnd */ #include diff --git a/ChaosMod/Effects/db/Peds/PedsReflectiveDamage.cpp b/ChaosMod/Effects/db/Peds/PedsReflectiveDamage.cpp index ed17d607d..d92cd98fb 100644 --- a/ChaosMod/Effects/db/Peds/PedsReflectiveDamage.cpp +++ b/ChaosMod/Effects/db/Peds/PedsReflectiveDamage.cpp @@ -1,5 +1,5 @@ /* - Effect By Rylxnd + Effect By Rylxnd */ #include diff --git a/ChaosMod/Effects/db/Screen/ScreenRealFirstPerson.cpp b/ChaosMod/Effects/db/Screen/ScreenRealFirstPerson.cpp index 576fa7c2f..c93d2be9c 100644 --- a/ChaosMod/Effects/db/Screen/ScreenRealFirstPerson.cpp +++ b/ChaosMod/Effects/db/Screen/ScreenRealFirstPerson.cpp @@ -10,7 +10,7 @@ static int state = 0; static bool SafetyCheck() { Ped playerPed = PLAYER_PED_ID(); - //Removes camera on player switch, death, and potential non-existence + // Removes camera on player switch, death, and potential non-existence if (IS_PLAYER_SWITCH_IN_PROGRESS() || IS_PLAYER_DEAD(PLAYER_ID()) || !ENTITY::DOES_ENTITY_EXIST(playerPed) || !ENTITY::IS_ENTITY_VISIBLE(playerPed)) { @@ -19,7 +19,7 @@ static bool SafetyCheck() return false; } -//OnStart and OnStop code moved to separate functions at Rylxnd's request +// OnStart and OnStop code moved to separate functions at Rylxnd's request static void RemoveCamera() { RENDER_SCRIPT_CAMS(false, false, 0, true, false, 0); @@ -35,8 +35,8 @@ static void SetupCamera() { Ped playerPed = PLAYER_PED_ID(); Vector3 boneCoords = GET_PED_BONE_COORDS(playerPed, 0x322c, 0, 0, 0); - eCamera = CREATE_CAM_WITH_PARAMS("DEFAULT_SCRIPTED_CAMERA", boneCoords.x, boneCoords.y, boneCoords.z, 0, 0, 0, 60, - false, 2); + eCamera = CREATE_CAM_WITH_PARAMS("DEFAULT_SCRIPTED_CAMERA", boneCoords.x, boneCoords.y, boneCoords.z, 0, 0, 0, 60, + false, 2); ATTACH_CAM_TO_PED_BONE(eCamera, playerPed, 31086, 0, 0, 0, 0); SET_CAM_NEAR_CLIP(eCamera, 0.2); @@ -55,44 +55,45 @@ static void OnStop() static void OnTick() { - //SafetyCheck() checks for potential situations where the camera could become stuck and the switch statement below handles things if SafetyCheck is triggered. + // SafetyCheck() checks for potential situations where the camera could become stuck and the switch statement below + // handles things if SafetyCheck is triggered. switch (state) { - //Normal operation - case 0: - if (SafetyCheck()) - { - RemoveCamera(); - state = 1; - break; - } + // Normal operation + case 0: + if (SafetyCheck()) + { + RemoveCamera(); + state = 1; + break; + } - RENDER_SCRIPT_CAMS(true, false, 0, true, false, 0); - SET_CAM_ACTIVE(eCamera, true); - CAN_SET_EXIT_STATE_FOR_CAMERA(false); - STOP_CUTSCENE_CAM_SHAKING(); + RENDER_SCRIPT_CAMS(true, false, 0, true, false, 0); + SET_CAM_ACTIVE(eCamera, true); + CAN_SET_EXIT_STATE_FOR_CAMERA(false); + STOP_CUTSCENE_CAM_SHAKING(); - //Rotate camera toward aiming point, otherwise use bone rotation - if (IS_PLAYER_FREE_AIMING(PLAYER_ID())) - { - Vector3 gameCamRot = GET_GAMEPLAY_CAM_ROT(2); - SET_CAM_ROT(eCamera, gameCamRot.x, gameCamRot.y, gameCamRot.z, 2); - } - else - { - Ped playerPed = PLAYER_PED_ID(); - Vector3 boneRot = _GET_ENTITY_BONE_ROTATION(playerPed, GET_PED_BONE_INDEX(playerPed, 0x796e)); - SET_CAM_ROT(eCamera, boneRot.x, boneRot.y+90, boneRot.z, 2); - } - break; - //Recovery - case 1: - if (!SafetyCheck()) - { - state = 0; - SetupCamera(); - } - break; + // Rotate camera toward aiming point, otherwise use bone rotation + if (IS_PLAYER_FREE_AIMING(PLAYER_ID())) + { + Vector3 gameCamRot = GET_GAMEPLAY_CAM_ROT(2); + SET_CAM_ROT(eCamera, gameCamRot.x, gameCamRot.y, gameCamRot.z, 2); + } + else + { + Ped playerPed = PLAYER_PED_ID(); + Vector3 boneRot = _GET_ENTITY_BONE_ROTATION(playerPed, GET_PED_BONE_INDEX(playerPed, 0x796e)); + SET_CAM_ROT(eCamera, boneRot.x, boneRot.y + 90, boneRot.z, 2); + } + break; + // Recovery + case 1: + if (!SafetyCheck()) + { + state = 0; + SetupCamera(); + } + break; } } diff --git a/ChaosMod/Effects/db/Screen/Shaders/ScreenShaderHueShift.cpp b/ChaosMod/Effects/db/Screen/Shaders/ScreenShaderHueShift.cpp index 3105785f0..57ad30fe7 100644 --- a/ChaosMod/Effects/db/Screen/Shaders/ScreenShaderHueShift.cpp +++ b/ChaosMod/Effects/db/Screen/Shaders/ScreenShaderHueShift.cpp @@ -45,7 +45,7 @@ static void OnStop() Hooks::ResetShader(); } -//clang-format off +// clang-format off REGISTER_EFFECT(OnStart, OnStop, nullptr, EffectInfo { .Name = "Hue Shift", diff --git a/ChaosMod/Util/Logging.h b/ChaosMod/Util/Logging.h index 3807f2d47..f7c180ebe 100644 --- a/ChaosMod/Util/Logging.h +++ b/ChaosMod/Util/Logging.h @@ -53,8 +53,7 @@ inline const auto g_ModStartTime = std::time(nullptr); slashPos = fileName.find_last_of("/"); \ fileName = fileName.substr(slashPos != fileName.npos ? slashPos + 1 : 0); \ return fileName; \ - } \ - (); \ + }(); \ COLOR_PREFIX_LOG("(" << fileName << ")", _text); \ } while (0)