Calculate building lag and show it next to APM counter
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include "table/sprites.h"
|
||||
|
||||
#include "citymania/cm_hotkeys.hpp"
|
||||
#include "citymania/cm_commands.hpp"
|
||||
|
||||
#include "safeguards.h"
|
||||
|
||||
@@ -137,6 +138,7 @@ struct StatusBarWindow : Window {
|
||||
}
|
||||
SetDParam(0, 999);
|
||||
SetDParam(1, 999);
|
||||
SetDParam(2, 9999);
|
||||
d = GetStringBoundingBox(STR_CM_STATUSBAR_APM);
|
||||
break;
|
||||
|
||||
@@ -212,6 +214,7 @@ struct StatusBarWindow : Window {
|
||||
auto epm = citymania::GetEPM();
|
||||
SetDParam(0, epm.second);
|
||||
SetDParam(1, epm.first);
|
||||
SetDParam(2, std::min(citymania::get_average_command_lag(), 9999));
|
||||
DrawString(tr, STR_CM_STATUSBAR_APM, TC_FROMSTRING, SA_HOR_CENTER);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user