1.1 --- a/core/PlayerManager.cpp Sun May 13 05:24:01 2007 +0000
1.2 +++ b/core/PlayerManager.cpp Sun May 13 05:51:30 2007 +0000
1.3 @@ -18,6 +18,7 @@
1.4 #include "AdminCache.h"
1.5 #include "ConCmdManager.h"
1.6 #include "MenuStyle_Valve.h"
1.7 +#include "MenuStyle_Radio.h"
1.8
1.9 PlayerManager g_Players;
1.10
1.11 @@ -385,24 +386,36 @@
1.12
1.13 void PlayerManager::OnClientCommand(edict_t *pEntity)
1.14 {
1.15 + int client = engine->IndexOfEdict(pEntity);
1.16 cell_t res = Pl_Continue;
1.17 - int client = engine->IndexOfEdict(pEntity);
1.18 -
1.19 - int args = engine->Cmd_Argc() - 1;
1.20 -
1.21 - m_clcommand->PushCell(client);
1.22 - m_clcommand->PushCell(args);
1.23 - m_clcommand->Execute(&res, NULL);
1.24 -
1.25 - if (res >= Pl_Stop)
1.26 - {
1.27 - RETURN_META(MRES_SUPERCEDE);
1.28 - }
1.29
1.30 bool result = g_ValveMenuStyle.OnClientCommand(client);
1.31 if (result)
1.32 {
1.33 res = Pl_Handled;
1.34 + } else {
1.35 + result = g_RadioMenuStyle.OnClientCommand(client);
1.36 + if (result)
1.37 + {
1.38 + res = Pl_Handled;
1.39 + }
1.40 + }
1.41 +
1.42 + int args = engine->Cmd_Argc() - 1;
1.43 +
1.44 + cell_t res2 = Pl_Continue;
1.45 + m_clcommand->PushCell(client);
1.46 + m_clcommand->PushCell(args);
1.47 + m_clcommand->Execute(&res2, NULL);
1.48 +
1.49 + if (res2 > res)
1.50 + {
1.51 + res = res2;
1.52 + }
1.53 +
1.54 + if (res >= Pl_Stop)
1.55 + {
1.56 + RETURN_META(MRES_SUPERCEDE);
1.57 }
1.58
1.59 res = g_ConCmds.DispatchClientCommand(client, (ResultType)res);