mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
Invalidate area/level sync when unloading the area/level
This commit is contained in:
parent
a2546055b2
commit
b1acd644f7
1 changed files with 11 additions and 0 deletions
|
|
@ -193,6 +193,12 @@ void load_obj_warp_nodes(void) {
|
|||
}
|
||||
|
||||
void clear_areas(void) {
|
||||
struct NetworkPlayer* np = gNetworkPlayerLocal;
|
||||
if (np != NULL) {
|
||||
np->currAreaSyncValid = false;
|
||||
np->currLevelSyncValid = false;
|
||||
}
|
||||
|
||||
s32 i;
|
||||
|
||||
gCurrentArea = NULL;
|
||||
|
|
@ -261,6 +267,11 @@ void load_area(s32 index) {
|
|||
}
|
||||
|
||||
void unload_area(void) {
|
||||
struct NetworkPlayer* np = gNetworkPlayerLocal;
|
||||
if (np != NULL) {
|
||||
np->currAreaSyncValid = false;
|
||||
}
|
||||
|
||||
network_clear_sync_objects();
|
||||
if (gCurrentArea != NULL) {
|
||||
unload_objects_from_area(0, gCurrentArea->index);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue