From 7e32602124f9e35bca3fbccba9c9bd1d196e6423 Mon Sep 17 00:00:00 2001 From: Thorsten Otto Date: Wed, 20 Mar 2024 13:17:01 +0100 Subject: [PATCH] FootClass::Speed is modified by Set_Speed and must not be declared as const --- tiberiandawn/foot.cpp | 4 ++-- tiberiandawn/foot.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tiberiandawn/foot.cpp b/tiberiandawn/foot.cpp index eadd7a44..37fde5e0 100644 --- a/tiberiandawn/foot.cpp +++ b/tiberiandawn/foot.cpp @@ -272,7 +272,7 @@ void FootClass::Debug_Dump(MonoClass* mono) const void FootClass::Set_Speed(int speed) { speed &= 0xFF; - ((unsigned char&)Speed) = speed; + Speed = speed; } /*********************************************************************************************** @@ -2068,4 +2068,4 @@ COORDINATE FootClass::Likely_Coord(void) const return (Head_To_Coord()); } return (Target_Coord()); -} \ No newline at end of file +} diff --git a/tiberiandawn/foot.h b/tiberiandawn/foot.h index 9f40e5d7..14320b16 100644 --- a/tiberiandawn/foot.h +++ b/tiberiandawn/foot.h @@ -119,7 +119,7 @@ class FootClass : public TechnoClass ** This is the "throttle setting" of the unit. It is a fractional value with 0 = stop ** and 255 = full speed. */ - unsigned char const Speed; + unsigned char Speed; /* ** @@ -320,4 +320,4 @@ class FootClass : public TechnoClass */ }; -#endif \ No newline at end of file +#endif