fix: follow-up minievents properly wait for the specified time (by rftr)

fix: money income from rebel command displays properly in finances (by rftr)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9188 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2021-10-18 06:15:40 +00:00
parent a3bcfef40a
commit ff172cc92f
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -1604,6 +1604,10 @@ void ProcessTransactionString(STR16 pString, FinanceUnitPtr pFinance)
case MINI_EVENT:
swprintf(pString, L"%s", pTransactionText[MINI_EVENT]);
break;
case REBEL_COMMAND:
swprintf(pString, L"%s", pTransactionText[REBEL_COMMAND]);
break;
}
}
+1 -1
View File
@@ -1511,7 +1511,7 @@ void CheckMiniEvents(UINT32 nextEventId)
static void QueueNextMiniEvent(UINT32 nextEventId, UINT32 hoursToNextMiniEvent)
{
const UINT32 timestamp = GetWorldTotalMin() + gGameExternalOptions.fMiniEventsMinHoursBetweenEvents * 60 + Random((gGameExternalOptions.fMiniEventsMaxHoursBetweenEvents - gGameExternalOptions.fMiniEventsMinHoursBetweenEvents) * 60);
AddStrategicEvent(EVENT_MINIEVENT, hoursToNextMiniEvent > 0 ? hoursToNextMiniEvent : timestamp, nextEventId);
AddStrategicEvent(EVENT_MINIEVENT, hoursToNextMiniEvent > 0 ? GetWorldTotalMin() + 60 * hoursToNextMiniEvent : timestamp, nextEventId);
}
// LUA STUFF FOLLOWS