titleprefix fix

This commit is contained in:
kremsy authored and Steffen Schröder committed 2014-05-01 17:35:33 +02:00
1 parent 49805f06b3
commit dbdc318bba
9 files changed
+36 -43

No files matched your search

@@ -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;
}