Collision check in movement

This commit is contained in:
Yunfan Li
2024-08-12 11:52:33 +08:00
parent d3b1041719
commit 2b35aeb049
2 changed files with 9 additions and 4 deletions

View File

@@ -95,7 +95,7 @@ bool MoveToRpgTargetAction::Execute(Event event)
x += cos(angle) * INTERACTION_DISTANCE * distance;
y += sin(angle) * INTERACTION_DISTANCE * distance;
if (!wo->GetMap()->CheckCollisionAndGetValidCoords(wo, wo->GetPositionX(), wo->GetPositionY(), wo->GetPositionZ(),
x, y, z, false))
x, y, z))
{
x = wo->GetPositionX();
y = wo->GetPositionY();