More adjustments

This commit is contained in:
MysterD 2022-03-02 00:11:34 -08:00
parent 7a4505e353
commit 822cc4a4a9
4 changed files with 0 additions and 24 deletions

View file

@ -37,12 +37,6 @@ void network_receive_leaving(struct Packet* p) {
u8 globalIndex = 0;
packet_read(p, &globalIndex, sizeof(u8));
// anti spoof
if (packet_spoofed(p, globalIndex)) {
LOG_ERROR("rx spoofed leaving");
return;
}
LOG_INFO("Received leaving event for %d", globalIndex);
network_player_disconnected(globalIndex);
}

View file

@ -53,12 +53,6 @@ void network_receive_level_area_request(struct Packet* p) {
return;
}
// anti spoof
if (packet_spoofed(p, globalIndex)) {
LOG_ERROR("rx spoofed level area request");
return;
}
// send level area
network_send_level(toNp, true);
}

View file

@ -207,12 +207,6 @@ void network_receive_player(struct Packet* p) {
struct NetworkPlayer* np = network_player_from_global_index(globalIndex);
if (np == NULL || np->localIndex == UNKNOWN_LOCAL_INDEX || !np->connected) { return; }
// anti spoof
if (packet_spoofed(p, globalIndex)) {
LOG_ERROR("rx spoofed player");
return;
}
// prevent receiving a packet about our player
if (gNetworkPlayerLocal && globalIndex == gNetworkPlayerLocal->globalIndex) { return; }

View file

@ -41,12 +41,6 @@ void network_receive_sync_valid(struct Packet* p) {
packet_read(p, &areaIndex, sizeof(s16));
packet_read(p, &fromGlobalIndex, sizeof(u8));
// anti spoof
if (packet_spoofed(p, fromGlobalIndex)) {
LOG_ERROR("rx spoofed sync valid");
return;
}
if (gNetworkType != NT_SERVER) {
extern s16 gCurrCourseNum, gCurrActStarNum, gCurrLevelNum, gCurrAreaIndex;
if (courseNum != gCurrCourseNum || actNum != gCurrActStarNum || levelNum != gCurrLevelNum || (areaIndex != gCurrAreaIndex && areaIndex != -1)) {