mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Dynamic dialogue boxes cause less issues when scrolling
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8486 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -319,6 +319,18 @@ void RefreshBoxes( )
|
||||
// also halt dialogue if sector inventory is open
|
||||
if ( guiCurrentScreen == GAME_SCREEN || guiCurrentScreen == MAP_SCREEN && !fShowMapInventoryPool )
|
||||
{
|
||||
// if we are scrolling, don't redraw the boxes as often
|
||||
if (gfScrollPending || gfScrollInertia)
|
||||
{
|
||||
UINT32 timepassednotdisplaying = max(0, GetJA2Clock() - lasttimenhere);
|
||||
|
||||
if (timepassednotdisplaying < 100)
|
||||
{
|
||||
lasttimenhere = GetJA2Clock();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// refresh all boxes, and while you're at it, check wether there are any
|
||||
BOOLEAN fFound = FALSE;
|
||||
for ( UINT8 i = 0; i < MYBOX_NUMBER; ++i )
|
||||
@@ -344,7 +356,8 @@ void RefreshBoxes( )
|
||||
else
|
||||
{
|
||||
// boxes are active, thus we have to refresh them
|
||||
fMapPanelDirty = TRUE;
|
||||
if (guiCurrentScreen == MAP_SCREEN)
|
||||
fMapPanelDirty = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user