titleprefix fix

This commit is contained in:
kremsy
2014-03-12 13:07:02 +01:00
committed by Steffen Schröder
parent 49805f06b3
commit dbdc318bba
9 changed files with 36 additions and 43 deletions

View File

@ -190,9 +190,7 @@ class CallbackManager {
$callbackName = $callback[0];
switch($callbackName) {
case 'ManiaPlanet.BeginMatch':
$titleId = $this->maniaControl->server->titleId;
$titlePrefix = strtolower(substr($titleId, 0, 2));
if ($titlePrefix == "sm") {
if ($this->maniaControl->mapManager->getCurrentMap()->getGame() == 'sm') {
$this->triggerCallback($callbackName, $callback);
break;
}
@ -201,9 +199,7 @@ class CallbackManager {
$this->triggerCallback($callbackName, $callback);
break;
case 'ManiaPlanet.EndMatch': //TODO temporary fix
$titleId = $this->maniaControl->server->titleId;
$titlePrefix = strtolower(substr($titleId, 0, 2));
if ($titlePrefix == "sm") {
if ($this->maniaControl->mapManager->getCurrentMap()->getGame() == 'sm') {
$this->triggerCallback($callbackName, $callback);
break;
}