Match MarioActor::doStun

This commit is contained in:
Headpenguin 2023-07-09 11:03:22 -04:00
parent 1a1d17bfee
commit 99961c80e8
3 changed files with 28 additions and 1 deletions

View File

@ -211,7 +211,7 @@ incLife__10MarioActorFUl,MarioActor.o,Player.a,true
changeMaxLife__10MarioActorFl,MarioActor.o,Player.a,true
doPressing__10MarioActorFv,MarioActor.o,Player.a,true
careMovingObject__10MarioActorFv,MarioActor.o,Player.a,true
doStun__10MarioActorFv,MarioActor.o,Player.a,false
doStun__10MarioActorFv,MarioActor.o,Player.a,true
scaleMtx__10MarioActorFPA4_f,MarioActor.o,Player.a,false
updateBaseScaleMtx__10MarioActorFv,MarioActor.o,Player.a,false
getRealMtx__10MarioActorCFPA4_fPCc,MarioActor.o,Player.a,false

1 Symbol Name Object File Library Archive Matching
211 changeMaxLife__10MarioActorFl MarioActor.o Player.a true
212 doPressing__10MarioActorFv MarioActor.o Player.a true
213 careMovingObject__10MarioActorFv MarioActor.o Player.a true
214 doStun__10MarioActorFv MarioActor.o Player.a false true
215 scaleMtx__10MarioActorFPA4_f MarioActor.o Player.a false
216 updateBaseScaleMtx__10MarioActorFv MarioActor.o Player.a false
217 getRealMtx__10MarioActorCFPA4_fPCc MarioActor.o Player.a false

View File

@ -100,6 +100,7 @@ public:
void powerRailMove();
void checkGround();
void updateFloorCode();
void inputStick();
inline bool getPunchFlag1() const { // poor name
return _8_8;

View File

@ -950,3 +950,29 @@ void MarioActor::careMovingObject() {
_230 -> checkGround();
_230 -> updateFloorCode();
}
bool MarioActor::doStun() {
if(_38c) {
_230 -> _18_1a = true;
resetSensorCount();
if (
getStates()._8_1
&& !MR::isSameMtx (
_230 -> _45C -> getPrevBaseMtx() -> toMtxPtr(),
_230 -> _45C -> getBaseMtx() -> toMtxPtr()
)
) {
_230 -> _130 = mPosition;
_230 -> checkEnforceMove();
mPosition = _230 -> _130;
}
if(!--_38c) {
f32 stack_c, stack_8;
getStickValue(&stack_c, &stack_8);
if(MR::isNearZero(stack_c, 0.001f) && MR::isNearZero(stack_8, 0.001f) && !getStates()._8_a) _230 -> stopWalk();
}
_230 -> inputStick();
return true;
}
else return false;
}