mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-10-19 03:32:41 +00:00
More adjustments
This commit is contained in:
parent
7a4505e353
commit
822cc4a4a9
4 changed files with 0 additions and 24 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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; }
|
||||
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue