Correct ServerActiveObject's virtual getArmorGroups() to be const.
authorBeha <shacknetisp@mail.com>
Thu, 1 Aug 2019 15:11:43 +0000 (11:11 -0400)
committersfan5 <sfan5@live.de>
Thu, 1 Aug 2019 16:14:37 +0000 (18:14 +0200)
Due to commit ec3142a , UnitSAO's getArmorGroups() did not match
ServerActiveObject's, notably resulting in the lua get_armor_groups() call
returning nothing.

src/serverobject.h

index 42eed071051ed85178429575e55689bfe969bef2..08f7a7e5878e3f6c1f719a91f083ded2452ed294 100644 (file)
@@ -147,7 +147,7 @@ public:
 
        virtual void setArmorGroups(const ItemGroupList &armor_groups)
        {}
-       virtual const ItemGroupList &getArmorGroups()
+       virtual const ItemGroupList &getArmorGroups() const
        { static ItemGroupList rv; return rv; }
        virtual void setPhysicsOverride(float physics_override_speed, float physics_override_jump, float physics_override_gravity)
        {}