A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
ObjectDossunYokoMove.hh
1#pragma once
2
3#include "game/field/obj/ObjectDossun.hh"
4
5namespace Kinoko::Field {
6
8class ObjectDossunYokoMove final : public ObjectDossun {
9public:
11 ObjectDossunYokoMove(const System::MapdataGeoObj &params) : ObjectDossun(params) {}
12
14 ~ObjectDossunYokoMove() override = default;
15
17 void init() override {
18 m_railInterpolator->init(0.0f, 0);
19
20 // In the base game, `ObjectDossun::init()` initializes this to `AnmState::Still`, but not
21 // this override. As a result, this value is uninitialized for the derived class if the heap
22 // was not zero-initialized.
23 m_anmState = AnmState::Still;
24 }
25
27 void calc() override {
28 m_railInterpolator->calc();
29 setPos(m_railInterpolator->curPos());
30 }
31};
32
33} // namespace Kinoko::Field
Pertains to collision.