MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / Execute

Method Execute

ogsr_engine/xrGame/console_commands.cpp:1080–1099  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1078{
1079 CCC_StartTimeSingle(LPCSTR N) : IConsole_Command(N){};
1080 virtual void Execute(LPCSTR args)
1081 {
1082 u32 year = 1, month = 1, day = 1, hours = 0, mins = 0, secs = 0, milisecs = 0;
1083 sscanf(args, "%d.%d.%d %d:%d:%d.%d", &year, &month, &day, &hours, &mins, &secs, &milisecs);
1084 year = _max(year, 1);
1085 month = _max(month, 1);
1086 day = _max(day, 1);
1087 g_qwStartGameTime = generate_time(year, month, day, hours, mins, secs, milisecs);
1088
1089 if (!g_pGameLevel)
1090 return;
1091
1092 if (!Level().Server)
1093 return;
1094
1095 if (!Level().Server->game)
1096 return;
1097
1098 Level().Server->game->SetGameTimeFactor(g_qwStartGameTime, g_fTimeFactor);
1099 }
1100
1101 virtual void Status(TStatus& S)
1102 {

Callers

nothing calls this directly

Calls 3

generate_timeFunction · 0.85
_maxFunction · 0.50
SetGameTimeFactorMethod · 0.45

Tested by

no test coverage detected