Player: Implement PlayerJudgeForceRolling (#84)

This commit is contained in:
MonsterDruide1 2024-06-11 00:21:47 +02:00 committed by GitHub
parent 307f18a409
commit 44cc1b0eb5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 39 additions and 4 deletions

View File

@ -27842,10 +27842,10 @@ Address,Quality,Size,Name
0x00000071004595dc,U,000064,_ZNK20PlayerJudgeForceLand5judgeEv
0x000000710045961c,U,000004,_ZN20PlayerJudgeForceLand5resetEv
0x0000007100459620,U,000004,_ZN20PlayerJudgeForceLand6updateEv
0x0000007100459624,U,000024,_ZN23PlayerJudgeForceRollingC1EPKN2al9LiveActorEPK19IUsePlayerCollision
0x000000710045963c,U,000012,_ZNK23PlayerJudgeForceRolling5judgeEv
0x0000007100459648,U,000004,_ZN23PlayerJudgeForceRolling5resetEv
0x000000710045964c,U,000004,_ZN23PlayerJudgeForceRolling6updateEv
0x0000007100459624,O,000024,_ZN23PlayerJudgeForceRollingC1EPKN2al9LiveActorEPK19IUsePlayerCollision
0x000000710045963c,O,000012,_ZNK23PlayerJudgeForceRolling5judgeEv
0x0000007100459648,O,000004,_ZN23PlayerJudgeForceRolling5resetEv
0x000000710045964c,O,000004,_ZN23PlayerJudgeForceRolling6updateEv
0x0000007100459650,O,000028,_ZN26PlayerJudgeForceSlopeSlideC1EPKN2al9LiveActorEPK11PlayerConstPK19IUsePlayerCollision
0x000000710045966c,O,000008,_ZN26PlayerJudgeForceSlopeSlide5resetEv
0x0000007100459674,O,000048,_ZN26PlayerJudgeForceSlopeSlide6updateEv

Can't render this file because it is too large.

View File

@ -0,0 +1,14 @@
#include "Player/PlayerJudgeForceRolling.h"
#include "Util/PlayerCollisionUtil.h"
PlayerJudgeForceRolling::PlayerJudgeForceRolling(const al::LiveActor* player,
const IUsePlayerCollision* collider)
: mPlayer(player), mCollider(collider) {}
bool PlayerJudgeForceRolling::judge() const {
return rs::isOnGroundForceRollingCode(mPlayer, mCollider);
}
void PlayerJudgeForceRolling::reset() {}
void PlayerJudgeForceRolling::update() {}

View File

@ -0,0 +1,20 @@
#pragma once
#include "Player/IJudge.h"
namespace al {
class LiveActor;
}
class IUsePlayerCollision;
class PlayerJudgeForceRolling : public IJudge {
public:
PlayerJudgeForceRolling(const al::LiveActor* player, const IUsePlayerCollision* collider);
void reset() override;
void update() override;
bool judge() const override;
private:
const al::LiveActor* mPlayer;
const IUsePlayerCollision* mCollider;
};

View File

@ -17,6 +17,7 @@ const sead::Vector3f& getCollidedGroundNormal(const IUsePlayerCollision*);
bool isCollidedGround(const IUsePlayerCollision*);
bool isCollidedGroundRunAngle(const al::LiveActor*, const IUsePlayerCollision*, const PlayerConst*);
bool isOnGroundForceSlideCode(const al::LiveActor*, const IUsePlayerCollision*, const PlayerConst*);
bool isOnGroundForceRollingCode(const al::LiveActor*, const IUsePlayerCollision*);
bool isPlayerOnGround(const al::LiveActor*);
bool isOnGround(const al::LiveActor*, const IUsePlayerCollision*);
bool isJustLand(const IUsePlayerCollision*);