From 05d64369352433bbe554e1d951761d13a86179d3 Mon Sep 17 00:00:00 2001 From: Wanne Date: Thu, 20 Oct 2011 08:39:03 +0000 Subject: [PATCH] - Bugfix: closed loophole for helicopter hovering forever (by Buggler) o See Bears Pit post: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=292033#Post292033 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4724 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Strategic/mapscreen.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Strategic/mapscreen.cpp b/Strategic/mapscreen.cpp index 39b68a3b..1ae2330f 100644 --- a/Strategic/mapscreen.cpp +++ b/Strategic/mapscreen.cpp @@ -11960,11 +11960,15 @@ BOOLEAN CheckIfClickOnLastSectorInPath( INT16 sX, INT16 sY ) // check if helicopter if( fPlotForHelicopter == TRUE ) { + // helicopter route confirmed if( sX + ( sY * MAP_WORLD_X ) == GetLastSectorOfHelicoptersPath( ) ) { - // helicopter route confirmed - take off - TakeOffHelicopter( ); - + // if confirm moving to another sector + if( ( CheckForClickOverHelicopterIcon( sX, sY ) == FALSE ) ) + { + // take off + TakeOffHelicopter( ); + } // rebuild waypoints - helicopter ppMovePath = &( pVehicleList[ iHelicopterVehicleId ].pMercPath ); RebuildWayPointsForGroupPath( *ppMovePath, pVehicleList[ iHelicopterVehicleId ].ubMovementGroup );