diff options
| author | jackpoz <giacomopoz@gmail.com> | 2019-06-15 20:49:03 +0200 |
|---|---|---|
| committer | jackpoz <giacomopoz@gmail.com> | 2019-06-15 20:49:34 +0200 |
| commit | c90f789eac9092d5332e92242ed0bfab7fd9e9fe (patch) | |
| tree | 431faec62b4b01d160d8c8e623b50fe7abaff282 /src | |
| parent | 96a5bdbe059f130946869c8439e98fbb677b6120 (diff) | |
Core/Unit: Ignore On Transport spline movements if the Unit isn't on a transport anymore
On Transport splines use coordinates relative to the transport but if the transport is not found anymore than there is no way to get the absolute coordinates, leading to relative coordinates being used as absolute instead. The result is a Unit being set at position (0, 0, 0) or close by.
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index ed6225b3a5b..5dc4e71572d 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -507,6 +507,8 @@ void Unit::UpdateSplinePosition() if (TransportBase* transport = GetDirectTransport()) transport->CalculatePassengerPosition(loc.x, loc.y, loc.z, &loc.orientation); + else + return; } if (HasUnitState(UNIT_STATE_CANNOT_TURN)) |
