Merge branch 'unstable' of github.com:sm64ex-coop-dev/sm64ex-coop into unstable

This commit is contained in:
MysterD 2022-03-01 20:32:39 -08:00
commit 637f17a8ac
5 changed files with 28 additions and 49 deletions

3
.gitignore vendored
View file

@ -39,6 +39,9 @@
*.idb *.idb
*.pdb *.pdb
# Stackdumps
*.stackdump
# datadump # datadump
/tools/ddump/* /tools/ddump/*

View file

@ -1,14 +0,0 @@
Stack trace:
Frame Function Args
000FFFFB418 00180063480 (000FFFFB638, 00000000002, 00000000000, 000FFFFDE50)
000FFFFDE50 0018006563C (000FFFFBC70, 00000000000, 0000000032C, 00000000000)
000FFFFBB40 00180147028 (7FFEB01920AA, 00000000000, 7FFEB285B55F, 00000000000)
000FFFFBE80 00180170764 (00000000000, 00000000000, 00000000000, 00000000000)
000FFFFBE80 0018014332B (00180269458, 00180148F2E, 0010042D040, 000000002D8)
000FFFFBE80 00180215058 (0010042D040, 0010042D08F, 000000002D8, 001802693DF)
000FFFFBE80 00180043517 (000FFFFBEF0, 00000000004, 00000000000, 00100000000)
000FFFFC710 00100408373 (00000000000, 00000000000, 001801C7B4B, 00000000000)
000FFFFC710 00180065505 (008000DF9CC, 00180000000, 7FFEB016B80D, 00000000000)
000FFFFC710 0018013E4D0 (008000DF9CC, 00180000000, 7FFEB016B80D, 00000000000)
000FFFFC710 005FCB3C5E4 (008000DF9CC, 00180000000, 7FFEB016B80D, 00000000000)
End of stack trace

View file

@ -1,26 +0,0 @@
Exception: STATUS_ACCESS_VIOLATION at rip=005E6C11480
rax=0000000000000001 rbx=00000001008F5600 rcx=0000000000000000
rdx=0000000100512B00 rsi=0000000000000000 rdi=0000000000000000
r8 =0000000000000002 r9 =0000000000000018 r10=0000000100000000
r11=0000000100518F91 r12=0000000000000000 r13=00000000FFFFC7A0
r14=00000000FFFFCA18 r15=00000000FFFFCA60
rbp=0000000180239D70 rsp=00000000FFFFC680
program=C:\msys64\usr\bin\gdb.exe, pid 10125, thread main
cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame Function Args
00180239D70 005E6C11480 (001008D6FB8, 001008F5600, 00000000000, 00800236BC0)
00180239D70 00100518EB4 (0018013E3AB, 0000000000B, 0018013E3AB, 00000000008)
00180239D70 00100518FB0 (00100580D4F, 00000000006, 00000000008, 00800181D48)
00180239D70 0010060568C (00800235610, 000FFFFCC20, 001005B2E8D, 008002353C0)
00180239D70 001005F0B81 (001005DF3A6, 001005DEA00, 0010092039D, 000000000B0)
00180239D70 0010056D17E (001005DFA1B, 00000000000, 00000000000, 00100BA1220)
00180239D70 0010056D9BC (001008D6FB8, 000FFFFCAA0, 0000000000E, 00000000040)
00180239D70 001006A5F75 (001008D6FB8, 000FFFFCAA0, 00100BBCD88, 000FFFFCA80)
00180239D70 0010059BE9D (00000000000, 00000000000, 001801B5F02, 000FFFFCC20)
000FFFFCCE0 0010059CE6D (0018013E3AB, 00000000001, 00180239780, 0000000000E)
000FFFFCCE0 0010082DCA7 (00180355C78, 00000000000, 00180058D61, 001802EE100)
000FFFFCCE0 0018004AEAA (00000000000, 00000000000, 00000000000, 00000000000)
000FFFFFFF0 00180048846 (00000000000, 00000000000, 00000000000, 00000000000)
000FFFFFFF0 001800488F4 (00000000000, 00000000000, 00000000000, 00000000000)
End of stack trace

View file

@ -220,24 +220,25 @@ void coin_inside_boo_act_1(void) {
} }
void coin_inside_boo_act_0(void) { void coin_inside_boo_act_0(void) {
s16 sp26;
f32 sp20;
struct Object *parent = o->parentObj; struct Object *parent = o->parentObj;
cur_obj_become_intangible(); cur_obj_become_intangible();
if (o->oTimer == 0 && gCurrLevelNum == LEVEL_BBH) {
cur_obj_set_model(smlua_model_util_load(E_MODEL_BLUE_COIN)); if (parent == NULL || (parent->behavior != bhvMerryGoRoundBoo && parent->behavior != bhvGhostHuntBoo && parent->behavior != bhvBoo)) {
cur_obj_scale(0.7);
}
if (parent == NULL || (parent->behavior != bhvGhostHuntBoo && parent->behavior != bhvBoo)) {
o->parentObj = NULL; o->parentObj = NULL;
obj_mark_for_deletion(o); obj_mark_for_deletion(o);
return; return;
} }
if (o->oTimer == 0 && gCurrLevelNum == LEVEL_BBH) {
cur_obj_set_model(smlua_model_util_load(E_MODEL_BLUE_COIN));
cur_obj_scale(0.7);
}
obj_copy_pos(o, parent); obj_copy_pos(o, parent);
if (parent->oBooDeathStatus == BOO_DEATH_STATUS_DYING) { if (parent->oBooDeathStatus == BOO_DEATH_STATUS_DYING) {
o->oAction = 1; o->oAction = 1;
sp26 = gMarioObject->oMoveAngleYaw; s16 sp26 = gMarioObject->oMoveAngleYaw;
sp20 = 3.0f; f32 sp20 = 3.0f;
o->oVelX = sins(sp26) * sp20; o->oVelX = sins(sp26) * sp20;
o->oVelZ = coss(sp26) * sp20; o->oVelZ = coss(sp26) * sp20;
o->oVelY = 35.0f; o->oVelY = 35.0f;

View file

@ -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);
} }