mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 03:55:11 +00:00
Expose gCurrentArea and gCamera to Lua
This commit is contained in:
parent
2506c1e64d
commit
0e0b3c1862
3 changed files with 14 additions and 1 deletions
|
@ -87,6 +87,15 @@ gServerSettings = {}
|
|||
--- Struct containing the settings for Nametags
|
||||
gNametagsSettings = {}
|
||||
|
||||
--- @type Area
|
||||
--- Struct containing the current area
|
||||
gCurrentArea = {}
|
||||
|
||||
--- @type Camera
|
||||
--- Struct contaning camera fields
|
||||
--- - This camera is the same as `gMarioStates[i].area.camera` or `gCurrentArea.camera`
|
||||
gCamera = {}
|
||||
|
||||
-----------
|
||||
-- hooks --
|
||||
-----------
|
||||
|
|
|
@ -393,7 +393,7 @@ static void *DynOS_Warp_UpdateExit(void *aCmd, bool aIsLevelInitDone) {
|
|||
init_camera(gCurrentArea->camera);
|
||||
}
|
||||
sDelayedWarpOp = WARP_OP_NONE;
|
||||
play_transition(WARP_TRANSITION_FADE_FROM_STAR, 15, 0x00, 0x00, 0x00);
|
||||
play_transition(WARP_TRANSITION_FADE_FROM_STAR, 0x10, 0x00, 0x00, 0x00);
|
||||
play_sound(SOUND_MENU_MARIO_CASTLE_WARP, gGlobalSoundSource);
|
||||
|
||||
// Set music
|
||||
|
|
|
@ -640,6 +640,10 @@ void smlua_cobject_init_globals(void) {
|
|||
EXPOSE_GLOBAL(LOT_SERVERSETTINGS, gServerSettings);
|
||||
|
||||
EXPOSE_GLOBAL(LOT_NAMETAGSSETTINGS, gNametagsSettings);
|
||||
|
||||
EXPOSE_GLOBAL(LOT_AREA, gCurrentArea);
|
||||
|
||||
EXPOSE_GLOBAL(LOT_CAMERA, gCamera);
|
||||
}
|
||||
|
||||
void smlua_cobject_init_per_file_globals(const char* path) {
|
||||
|
|
Loading…
Reference in a new issue