diff --git a/src/Camera.c b/src/Camera.c index 7e6d661c4..0a8d003eb 100644 --- a/src/Camera.c +++ b/src/Camera.c @@ -307,6 +307,8 @@ static void OnHacksChanged(void* obj) { void Camera_CycleActive(void) { struct LocalPlayer* p = &LocalPlayer_Instances[0]; + int cycle = 0; + if (Game_ClassicMode) return; Camera.Active = Camera.Active->next; @@ -315,7 +317,6 @@ void Camera_CycleActive(void) { } cam_isForwardThird = Camera.Active == &cam_ForwardThird; - int cycle = 0; if (Camera.Active == &cam_FirstPerson) cycle = 0; else if (Camera.Active == &cam_ThirdPerson) cycle = 1; else if (cam_isForwardThird) cycle = 2; diff --git a/src/Entity.c b/src/Entity.c index 2d414b592..082ac1687 100644 --- a/src/Entity.c +++ b/src/Entity.c @@ -802,6 +802,7 @@ static void LocalPlayers_OnNewMap(void) { static cc_bool LocalPlayer_IsSolidCollide(BlockID b) { return Blocks.Collide[b] == COLLIDE_SOLID; } static void LocalPlayer_DoRespawn(struct LocalPlayer* p) { + struct EntityLocation* prev; struct LocationUpdate update; struct AABB bb; Vec3 spawn = p->Spawn; @@ -830,7 +831,7 @@ static void LocalPlayer_DoRespawn(struct LocalPlayer* p) { } } - struct EntityLocation* prev = &p->Base.prev; + prev = &p->Base.prev; CPE_SendNotifyPositionAction(3, prev->pos.x, prev->pos.y, prev->pos.z); /* Adjust the position to be slightly above the ground, so that */ diff --git a/src/Platform.h b/src/Platform.h index ae5470539..f31dcdb9e 100644 --- a/src/Platform.h +++ b/src/Platform.h @@ -91,7 +91,7 @@ extern const struct UpdaterInfo { /* Number of compiled builds available for this platform */ int numBuilds; /* Metadata for the compiled builds available for this platform */ - const struct UpdaterBuild builds[2]; // TODO name and path + const struct UpdaterBuild builds[2]; /* TODO name and path */ } Updater_Info; /* Whether updating is supported by the platform */ extern cc_bool Updater_Supported; diff --git a/src/Platform_PS2.c b/src/Platform_PS2.c index 8efe0ddad..b7a499b2d 100644 --- a/src/Platform_PS2.c +++ b/src/Platform_PS2.c @@ -1,6 +1,7 @@ #include "Core.h" #if defined PLAT_PS2 +#define CC_XTEA_ENCRYPTION #define LIBCGLUE_SYS_SOCKET_ALIASES 0 #define LIBCGLUE_SYS_SOCKET_NO_ALIASES #define LIBCGLUE_ARPA_INET_NO_ALIASES diff --git a/src/Platform_Posix.c b/src/Platform_Posix.c index 1a2842f9a..c87f62d21 100644 --- a/src/Platform_Posix.c +++ b/src/Platform_Posix.c @@ -1320,14 +1320,16 @@ cc_bool DynamicLib_DescribeError(cc_string* dst) { *#########################################################################################################################*/ static void Platform_InitPosix(void) { struct sigaction sa = { 0 }; + cc_uintptr addr; sa.sa_handler = SIG_IGN; sigaction(SIGCHLD, &sa, NULL); /* So writing to closed socket doesn't raise SIGPIPE */ sigaction(SIGPIPE, &sa, NULL); - /* Log runtime address to ease investigating crashes */ - cc_uintptr addr = (cc_uintptr)Process_Exit; + /* Log runtime address of a known function to ease investigating crashes */ + /* (on platforms with ASLR, function addresses change every time when run) */ + addr = (cc_uintptr)Process_Exit; Platform_Log1("Process_Exit addr: %x", &addr); } void Platform_Free(void) { } diff --git a/src/Platform_Saturn.c b/src/Platform_Saturn.c index 7749c7b18..08419a60c 100644 --- a/src/Platform_Saturn.c +++ b/src/Platform_Saturn.c @@ -1,6 +1,7 @@ #include "Core.h" #if defined PLAT_SATURN +#define CC_XTEA_ENCRYPTION #include "_PlatformBase.h" #include "Stream.h" #include "ExtMath.h"