- 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
This commit is contained in:
Wanne
2011-10-20 08:39:03 +00:00
parent 25ecfdc6e1
commit 05d6436935
+7 -3
View File
@@ -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 );