From ad874776502d1832b08e21c2d072cb2001d4cea5 Mon Sep 17 00:00:00 2001 From: Boondorl Date: Sat, 25 Jan 2025 09:51:28 -0500 Subject: [PATCH] Make DBehavior final Specifics should be implemented in ZScript. --- src/playsim/actor.h | 2 +- src/playsim/p_mobj.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/playsim/actor.h b/src/playsim/actor.h index b852053736..7d1bb87404 100644 --- a/src/playsim/actor.h +++ b/src/playsim/actor.h @@ -778,7 +778,7 @@ public: void Serialize(FSerializer& arc) override; }; -class DBehavior : public DObject +class DBehavior final : public DObject { DECLARE_CLASS(DBehavior, DObject) HAS_OBJECT_POINTERS diff --git a/src/playsim/p_mobj.cpp b/src/playsim/p_mobj.cpp index 93480d6fa8..6677e4fa4b 100644 --- a/src/playsim/p_mobj.cpp +++ b/src/playsim/p_mobj.cpp @@ -665,10 +665,10 @@ void AActor::MoveBehaviors(AActor& from) } b->Owner = this; - if (b->Level != b->Owner->Level) + if (b->Level != Level) { b->Level->RemoveActorBehavior(*b); - b->Owner->Level->AddActorBehavior(*b); + Level->AddActorBehavior(*b); } }