Nasty fix for MP3 gamemodes
This commit is contained in:
parent
bb4a3e3eef
commit
6a92553e75
@ -802,11 +802,17 @@ class Dedimania implements CallbackListener, TimerListener, Plugin {
|
||||
*/
|
||||
private function getGameModeString() {
|
||||
$gameMode = $this->maniaControl->server->getGameMode();
|
||||
$scriptName = str_replace('.Script.txt', '', $this->maniaControl->client->getScriptName()["CurrentValue"]);
|
||||
if ($gameMode === null) {
|
||||
trigger_error("Couldn't retrieve game mode. ");
|
||||
return null;
|
||||
}
|
||||
switch($gameMode) {
|
||||
case 0:
|
||||
{
|
||||
if($scriptName == 'Rounds' || $scriptName == 'Cup' || $scriptName == 'Team') { return 'Rounds'; }
|
||||
else if($scriptName == 'TimeAttack' || $scriptName == 'Laps' || $scriptName == 'TeamAttack'){ return 'TA'; }
|
||||
}
|
||||
case 1:
|
||||
case 3:
|
||||
case 5:
|
||||
|
Loading…
Reference in New Issue
Block a user