I tried with pole
Build libsm64 / Build libsm64 for linux (push) Successful in 31s
Build libsm64 / Build libsm64 for windows (push) Successful in 23s
Build libsm64 / Snapshot Release (push) Has been cancelled
Build libsm64 / Build libsm64 for windows (pull_request) Has been cancelled
Build libsm64 / Snapshot Release (pull_request) Has been cancelled
Build libsm64 / Build libsm64 for linux (pull_request) Has been cancelled
Build libsm64 / Build libsm64 for linux (push) Successful in 31s
Build libsm64 / Build libsm64 for windows (push) Successful in 23s
Build libsm64 / Snapshot Release (push) Has been cancelled
Build libsm64 / Build libsm64 for windows (pull_request) Has been cancelled
Build libsm64 / Snapshot Release (pull_request) Has been cancelled
Build libsm64 / Build libsm64 for linux (pull_request) Has been cancelled
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "../include/mario_geo_switch_case_ids.h"
|
||||
#include "../../rumble.h"
|
||||
#include "../../FakeObject.h"
|
||||
#include "../../libsm64.h"
|
||||
|
||||
static Vec3f gVec3fZero = {0.0f, 0.0f, 0.0f};
|
||||
|
||||
@@ -75,14 +76,16 @@ void play_climbing_sounds(struct MarioState *m, s32 b)
|
||||
|
||||
s32 set_pole_position(struct MarioState *m, f32 offsetY)
|
||||
{
|
||||
if (!m) { return 0;}
|
||||
if (m->usedObj == NULL)
|
||||
if (!m->isLocal && m->usedObj == NULL)
|
||||
{
|
||||
m->usedObj = cur_obj_find_nearest_pole();
|
||||
return POLE_NONE;
|
||||
}
|
||||
|
||||
// This is here so if somehow a pole despawns while you are on it.
|
||||
// You will just drop from it.
|
||||
if (m->usedObj == NULL)
|
||||
{
|
||||
// If Mario is no longer interacting with the pole, stop the pole holding action.
|
||||
set_mario_action(m, ACT_FREEFALL, 0);
|
||||
return POLE_FELL_OFF;
|
||||
}
|
||||
@@ -161,11 +164,7 @@ s32 set_pole_position(struct MarioState *m, f32 offsetY)
|
||||
|
||||
s32 act_holding_pole(struct MarioState *m)
|
||||
{
|
||||
if (!m) { return 0; }
|
||||
struct Object *marioObj = m->marioObj;
|
||||
if (m->usedObj == NULL) { m->usedObj = cur_obj_find_nearest_pole(); }
|
||||
if (m->usedObj == NULL) { return FALSE; }
|
||||
|
||||
f32 poleStickY = -m->controller->stickY;
|
||||
|
||||
#ifdef VERSION_JP
|
||||
@@ -198,7 +197,12 @@ s32 act_holding_pole(struct MarioState *m)
|
||||
|
||||
if (poleStickY > 16.0f)
|
||||
{
|
||||
f32 poleTop = m->usedObj->hitboxHeight - 100.0f;
|
||||
f32 poleTop = m->pos[1] + 1000;
|
||||
|
||||
if (m->usedObj != NULL)
|
||||
{
|
||||
poleTop = m->usedObj->hitboxHeight - 100.0f;
|
||||
}
|
||||
// const BehaviorScript *poleBehavior = virtual_to_segmented(0x13, m->usedObj->behavior);
|
||||
|
||||
if (marioObj->oMarioPolePos < poleTop - 0.4f)
|
||||
@@ -253,8 +257,6 @@ s32 act_holding_pole(struct MarioState *m)
|
||||
|
||||
s32 act_climbing_pole(struct MarioState *m)
|
||||
{
|
||||
if (!m) { return 0; }
|
||||
if (m->usedObj == NULL) { m->usedObj = cur_obj_find_nearest_pole(); }
|
||||
s32 sp24;
|
||||
struct Object *marioObj = m->marioObj;
|
||||
s16 cameraAngle = m->area->camera->yaw;
|
||||
@@ -298,8 +300,6 @@ s32 act_climbing_pole(struct MarioState *m)
|
||||
|
||||
s32 act_grab_pole_slow(struct MarioState *m)
|
||||
{
|
||||
if (!m) { return 0; }
|
||||
if (m->usedObj == NULL) { m->usedObj = cur_obj_find_nearest_pole(); }
|
||||
play_sound_if_no_flag(m, SOUND_MARIO_WHOA, MARIO_MARIO_SOUND_PLAYED);
|
||||
|
||||
if (set_pole_position(m, 0.0f) == POLE_NONE)
|
||||
@@ -317,8 +317,6 @@ s32 act_grab_pole_slow(struct MarioState *m)
|
||||
|
||||
s32 act_grab_pole_fast(struct MarioState *m)
|
||||
{
|
||||
if (!m) { return 0; }
|
||||
if (m->usedObj == NULL) { m->usedObj = cur_obj_find_nearest_pole(); }
|
||||
struct Object *marioObj = m->marioObj;
|
||||
|
||||
play_sound_if_no_flag(m, SOUND_MARIO_WHOA, MARIO_MARIO_SOUND_PLAYED);
|
||||
@@ -348,8 +346,6 @@ s32 act_grab_pole_fast(struct MarioState *m)
|
||||
|
||||
s32 act_top_of_pole_transition(struct MarioState *m)
|
||||
{
|
||||
if (!m) { return 0; }
|
||||
if (m->usedObj == NULL) { m->usedObj = cur_obj_find_nearest_pole(); }
|
||||
struct Object *marioObj = m->marioObj;
|
||||
|
||||
marioObj->oMarioPoleYawVel = 0;
|
||||
@@ -376,9 +372,7 @@ s32 act_top_of_pole_transition(struct MarioState *m)
|
||||
|
||||
s32 act_top_of_pole(struct MarioState *m)
|
||||
{
|
||||
if (!m) { return 0; }
|
||||
UNUSED struct Object *marioObj = m->marioObj;
|
||||
if (m->usedObj == NULL) { m->usedObj = cur_obj_find_nearest_pole(); }
|
||||
f32 poleStickY = -m->controller->stickY;
|
||||
|
||||
if (m->input & INPUT_A_PRESSED)
|
||||
@@ -937,8 +931,6 @@ s32 act_in_cannon(struct MarioState *m)
|
||||
|
||||
s32 act_tornado_twirling(struct MarioState *m)
|
||||
{
|
||||
if (!m) { return 0; }
|
||||
if (m->usedObj == NULL) { return FALSE; }
|
||||
struct SM64SurfaceCollisionData *floor;
|
||||
Vec3f nextPos;
|
||||
struct Object *marioObj = m->marioObj;
|
||||
|
||||
Reference in New Issue
Block a user