mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
Added init_mario_after_warp() to lua API if there is only 1 player (#7)
This commit is contained in:
parent
f0c807f5b8
commit
9fc838f6d3
1 changed files with 15 additions and 0 deletions
|
|
@ -65,6 +65,20 @@ int smlua_func_atan2s(lua_State* L) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int smlua_func_init_mario_after_warp(lua_State* L) {
|
||||||
|
if (network_player_connected_count() < 2) {
|
||||||
|
if(!smlua_functions_valid_param_count(L, 0)) { return 0; }
|
||||||
|
|
||||||
|
|
||||||
|
init_mario_after_warp();
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
} else {
|
||||||
|
LOG_LUA("This function can only be used in single-player");
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void smlua_bind_functions(void) {
|
void smlua_bind_functions(void) {
|
||||||
lua_State* L = gLuaState;
|
lua_State* L = gLuaState;
|
||||||
|
|
||||||
|
|
@ -72,4 +86,5 @@ void smlua_bind_functions(void) {
|
||||||
smlua_bind_function(L, "sins", smlua_func_sins);
|
smlua_bind_function(L, "sins", smlua_func_sins);
|
||||||
smlua_bind_function(L, "coss", smlua_func_coss);
|
smlua_bind_function(L, "coss", smlua_func_coss);
|
||||||
smlua_bind_function(L, "atan2s", smlua_func_atan2s);
|
smlua_bind_function(L, "atan2s", smlua_func_atan2s);
|
||||||
|
smlua_bind_function(L, "init_mario_after_warp", smlua_func_init_mario_after_warp);
|
||||||
}
|
}
|
||||||
Loading…
Add table
Reference in a new issue