TWP: Fix impossible to pickup some objects

This commit is contained in:
scemino 2024-02-08 12:45:28 +01:00 committed by Eugene Sandulenko
parent 4ed379403a
commit 866a7db57f

View File

@ -1374,7 +1374,7 @@ struct GetByZorder {
GetByZorder(Common::SharedPtr<Object> &result) : _result(result) { result = nullptr; }
bool operator()(Common::SharedPtr<Object> obj) {
if (obj->_node->getZSort() < _zOrder) {
if (obj->_node->getZSort() <= _zOrder) {
_result = obj;
_zOrder = obj->_node->getZSort();
}