diff options
Diffstat (limited to 'src/game/Object.cpp')
-rw-r--r-- | src/game/Object.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/game/Object.cpp b/src/game/Object.cpp index 2a38a63d457..204d654d000 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -1387,6 +1387,8 @@ float WorldObject::GetAngle( const float x, const float y ) const float dx = x - GetPositionX(); float dy = y - GetPositionY(); + if(!dx && !dy) + return 0; float ang = atan2(dy, dx); ang = (ang >= 0) ? ang : 2 * M_PI + ang; return ang; |