1#include "Player/PlayerWallActionHistory.h"
2
3#include "Util/PlayerCollisionUtil.h"
4
5PlayerWallActionHistory::PlayerWallActionHistory() {}
6
7void PlayerWallActionHistory::update(const IUsePlayerCollision* collider) {
8 if (rs::isCollidedGround(collider))
9 reset();
10}
11
12void PlayerWallActionHistory::reset() {
13 mIsJumpStored = false;
14 mIsLeaveStored = false;
15}
16
17void PlayerWallActionHistory::recordWallJump(const IUsePlayerCollision* collider,
18 const sead::Vector3f& position) {
19 mIsJumpStored = true;
20 mJumpWallPosition = position;
21 mJumpWallNormal = rs::getCollidedWallNormal(collider);
22}
23
24void PlayerWallActionHistory::recordWallJump(const sead::Vector3f& position,
25 const sead::Vector3f& normal) {
26 mIsJumpStored = true;
27 mJumpWallPosition = position;
28 mJumpWallNormal = normal;
29}
30
31void PlayerWallActionHistory::recordWallLeave(const sead::Vector3f& position,
32 const sead::Vector3f& normal) {
33 mIsLeaveStored = true;
34 mLeaveWallPosition = position;
35 mLeaveWallNormal = normal;
36}
37