Skip to content

Commit

Permalink
Fixed cappy infinite height
Browse files Browse the repository at this point in the history
  • Loading branch information
Amethyst-szs committed Jul 12, 2022
1 parent b787713 commit 5c9188a
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
7 changes: 5 additions & 2 deletions include/game/Player/HackCap.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

#include "HackCapThrowParam.h"
#include "HackCap/HackCapJointControlKeeper.h"
#include "HackCap/PlayerCapActionHistory.h"

class PlayerWallActionHistory;
class PlayerCapActionHistory;
class PlayerEyeSensorHitHolder;
class IUsePlayerHeightCheck;
class PlayerWetControl;
Expand Down Expand Up @@ -201,6 +201,9 @@ class HackCap : public al::LiveActor {
al::LiveActor *mCapEyes; // 0x120
PlayerActorHakoniwa *mPlayerActor; // 0x128
unsigned char padding_220[0x220-0x130];
HackCapThrowParam throwParam; // 0x220
HackCapThrowParam *throwParam; // 0x220
unsigned char padding_2B8[0x2B8-0x228];
PlayerCapActionHistory *mCapActionHistory; // 0x2B8
unsigned char padding_2E0[0x2E0-0x2C0];
HackCapJointControlKeeper *mJointKeeper; // 0x2E0
};
29 changes: 29 additions & 0 deletions include/game/Player/HackCap/PlayerCapActionHistory.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#pragma once

#include "al/LiveActor/LiveActor.h"
#include "game/Interfaces/IUsePlayerCollision.h"
#include "game/Player/PlayerConst.h"
#include "math/seadVector.h"

class PlayerCapActionHistory {
public:
PlayerCapActionHistory(al::LiveActor const*,PlayerConst const*,struct PlayerTrigger const*,IUsePlayerCollision const*);
void update(void);
void clearLandLimit(void);
void clearLimitHeight(void);
void clearCapJump(void);
void clearLandLimitStandAngle(void);
void clearWallAirLimit(void);
void recordLimitHeight(void);
bool isOverLimitHeight(void) const;

al::LiveActor* mHostActor; // 0x0
PlayerConst* mPlayerConst; // 0x8
PlayerTrigger* mPlayerTrigger; // 0x10
IUsePlayerCollision* mCollider; // 0x18
struct PlayerCounterAfterCapCatch* mCapCatchCounter; // 0x20
bool mIsCapBounced = false; // 0x28
sead::Vector3f mUnkVec = sead::Vector3f::zero; // 0x2C
bool mIsCapJumpReady = true; // 0x38
bool mIsLimited = true; // 0x39 (unsure what this actually is called)
};
6 changes: 6 additions & 0 deletions source/timeWarp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,12 @@ void TimeContainer::endRewind(PlayerActorHakoniwa* p1)
p1->mHackCap->forcePutOn();
p1->mHackCap->hidePuppetCap();
}

if(GameDataFunction::isEnableCap(stageSceneRef)){
if(p1->mHackCap){
p1->mHackCap->mCapActionHistory->mIsCapJumpReady = false;
}
}

isRewinding = false;
resetCooldown();
Expand Down

0 comments on commit 5c9188a

Please sign in to comment.