Skip to content

Commit

Permalink
Correct ServerActiveObject's virtual getArmorGroups() to be const.
Browse files Browse the repository at this point in the history
Due to commit ec3142a , UnitSAO's getArmorGroups() did not match
ServerActiveObject's, notably resulting in the lua get_armor_groups() call
returning nothing.
  • Loading branch information
linewriter1024 authored and sfan5 committed Aug 1, 2019
1 parent 3ceef8e commit 1a97d06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/serverobject.h
Expand Up @@ -147,7 +147,7 @@ class ServerActiveObject : public ActiveObject

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)
{}
Expand Down

0 comments on commit 1a97d06

Please sign in to comment.