Enhancement:

- SCROLL_SPEED_FACTOR in Ja2_Options.ini allows to modify scroll speed
- while reading MovementCosts.xml the game checks now for valid traversal type and asserts instead simply assigning type GROUNDBARRIER

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8295 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
silversurfer
2016-09-11 11:42:48 +00:00
parent cedb77bffb
commit 9395fcc8a2
5 changed files with 52 additions and 42 deletions
+32 -32
View File
@@ -3599,41 +3599,41 @@ void ScrollWorld( )
// Check for sliding
if (!TileIsOutOfBounds(gTacticalStatus.sSlideTarget))
{
// Ignore all input...
// Check if we have reached out dest!
if ( fFirstTimeInSlideToMode )
{
ubOldScrollSpeed = gubCurScrollSpeedID;
fFirstTimeInSlideToMode = FALSE;
}
// Ignore all input...
// Check if we have reached out dest!
if ( fFirstTimeInSlideToMode )
{
ubOldScrollSpeed = gubCurScrollSpeedID;
fFirstTimeInSlideToMode = FALSE;
}
// Make faster!
//gubCurScrollSpeedID = 2;
// Make faster!
//gubCurScrollSpeedID = 2;
ScrollFlags = 0;
fDoScroll = FALSE;
//
if ( SoldierLocationRelativeToScreen( gTacticalStatus.sSlideTarget, gTacticalStatus.sSlideReason, &bDirection, &ScrollFlags ) && GridNoOnVisibleWorldTile( gTacticalStatus.sSlideTarget ) )
{
ScrollFlags = gScrollDirectionFlags[ bDirection ];
fDoScroll = TRUE;
fIgnoreInput = TRUE;
}
else
{
// We've stopped!
gTacticalStatus.sSlideTarget = NOWHERE;
}
ScrollFlags = 0;
fDoScroll = FALSE;
//
if ( SoldierLocationRelativeToScreen( gTacticalStatus.sSlideTarget, gTacticalStatus.sSlideReason, &bDirection, &ScrollFlags ) && GridNoOnVisibleWorldTile( gTacticalStatus.sSlideTarget ) )
{
ScrollFlags = gScrollDirectionFlags[ bDirection ];
fDoScroll = TRUE;
fIgnoreInput = TRUE;
}
else
{
// We've stopped!
gTacticalStatus.sSlideTarget = NOWHERE;
}
}
else
{
// Restore old scroll speed
if ( !fFirstTimeInSlideToMode )
{
gubCurScrollSpeedID = ubOldScrollSpeed;
}
fFirstTimeInSlideToMode = TRUE;
}
else
{
// Restore old scroll speed
if ( !fFirstTimeInSlideToMode )
{
gubCurScrollSpeedID = ubOldScrollSpeed;
}
fFirstTimeInSlideToMode = TRUE;
}
}
if ( !fIgnoreInput )