mirror of
https://github.com/MonsterDruide1/OdysseyDecomp
synced 2026-04-23 09:04:21 +00:00
Player: Implement PlayerJudgeCameraInWater (#812)
This commit is contained in:
parent
9fae848080
commit
3f9b86160e
|
|
@ -123303,20 +123303,20 @@ Player/PlayerJudgeCameraInWater.o:
|
|||
label:
|
||||
- _ZN24PlayerJudgeCameraInWaterC1EPKN2al9LiveActorEPK6IJudgePKNS0_18WaterSurfaceFinderE
|
||||
- _ZN24PlayerJudgeCameraInWaterC2EPKN2al9LiveActorEPK6IJudgePKNS0_18WaterSurfaceFinderE
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
- offset: 0x458ac0
|
||||
size: 88
|
||||
label: _ZNK24PlayerJudgeCameraInWater5judgeEv
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
- offset: 0x458b18
|
||||
size: 4
|
||||
label: _ZN24PlayerJudgeCameraInWater5resetEv
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
lazy: true
|
||||
- offset: 0x458b1c
|
||||
size: 4
|
||||
label: _ZN24PlayerJudgeCameraInWater6updateEv
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
lazy: true
|
||||
Player/PlayerJudgeCameraSubjective.o:
|
||||
'.text':
|
||||
|
|
|
|||
15
src/Player/PlayerJudgeCameraInWater.cpp
Normal file
15
src/Player/PlayerJudgeCameraInWater.cpp
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#include "Player/PlayerJudgeCameraInWater.h"
|
||||
|
||||
#include "Util/JudgeUtil.h"
|
||||
#include "Util/PlayerUtil.h"
|
||||
|
||||
PlayerJudgeCameraInWater::PlayerJudgeCameraInWater(const al::LiveActor* player,
|
||||
const IJudge* inWaterJudge,
|
||||
const al::WaterSurfaceFinder* waterSurfaceFinder)
|
||||
: mPlayer(player), mInWaterJudge(inWaterJudge), mWaterSurfaceFinder(waterSurfaceFinder) {}
|
||||
|
||||
bool PlayerJudgeCameraInWater::judge() const {
|
||||
if (rs::isPlayerHack(mPlayer))
|
||||
return rs::isJudge(mInWaterJudge) && !mWaterSurfaceFinder->isFoundSurface();
|
||||
return rs::isJudge(mInWaterJudge) && !mWaterSurfaceFinder->isFoundSurface();
|
||||
}
|
||||
26
src/Player/PlayerJudgeCameraInWater.h
Normal file
26
src/Player/PlayerJudgeCameraInWater.h
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#pragma once
|
||||
|
||||
#include "Library/Nature/WaterSurfaceFinder.h"
|
||||
|
||||
#include "Player/IJudge.h"
|
||||
|
||||
namespace al {
|
||||
class LiveActor;
|
||||
}
|
||||
|
||||
class PlayerJudgeCameraInWater : public IJudge {
|
||||
public:
|
||||
PlayerJudgeCameraInWater(const al::LiveActor* player, const IJudge* inWaterJudge,
|
||||
const al::WaterSurfaceFinder* waterSurfaceFinder);
|
||||
|
||||
bool judge() const override;
|
||||
|
||||
void reset() override {}
|
||||
|
||||
void update() override {}
|
||||
|
||||
private:
|
||||
const al::LiveActor* mPlayer;
|
||||
const IJudge* mInWaterJudge;
|
||||
const al::WaterSurfaceFinder* mWaterSurfaceFinder;
|
||||
};
|
||||
Loading…
Reference in a new issue