mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-01-07 08:01:16 +00:00
Update local networkplayer before calling level hooks
This commit is contained in:
parent
7252d836a9
commit
9c502da395
2 changed files with 10 additions and 0 deletions
|
@ -522,6 +522,11 @@ void init_mario_after_warp(void) {
|
|||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (gNetworkPlayerLocal != NULL) {
|
||||
network_player_update_course_level(gNetworkPlayerLocal, gCurrCourseNum, gCurrActStarNum, gCurrLevelNum, gCurrAreaIndex);
|
||||
}
|
||||
|
||||
smlua_call_event_hooks(HOOK_ON_WARP);
|
||||
}
|
||||
|
||||
|
@ -1415,6 +1420,9 @@ s32 init_level(void) {
|
|||
sound_banks_disable(SEQ_PLAYER_SFX, SOUND_BANKS_DISABLED_DURING_INTRO_CUTSCENE);
|
||||
}
|
||||
|
||||
if (gNetworkPlayerLocal != NULL) {
|
||||
network_player_update_course_level(gNetworkPlayerLocal, gCurrCourseNum, gCurrActStarNum, gCurrLevelNum, gCurrAreaIndex);
|
||||
}
|
||||
smlua_call_event_hooks(HOOK_ON_LEVEL_INIT);
|
||||
|
||||
return 1;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
void network_send_sync_valid(struct NetworkPlayer* toNp, s16 courseNum, s16 actNum, s16 levelNum, s16 areaIndex) {
|
||||
if (toNp == gNetworkPlayerLocal && !toNp->currAreaSyncValid) {
|
||||
network_player_update_course_level(toNp, courseNum, actNum, levelNum, areaIndex);
|
||||
smlua_call_event_hooks(HOOK_ON_SYNC_VALID);
|
||||
}
|
||||
|
||||
|
@ -61,6 +62,7 @@ void network_receive_sync_valid(struct Packet* p) {
|
|||
}
|
||||
|
||||
if (np == gNetworkPlayerLocal && !np->currAreaSyncValid) {
|
||||
network_player_update_course_level(np, courseNum, actNum, levelNum, areaIndex);
|
||||
smlua_call_event_hooks(HOOK_ON_SYNC_VALID);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue