// September 2015 // Levee Patroller / Dijk Patrouille // This source file is (c) by Deltares. This source file is open source but only available to select users. Do not redistribute without written permission of Stichting Deltares, Delft, The Netherlands. // This header has been automatically generated. //============================================================================= // GeoPlayerController // Started using RTPlayerController And ExampleController (UDN) // // // // // ------------------------------------------------------------ // Created by Maarten van Zomeren // © 2007, Geodelft // // Date Id Modification //============================================================================= class GeoPlayerControllerMiniGame extends GeoPlayerController; //============================================================================= // TAKE ACTION // Date Id Modification // 2007-09-17 Zmr Created this header //============================================================================= exec function Takeaction() { local RedMarker marker; local failure tempFailure; local bool InFailureAlreadyMarker; if(PlacingMarker){ InFailureAlreadyMarker = false; marker = getNearestMarker(); if(failure(PlayerReplicationInfo.PlayerVolume)!=none) { tempFailure = failure(PlayerReplicationInfo.PlayerVolume); InFailureAlreadyMarker = (tempFailure.CurrentRedMarker != none); // log("GeoSimulator.HelpMenuPlaceRedMarkerdrietje"@InFailureAlreadyMarker); } // log("GeoSimulator.HelpMenuPlaceRedMarkereentje"); if(MarkerType == MK_Red && (marker != none && Abs(VSize(marker.Location - Pawn.Location)) < 1000||InFailureAlreadyMarker)){ // log("GeoSimulator.HelpMenuPlaceRedMarkertweetje"); if(!bShowedHelpRedMarker){ InMenu(true); ClientOpenMenu("GeoSimulator.HelpMenuPlaceRedMarker"); bShowedHelpRedMarker = true; } }else{ bShowedHelpRedMarker = false; PutMarkerDown(); } } else { if(bRememberWarning) { InMenu(true); if (IsDroogte() == false) { ClientOpenMenu("GeoSimulator.MenuActionCenterStandard"); } else { ClientOpenMenu("GeoSimulator.MenuActionCenterDroogte"); } bRememberWarning = false; } else if(bCorrectionWarning) { InMenu(true); if (IsDroogte() == false) { ClientOpenMenu("GeoSimulator.MenuActionCenterStandard"); } else { ClientOpenMenu("GeoSimulator.MenuActionCenterDroogte"); } bCorrectionWarning = false; } else if(NearByMarker!=None && NearByYellowMarker!=None) { InMenu(true); if(Abs(VSize(Pawn.Location - NearByMarker.Location)) < Abs(VSize(Pawn.Location - NearByYellowMarker.Location))) { ClientOpenMenu("GeoSimulator.MenuMarker"); } else { ClientOpenMenu("GeoSimulator.MenuYellowMarker"); } } else if(NearByMarker!=None) { InMenu(true); ClientOpenMenu("GeoSimulator.MenuMarker"); } else if(NearByYellowMarker!=None) { InMenu(true); ClientOpenMenu("GeoSimulator.MenuYellowMarker"); } } } //============================================================================= // Date Id Modification // 2006-10-09 The Created this header //============================================================================= defaultproperties { //TIMES FOR START AND ENDING OF GAME bGameStartingCall = false TimeInStart=5 TimeToEndIfOnlyNotSerious=900 TimeToEndGame=1440 }