Skip to content

Commit 1a97d06

Browse files
linewriter1024sfan5
authored andcommittedAug 1, 2019
Correct ServerActiveObject's virtual getArmorGroups() to be const.
Due to commit ec3142a , UnitSAO's getArmorGroups() did not match ServerActiveObject's, notably resulting in the lua get_armor_groups() call returning nothing.
1 parent 3ceef8e commit 1a97d06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/serverobject.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class ServerActiveObject : public ActiveObject
147147

148148
virtual void setArmorGroups(const ItemGroupList &armor_groups)
149149
{}
150-
virtual const ItemGroupList &getArmorGroups()
150+
virtual const ItemGroupList &getArmorGroups() const
151151
{ static ItemGroupList rv; return rv; }
152152
virtual void setPhysicsOverride(float physics_override_speed, float physics_override_jump, float physics_override_gravity)
153153
{}

0 commit comments

Comments
 (0)
Please sign in to comment.