| 1505 | } |
| 1506 | |
| 1507 | size_t OnObjectTileAction(const TCmd &cmd, Player &player, action_id action, bool pathToObject = true) |
| 1508 | { |
| 1509 | const auto &message = reinterpret_cast<const TCmdLoc &>(cmd); |
| 1510 | const Point position { message.x, message.y }; |
| 1511 | const Object *object = FindObjectAtPosition(position); |
| 1512 | |
| 1513 | if (gbBufferMsgs != 1 && player.isOnActiveLevel() && object != nullptr) { |
| 1514 | if (pathToObject) |
| 1515 | MakePlrPath(player, position, !object->_oSolidFlag && !object->_oDoorFlag); |
| 1516 | |
| 1517 | player.destAction = action; |
| 1518 | player.destParam1 = object->GetId(); |
| 1519 | } |
| 1520 | |
| 1521 | return sizeof(message); |
| 1522 | } |
| 1523 | |
| 1524 | size_t OnAttackMonster(const TCmd *pCmd, Player &player) |
| 1525 | { |
no test coverage detected