From 56493c5bdfa181d172acbd56cb69589c28623b47 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 16 Mar 2021 00:59:53 +0000 Subject: Allow activities to be changed when doing them --- game/vehicles/train.cpp | 4 ++-- game/vehicles/train.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'game/vehicles') diff --git a/game/vehicles/train.cpp b/game/vehicles/train.cpp index f887be4..874db46 100644 --- a/game/vehicles/train.cpp +++ b/game/vehicles/train.cpp @@ -33,7 +33,7 @@ Train::tick(TickDuration dur) } void -Train::doActivity(const Go *, TickDuration dur) +Train::doActivity(Go *, TickDuration dur) { const auto maxSpeed = objects.front()->rvClass->maxSpeed; if (speed != maxSpeed) { @@ -42,7 +42,7 @@ Train::doActivity(const Go *, TickDuration dur) } void -Train::doActivity(const Idle *, TickDuration dur) +Train::doActivity(Idle *, TickDuration dur) { if (speed != 0.F) { speed -= std::min(speed, 30.F * dur.count()); diff --git a/game/vehicles/train.h b/game/vehicles/train.h index fb94102..e3dad73 100644 --- a/game/vehicles/train.h +++ b/game/vehicles/train.h @@ -28,8 +28,8 @@ public: void render(const Shader & shader) const override; void tick(TickDuration elapsed) override; - void doActivity(const Go *, TickDuration) override; - void doActivity(const Idle *, TickDuration) override; + void doActivity(Go *, TickDuration) override; + void doActivity(Idle *, TickDuration) override; [[nodiscard]] Location getBogiePosition(float linkDist, float dist) const; }; -- cgit v1.2.3