diff --git a/Makefile b/Makefile index a63bbc88..f3d99d85 100644 --- a/Makefile +++ b/Makefile @@ -766,7 +766,7 @@ ifeq ($(WINDOWS_BUILD),1) LDFLAGS += -Llib/lua/win64 -l:liblua53.a endif else ifeq ($(OSX_BUILD),1) - LDFLAGS += -Llib/lua/mac -l:liblua53.a + LDFLAGS += -L./lib/lua/mac/ -l lua53 else LDFLAGS += -Llib/lua/linux -l:liblua53.a endif diff --git a/src/pc/network/packets/packet_download.c b/src/pc/network/packets/packet_download.c index 158f936b..7e6238f0 100644 --- a/src/pc/network/packets/packet_download.c +++ b/src/pc/network/packets/packet_download.c @@ -112,8 +112,10 @@ void network_send_download(u16 clientIndex, u16 serverIndex, u64 offset) { void network_receive_download(struct Packet* p) { SOFT_ASSERT(gNetworkType == NT_CLIENT); if (p->localIndex != UNKNOWN_LOCAL_INDEX) { - LOG_ERROR("Received download from known local index"); - return; + if (gNetworkPlayerServer == NULL || gNetworkPlayerServer->localIndex != p->localIndex) { + LOG_ERROR("Received download from known local index '%d'", p->localIndex); + return; + } } u16 clientIndex; diff --git a/src/pc/network/packets/packet_mod_list.c b/src/pc/network/packets/packet_mod_list.c index fad14bd4..bab8b58d 100644 --- a/src/pc/network/packets/packet_mod_list.c +++ b/src/pc/network/packets/packet_mod_list.c @@ -56,7 +56,14 @@ void network_send_mod_list(void) { void network_receive_mod_list(struct Packet* p) { SOFT_ASSERT(gNetworkType == NT_CLIENT); - SOFT_ASSERT(p->localIndex == UNKNOWN_LOCAL_INDEX); + + if (p->localIndex != UNKNOWN_LOCAL_INDEX) { + if (gNetworkPlayerServer == NULL || gNetworkPlayerServer->localIndex != p->localIndex) { + LOG_ERROR("Received download from known local index '%d'", p->localIndex); + return; + } + } + if (gModTableRemote.entries != NULL) { LOG_INFO("received mod list after allocating"); return;