mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
Added mods folder for lua scripts Created constants.lua so scripts could use constants internal to the C code Created event hooks Separated out lua functions into multiple files
16 lines
353 B
Lua
16 lines
353 B
Lua
function mario_update(index)
|
|
local m = get_mario_state(index)
|
|
if m.vel.y > 0 then
|
|
m.vel.y = m.vel.y + 2
|
|
end
|
|
set_mario_state(index, m)
|
|
if m.action == ACT_DIVE then
|
|
set_mario_action(index, ACT_TWIRLING, 0);
|
|
end
|
|
end
|
|
|
|
function update()
|
|
end
|
|
|
|
hook_event(HOOK_UPDATE, update)
|
|
hook_event(HOOK_MARIO_UPDATE, mario_update)
|