Browse Source

Correct casing for isDoor()

pull/5189/head
Anders Jenbo 4 years ago
parent
commit
7c9111ddb0
  1. 2
      Source/engine/path.cpp
  2. 2
      Source/objects.h
  3. 2
      Source/track.cpp

2
Source/engine/path.cpp

@ -329,7 +329,7 @@ bool IsTileWalkable(Point position, bool ignoreDoors)
{ {
Object *object = FindObjectAtPosition(position); Object *object = FindObjectAtPosition(position);
if (object != nullptr) { if (object != nullptr) {
if (ignoreDoors && object->IsDoor()) { if (ignoreDoors && object->isDoor()) {
return true; return true;
} }
if (object->_oSolidFlag) { if (object->_oSolidFlag) {

2
Source/objects.h

@ -222,7 +222,7 @@ struct Object {
* @brief Check if this object is a door * @brief Check if this object is a door
* @return True if the object is one of the door types (see _object_id) * @return True if the object is one of the door types (see _object_id)
*/ */
[[nodiscard]] constexpr bool IsDoor() const [[nodiscard]] constexpr bool isDoor() const
{ {
return IsAnyOf(_otype, _object_id::OBJ_L1LDOOR, _object_id::OBJ_L1RDOOR, _object_id::OBJ_L2LDOOR, _object_id::OBJ_L2RDOOR, _object_id::OBJ_L3LDOOR, _object_id::OBJ_L3RDOOR, _object_id::OBJ_L5LDOOR, _object_id::OBJ_L5RDOOR); return IsAnyOf(_otype, _object_id::OBJ_L1LDOOR, _object_id::OBJ_L1RDOOR, _object_id::OBJ_L2LDOOR, _object_id::OBJ_L2RDOOR, _object_id::OBJ_L3LDOOR, _object_id::OBJ_L3RDOOR, _object_id::OBJ_L5LDOOR, _object_id::OBJ_L5RDOOR);
} }

2
Source/track.cpp

@ -109,7 +109,7 @@ void RepeatMouseAction()
CheckPlrSpell(false); CheckPlrSpell(false);
break; break;
case MouseActionType::OperateObject: case MouseActionType::OperateObject:
if (ObjectUnderCursor != nullptr && !ObjectUnderCursor->IsDoor()) { if (ObjectUnderCursor != nullptr && !ObjectUnderCursor->isDoor()) {
// This should probably be cursPosition so paths to large objects are consistent // This should probably be cursPosition so paths to large objects are consistent
NetSendCmdLoc(MyPlayerId, true, CMD_OPOBJXY, ObjectUnderCursor->position); NetSendCmdLoc(MyPlayerId, true, CMD_OPOBJXY, ObjectUnderCursor->position);
} }

Loading…
Cancel
Save