diff --git a/mods/hide-and-seek.lua b/mods/hide-and-seek.lua index 67a8b0f7..ccc617c1 100644 --- a/mods/hide-and-seek.lua +++ b/mods/hide-and-seek.lua @@ -144,7 +144,11 @@ function update() end -- check if local player is camping - camping_detection(gMarioStates[0]) + if gGlobalSyncTable.roundEnded == 0 then + camping_detection(gMarioStates[0]) + else + sDistanceTimer = 0 + end -- update sLastSeekerTimer if gGlobalSyncTable.roundEnded == 0 then diff --git a/src/pc/djui/djui_base.h b/src/pc/djui/djui_base.h index 61b2f1dc..197f5923 100644 --- a/src/pc/djui/djui_base.h +++ b/src/pc/djui/djui_base.h @@ -1,7 +1,6 @@ #pragma once #include "djui.h" -#pragma pack(1) struct DjuiBaseRect { f32 x; f32 y; @@ -9,13 +8,11 @@ struct DjuiBaseRect { f32 height; }; -#pragma pack(1) struct DjuiBaseChild { struct DjuiBase* base; struct DjuiBaseChild* next; }; -#pragma pack(1) struct DjuiBasePadding { struct DjuiScreenValue top; struct DjuiScreenValue right; @@ -23,7 +20,6 @@ struct DjuiBasePadding { struct DjuiScreenValue left; }; -#pragma pack(1) struct DjuiBase { struct DjuiBase* parent; struct DjuiBaseChild* child; diff --git a/src/pc/djui/djui_bind.h b/src/pc/djui/djui_bind.h index cc09062c..115b9829 100644 --- a/src/pc/djui/djui_bind.h +++ b/src/pc/djui/djui_bind.h @@ -2,7 +2,6 @@ #include "djui.h" #include "src/pc/configfile.h" -#pragma pack(1) struct DjuiBind { struct DjuiBase base; struct DjuiText* text; diff --git a/src/pc/djui/djui_button.h b/src/pc/djui/djui_button.h index c0c99f11..af3aaffa 100644 --- a/src/pc/djui/djui_button.h +++ b/src/pc/djui/djui_button.h @@ -1,7 +1,6 @@ #pragma once #include "djui.h" -#pragma pack(1) struct DjuiButton { struct DjuiBase base; struct DjuiRect* rect; diff --git a/src/pc/djui/djui_chat_box.h b/src/pc/djui/djui_chat_box.h index 99467b89..e034f8ac 100644 --- a/src/pc/djui/djui_chat_box.h +++ b/src/pc/djui/djui_chat_box.h @@ -1,7 +1,6 @@ #pragma once #include "djui.h" -#pragma pack(1) struct DjuiChatBox { struct DjuiBase base; struct DjuiRect* chatContainer; diff --git a/src/pc/djui/djui_chat_message.h b/src/pc/djui/djui_chat_message.h index 83829d6f..171ebad0 100644 --- a/src/pc/djui/djui_chat_message.h +++ b/src/pc/djui/djui_chat_message.h @@ -1,7 +1,6 @@ #pragma once #include "djui.h" -#pragma pack(1) struct DjuiChatMessage { struct DjuiBase base; struct DjuiText* message; diff --git a/src/pc/djui/djui_checkbox.h b/src/pc/djui/djui_checkbox.h index 10ef01cf..67a1c45c 100644 --- a/src/pc/djui/djui_checkbox.h +++ b/src/pc/djui/djui_checkbox.h @@ -1,7 +1,6 @@ #pragma once #include "djui.h" -#pragma pack(1) struct DjuiCheckbox { struct DjuiBase base; struct DjuiRect* rect; diff --git a/src/pc/djui/djui_flow_layout.h b/src/pc/djui/djui_flow_layout.h index 733f7b58..0c7dd75e 100644 --- a/src/pc/djui/djui_flow_layout.h +++ b/src/pc/djui/djui_flow_layout.h @@ -1,7 +1,6 @@ #pragma once #include "djui.h" -#pragma pack(1) struct DjuiFlowLayout { struct DjuiBase base; enum DjuiFlowDirection flowDirection; diff --git a/src/pc/djui/djui_font.h b/src/pc/djui/djui_font.h index 8caa5023..589c98df 100644 --- a/src/pc/djui/djui_font.h +++ b/src/pc/djui/djui_font.h @@ -1,7 +1,6 @@ #pragma once #include "djui.h" -#pragma pack(1) struct DjuiFont { f32 charWidth; f32 charHeight; diff --git a/src/pc/djui/djui_image.h b/src/pc/djui/djui_image.h index 0e640cdd..84ffb35d 100644 --- a/src/pc/djui/djui_image.h +++ b/src/pc/djui/djui_image.h @@ -1,7 +1,6 @@ #pragma once #include "djui.h" -#pragma pack(1) struct DjuiImage { struct DjuiBase base; const u8* texture; diff --git a/src/pc/djui/djui_inputbox.h b/src/pc/djui/djui_inputbox.h index 8627be55..6fe93f41 100644 --- a/src/pc/djui/djui_inputbox.h +++ b/src/pc/djui/djui_inputbox.h @@ -1,7 +1,6 @@ #pragma once #include "djui.h" -#pragma pack(1) struct DjuiInputbox { struct DjuiBase base; char* buffer; diff --git a/src/pc/djui/djui_interactable.h b/src/pc/djui/djui_interactable.h index 4fa0f3d1..82c7caa2 100644 --- a/src/pc/djui/djui_interactable.h +++ b/src/pc/djui/djui_interactable.h @@ -20,7 +20,6 @@ #define SCANCODE_SPACE 57 #define SCANCODE_ESCAPE 1 -#pragma pack(1) struct DjuiInteractable { bool enabled; void (*update_style)(struct DjuiBase*); diff --git a/src/pc/djui/djui_popup.h b/src/pc/djui/djui_popup.h index 7795f5cb..f4bb472b 100644 --- a/src/pc/djui/djui_popup.h +++ b/src/pc/djui/djui_popup.h @@ -1,7 +1,6 @@ #pragma once #include "djui.h" -#pragma pack(1) struct DjuiPopup { struct DjuiBase base; struct DjuiText* text; diff --git a/src/pc/djui/djui_progress_bar.h b/src/pc/djui/djui_progress_bar.h index f191d320..48985e71 100644 --- a/src/pc/djui/djui_progress_bar.h +++ b/src/pc/djui/djui_progress_bar.h @@ -1,7 +1,6 @@ #pragma once #include "djui.h" -#pragma pack(1) struct DjuiProgressBar { struct DjuiBase base; struct DjuiRect* rect; diff --git a/src/pc/djui/djui_rect.h b/src/pc/djui/djui_rect.h index d19aa55e..30fdd195 100644 --- a/src/pc/djui/djui_rect.h +++ b/src/pc/djui/djui_rect.h @@ -1,7 +1,6 @@ #pragma once #include "djui.h" -#pragma pack(1) struct DjuiRect { struct DjuiBase base; }; diff --git a/src/pc/djui/djui_root.h b/src/pc/djui/djui_root.h index b807d8db..5bde8822 100644 --- a/src/pc/djui/djui_root.h +++ b/src/pc/djui/djui_root.h @@ -1,7 +1,6 @@ #pragma once #include "djui.h" -#pragma pack(1) struct DjuiRoot { struct DjuiBase base; }; diff --git a/src/pc/djui/djui_selectionbox.h b/src/pc/djui/djui_selectionbox.h index 7a1e5193..736c40a8 100644 --- a/src/pc/djui/djui_selectionbox.h +++ b/src/pc/djui/djui_selectionbox.h @@ -1,7 +1,6 @@ #pragma once #include "djui.h" -#pragma pack(1) struct DjuiSelectionbox { struct DjuiBase base; struct DjuiText* text; diff --git a/src/pc/djui/djui_slider.h b/src/pc/djui/djui_slider.h index 8ccc5fb5..1c80eaee 100644 --- a/src/pc/djui/djui_slider.h +++ b/src/pc/djui/djui_slider.h @@ -1,7 +1,6 @@ #pragma once #include "djui.h" -#pragma pack(1) struct DjuiSlider { struct DjuiBase base; struct DjuiRect* rect; diff --git a/src/pc/djui/djui_text.h b/src/pc/djui/djui_text.h index 7f15c5d7..2d8f84ee 100644 --- a/src/pc/djui/djui_text.h +++ b/src/pc/djui/djui_text.h @@ -1,7 +1,6 @@ #pragma once #include "djui.h" -#pragma pack(1) struct DjuiText { struct DjuiBase base; char* message; diff --git a/src/pc/djui/djui_three_panel.h b/src/pc/djui/djui_three_panel.h index a57c5629..fb76c84d 100644 --- a/src/pc/djui/djui_three_panel.h +++ b/src/pc/djui/djui_three_panel.h @@ -1,7 +1,6 @@ #pragma once #include "djui.h" -#pragma pack(1) struct DjuiThreePanel { struct DjuiBase base; struct DjuiScreenValue minHeaderSize; diff --git a/src/pc/djui/djui_types.h b/src/pc/djui/djui_types.h index 3c5bcbdb..b52943ee 100644 --- a/src/pc/djui/djui_types.h +++ b/src/pc/djui/djui_types.h @@ -1,7 +1,6 @@ #pragma once #include "djui.h" -#pragma pack(1) struct DjuiColor { u8 r; u8 g; @@ -12,7 +11,6 @@ struct DjuiColor { enum DjuiScreenValueType { DJUI_SVT_ABSOLUTE, DJUI_SVT_RELATIVE, DJUI_SVT_ASPECT_RATIO }; enum DjuiFlowDirection { DJUI_FLOW_DIR_DOWN, DJUI_FLOW_DIR_UP, DJUI_FLOW_DIR_RIGHT, DJUI_FLOW_DIR_LEFT }; -#pragma pack(1) struct DjuiScreenValue { enum DjuiScreenValueType type; f32 value; diff --git a/src/pc/lua/smlua_cobject_allowlist.c b/src/pc/lua/smlua_cobject_allowlist.c index f24e90c6..7b4ef061 100644 --- a/src/pc/lua/smlua_cobject_allowlist.c +++ b/src/pc/lua/smlua_cobject_allowlist.c @@ -1,7 +1,6 @@ #include #include "smlua.h" -#pragma pack(1) struct CObjectAllowListNode { u64 pointer; struct CObjectAllowListNode* next; diff --git a/src/pc/mod_list.h b/src/pc/mod_list.h index b3bfd0d0..e7da7373 100644 --- a/src/pc/mod_list.h +++ b/src/pc/mod_list.h @@ -9,7 +9,6 @@ #define MOD_PATH "./mods" -#pragma pack(1) struct ModListEntry { char* name; FILE* fp; @@ -26,7 +25,6 @@ struct ModListEntry { bool selectable; }; -#pragma pack(1) struct ModTable { struct ModListEntry* entries; u16 entryCount; diff --git a/src/pc/network/network.c b/src/pc/network/network.c index 857235b0..461a5bc7 100644 --- a/src/pc/network/network.c +++ b/src/pc/network/network.c @@ -145,7 +145,8 @@ bool network_allow_unknown_local_index(enum PacketType packetType) { || (packetType == PACKET_MOD_LIST) || (packetType == PACKET_DOWNLOAD_REQUEST) || (packetType == PACKET_DOWNLOAD) - || (packetType == PACKET_KEEP_ALIVE); + || (packetType == PACKET_KEEP_ALIVE) + || (packetType == PACKET_DEBUG_SYNC); } void network_send_to(u8 localIndex, struct Packet* p) { diff --git a/src/pc/network/packets/packet_player.c b/src/pc/network/packets/packet_player.c index 921c0483..51deeada 100644 --- a/src/pc/network/packets/packet_player.c +++ b/src/pc/network/packets/packet_player.c @@ -67,6 +67,7 @@ struct PacketPlayerData { u8 usedSyncID; u8 platformSyncID; }; +#pragma pack() static void read_packet_data(struct PacketPlayerData* data, struct MarioState* m) { u8 heldSyncID = (m->heldObj != NULL) ? m->heldObj->oSyncID : 0; diff --git a/src/pc/network/packets/packet_spawn_objects.c b/src/pc/network/packets/packet_spawn_objects.c index 840ba571..3e8117ff 100644 --- a/src/pc/network/packets/packet_spawn_objects.c +++ b/src/pc/network/packets/packet_spawn_objects.c @@ -21,6 +21,7 @@ struct SpawnObjectData { s32 rawData[80]; u8 globalPlayerIndex; }; +#pragma pack() static u8 generate_parent_id(struct Object* objects[], u8 onIndex, bool sanitize) { struct Object* o = objects[onIndex];