mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Mobile Militia Improvements (by moa)
Each setting in ini now has the effect that the user expects, he now sees the correct restrictions on the map, and is able to adjust manually as neccessary - RESTRICT_ROAMING = TRUE activates the manual adjustable restrictions based on exploration and/or conquest. Any of the following settings can be mixed as you like - ALLOW_MILITIA_MOVEMENT_THROUGH_EXPLORED_SECTORS = TRUE Exploration based: any liberated sector is potentially accessible for mobile militia. You need to load the map and defeat all enemies. Walking through on strategic view is unsufficient! - ALLOW_DYNAMIC_RESTRICTED_ROAMING = TRUE Conquest based: Liberating a town will increase the accessible sector count. See Data-1.13/TableData/Map/DynamicRestrictions.XML - ALLOW_MILITIA_MOVEMENT_THROUGH_MINOR_CITIES = TRUE Mobile militia can move thru cities where militia training is not allowed(e.g. Tixa, San Mona, Omerta,...) In earlier versions those cities where allready included in DynamicRestrictions.XML which rendered this setting allmost useless. NOTE: Older savegames have still the 'gray' sector restriction set. Those will be converted to 'red' according to the settings in Ja2_Options.INI on load. see: http://www.bears-pit.com/board/ubbthreads.php/topics/325133/Re_Fix_Catched_the_mobiles.html#Post325133 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6400 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+14
-1
@@ -8981,7 +8981,20 @@ void PollRightButtonInMapView( UINT32 *puiNewEvent )
|
||||
// loops back to start.
|
||||
// HEADROCK HAM 5: Whoops, disallow changing restrictions for sectors that are
|
||||
// not accessible to militia to begin with.
|
||||
if ( fShowMobileRestrictionsFlag == TRUE && gDynamicRestrictMilitia[ SECTOR( sMapX, sMapY ) ] == TRUE)
|
||||
//Moa: we should be able to change restrictions where ever the militia is potentially allowed to move.
|
||||
// Able to change restriction if:
|
||||
// Potentially allowed:
|
||||
// - we are in mobile Restrictions view && we have RESTRICT_ROAMING = TRUE in ini &&
|
||||
// - ALLOW_MILITIA_MOVEMENT_THROUGH_EXPLORED_SECTORS = TRUE && we have liberated that sector at least once
|
||||
// note that ALLOW_MILITIA_MOVEMENT_THROUGH_EXPLORED_SECTORS = TRUE does not overwrites any restrictions anymore it extends the region where restrictions are allowed, just like DynamicRestriction does
|
||||
// - ALLOW_MILITIA_MOVEMENT_THROUGH_MINOR_CITIES = TRUE && it is a Minor Cities && we have liberated that citysector
|
||||
// - DynamicRestrictions if set in ini (does not matter if visited or not)
|
||||
//if ( fShowMobileRestrictionsFlag == TRUE && gDynamicRestrictMilitia[ SECTOR( sMapX, sMapY ) ] == TRUE)
|
||||
if ( fShowMobileRestrictionsFlag && gGameExternalOptions.gflimitedRoaming &&
|
||||
( ( gGameExternalOptions.fUnrestrictVisited == TRUE && SectorInfo[ SECTOR( sMapX, sMapY ) ].fSurfaceWasEverPlayerControlled )
|
||||
|| ( gGameExternalOptions.fAllowMilitiaMoveThroughMinorCities && GetTownIdForSector( sMapX, sMapY ) > BLANK_SECTOR && !gfMilitiaAllowedInTown[GetTownIdForSector( sMapX, sMapY )] && SectorInfo[ SECTOR( sMapX, sMapY ) ].fSurfaceWasEverPlayerControlled )
|
||||
|| ( gGameExternalOptions.fDynamicRestrictRoaming && gDynamicRestrictMilitia[ SECTOR( sMapX, sMapY ) ] == TRUE )
|
||||
) )
|
||||
{
|
||||
// Restrict more.
|
||||
if ( gubManualRestrictMilitia[ SECTOR( sMapX, sMapY ) ] > MANUAL_MOBILE_NO_ENTER )
|
||||
|
||||
Reference in New Issue
Block a user