bugfixes for game stats
This commit is contained in:
parent
42bd6b6bd3
commit
2f197aa8aa
|
@ -85,22 +85,22 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function getTimeString($frames) {
|
function getTimeString($frames) {
|
||||||
$framesleft = $frames;
|
$framesleft = (int)$frames;
|
||||||
$updateFps = 40.0;
|
$updateFps = 40.0;
|
||||||
|
|
||||||
$hours = ( int )$frames / ( float )$updateFps / 3600.0;
|
$hours = (int)($frames / $updateFps / 3600.0);
|
||||||
$framesleft = $framesleft - $hours * 3600 * $updateFps;
|
$framesleft = $framesleft - $hours * 3600 * $updateFps;
|
||||||
$minutes = ( int )$framesleft / ( float )$updateFps / 60.0;
|
$minutes = (int)($framesleft / $updateFps / 60.0);
|
||||||
$framesleft = $framesleft - $minutes * 60 * $updateFps;
|
$framesleft = $framesleft - $minutes * 60 * $updateFps;
|
||||||
$seconds = ( int )$framesleft / ( float )$updateFps;
|
$seconds = (int)($framesleft / $updateFps);
|
||||||
|
|
||||||
$hourstr = strval(( int )$hours);
|
$hourstr = $hours;
|
||||||
if($hours < 10) $hourstr = "0" . $hourstr;
|
if($hours < 10) $hourstr = "0" . $hourstr;
|
||||||
|
|
||||||
$minutestr = strval(( int )$minutes);
|
$minutestr = $minutes;
|
||||||
if($minutes < 10) $minutestr = "0" . $minutestr;
|
if($minutes < 10) $minutestr = "0" . $minutestr;
|
||||||
|
|
||||||
$secondstr = strval(( int )$seconds);
|
$secondstr = $seconds;
|
||||||
if($seconds < 10) $secondstr = "0" . $secondstr;
|
if($seconds < 10) $secondstr = "0" . $secondstr;
|
||||||
|
|
||||||
return $hourstr . ":" . $minutestr . ":" . $secondstr;
|
return $hourstr . ":" . $minutestr . ":" . $secondstr;
|
||||||
|
|
|
@ -123,7 +123,7 @@
|
||||||
$status_class = 'unknown';
|
$status_class = 'unknown';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($status_code == 3 && $server['gameUUID'] != "")
|
if (($status_code == 2 || $status_code == 3) && $server['gameUUID'] != "")
|
||||||
{
|
{
|
||||||
printf( "\t\t\t\t<td title=\"%s\" class=\"%s\"><a href='showGameStats.php?gameUUID=%s'>%s</a></td>%s", $server['status'], $status_class, $server['gameUUID'], htmlspecialchars( $status_title, ENT_QUOTES ), PHP_EOL );
|
printf( "\t\t\t\t<td title=\"%s\" class=\"%s\"><a href='showGameStats.php?gameUUID=%s'>%s</a></td>%s", $server['status'], $status_class, $server['gameUUID'], htmlspecialchars( $status_title, ENT_QUOTES ), PHP_EOL );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user