Preliminary cyborg mode battle speed fix. Makes Normal speed actually 'normal'; bug #724
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1701 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -177,6 +177,7 @@ DoBattle (BATTLE_STATE *bs)
|
||||
{
|
||||
extern UWORD nth_frame;
|
||||
RECT r;
|
||||
BYTE battle_speed;
|
||||
|
||||
bs->MenuRepeatDelay = 0;
|
||||
SetMenuSounds (MENU_SOUND_NONE, MENU_SOUND_NONE);
|
||||
@@ -209,11 +210,16 @@ DoBattle (BATTLE_STATE *bs)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (nth_frame)
|
||||
|
||||
battle_speed = HIBYTE (nth_frame);
|
||||
if (battle_speed == (BYTE)~0)
|
||||
{ // maximum speed, nothing rendered at all
|
||||
TaskSwitch ();
|
||||
}
|
||||
else
|
||||
{
|
||||
SleepThreadUntil (bs->NextTime + BATTLE_FRAME_RATE);
|
||||
SleepThreadUntil (bs->NextTime
|
||||
+ BATTLE_FRAME_RATE / (battle_speed + 1));
|
||||
bs->NextTime = GetTimeCounter ();
|
||||
}
|
||||
return (BOOLEAN) ((GLOBAL (CurrentActivity) & IN_BATTLE) != 0);
|
||||
|
||||
Reference in New Issue
Block a user