4#include "game/field/obj/ObjectCollidable.hh"
5#include "game/field/obj/ObjectKCL.hh"
7#include "game/kart/KartCollide.hh"
9#include "game/system/RaceManager.hh"
20 [[nodiscard]]
const char *getKclName()
const override {
21 return "dc_pillar_base";
25 [[nodiscard]]
virtual f32 colRadiusAdditionalLength()
const override {
38 void calcCollisionTransform()
override;
46 [[nodiscard]] ObjectId id()
const override {
47 return ObjectId::DCPillarC;
51 Kart::Reaction onCollision(
Kart::KartObject * , Kart::Reaction reactionOnKart,
53 auto *raceMgr = System::RaceManager::Instance();
54 return raceMgr->timer() <
m_fallStart ? Kart::Reaction::WallAllSpeed : reactionOnKart;
73 [[nodiscard]] u32 loadFlags()
const override {
78 [[nodiscard]] f32 colRadiusAdditionalLength()
const override {
82 [[nodiscard]]
const EGG::Matrix34f &getUpdatedMatrix(u32 timeOffset)
override;
91 [[nodiscard]] f32 calcRot(s32 frame)
const;
The stationary portion of the Dry Dry Ruins pillars. It just acts as a wall.
Represents the part of the Dry Dry Ruins pillar that falls.
f32 getCollisionRadius() const override
Finds the radius that fits fully in a BoxColUnit.
const u32 m_fallStart
The number of frames before the pillar will start to fall.
Represents the entirety of a pillar that falls on Dry Dry Ruins.
State m_state
0 when upright, 1 when falling, and 2 afterwards.
s32 m_groundFrame
Frame the pillar has finished falling.
EGG::Vector3f m_setupRot
Initial rotation of the pillar.
EGG::Matrix34f m_workMat
Rotation and translation matrix;.
const f32 m_targetRotation
How much the pillar rotates during the fall, in radians.
ObjectPillarC * m_collidable
Wall and hazard collision of the upright/falling pillar.
const u32 m_fallStart
The number of frames before the pillar will start to fall.
ObjectPillarBase * m_base
Stationary portion of pillar.
The highest level abstraction for a kart.