callback handling for script begin map callbacks
This commit is contained in:
parent
16042974fd
commit
0390b8794d
@ -180,7 +180,7 @@ class CallbackManager {
|
|||||||
|
|
||||||
// Server Callbacks
|
// Server Callbacks
|
||||||
if (!$this->maniaControl->client) return;
|
if (!$this->maniaControl->client) return;
|
||||||
|
|
||||||
$callbacks = $this->maniaControl->client->executeCallbacks();
|
$callbacks = $this->maniaControl->client->executeCallbacks();
|
||||||
if (!is_array($callbacks)) {
|
if (!is_array($callbacks)) {
|
||||||
trigger_error("Error reading server callbacks. " . $this->maniaControl->getClientErrorText());
|
trigger_error("Error reading server callbacks. " . $this->maniaControl->getClientErrorText());
|
||||||
@ -225,6 +225,14 @@ class CallbackManager {
|
|||||||
$scriptCallbackData = $callback[1];
|
$scriptCallbackData = $callback[1];
|
||||||
$scriptCallbackName = $scriptCallbackData[0];
|
$scriptCallbackName = $scriptCallbackData[0];
|
||||||
switch ($scriptCallbackName) {
|
switch ($scriptCallbackName) {
|
||||||
|
case 'BeginMap':
|
||||||
|
$this->triggerScriptCallback($scriptCallbackName, $scriptCallbackData);
|
||||||
|
$this->triggerCallback(self::CB_MC_BEGINMAP, $callback);
|
||||||
|
break;
|
||||||
|
case 'LibXmlRpc_BeginMap':
|
||||||
|
$this->triggerScriptCallback($scriptCallbackName, $scriptCallbackData);
|
||||||
|
$this->triggerCallback(self::CB_MC_BEGINMAP, $callback);
|
||||||
|
break;
|
||||||
case 'EndMap':
|
case 'EndMap':
|
||||||
$this->triggerScriptCallback($scriptCallbackName, $scriptCallbackData);
|
$this->triggerScriptCallback($scriptCallbackName, $scriptCallbackData);
|
||||||
if (!$this->mapEnded) {
|
if (!$this->mapEnded) {
|
||||||
|
Loading…
Reference in New Issue
Block a user