| 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 | { |
nothing calls this directly
no test coverage detected