Add unsolo command

This commit is contained in:
def 2014-06-11 17:53:59 +02:00
parent 0549e1ef62
commit b8f93bdcea
3 changed files with 11 additions and 0 deletions

View file

@ -23,6 +23,7 @@ CONSOLE_COMMAND("unweapons", "", CFGFLAG_SERVER|CMDFLAG_TEST, ConUnWeapons, this
CONSOLE_COMMAND("ninja", "", CFGFLAG_SERVER|CMDFLAG_TEST, ConNinja, this, "Makes you a ninja")
CONSOLE_COMMAND("super", "", CFGFLAG_SERVER|CMDFLAG_TEST, ConSuper, this, "Makes you super")
CONSOLE_COMMAND("unsuper", "", CFGFLAG_SERVER|CMDFLAG_TEST, ConUnSuper, this, "Removes super from you")
CONSOLE_COMMAND("unsolo", "", CFGFLAG_SERVER|CMDFLAG_TEST, ConUnSolo, this, "Puts you out of solo part")
CONSOLE_COMMAND("left", "", CFGFLAG_SERVER|CMDFLAG_TEST, ConGoLeft, this, "Makes you move 1 tile left")
CONSOLE_COMMAND("right", "", CFGFLAG_SERVER|CMDFLAG_TEST, ConGoRight, this, "Makes you move 1 tile right")
CONSOLE_COMMAND("up", "", CFGFLAG_SERVER|CMDFLAG_TEST, ConGoUp, this, "Makes you move 1 tile up")

View file

@ -128,6 +128,15 @@ void CGameContext::ConUnSuper(IConsole::IResult *pResult, void *pUserData)
}
}
void CGameContext::ConUnSolo(IConsole::IResult *pResult, void *pUserData)
{
CGameContext *pSelf = (CGameContext *) pUserData;
if (!CheckClientID(pResult->m_ClientID))
return;
CCharacter* pChr = pSelf->GetPlayerChar(pResult->m_ClientID);
pChr->Teams()->m_Core.SetSolo(pResult->m_ClientID, false);
}
void CGameContext::ConShotgun(IConsole::IResult *pResult, void *pUserData)
{
CGameContext *pSelf = (CGameContext *) pUserData;

View file

@ -217,6 +217,7 @@ private:
static void ConKillPlayer(IConsole::IResult *pResult, void *pUserData);
static void ConNinja(IConsole::IResult *pResult, void *pUserData);
static void ConUnSolo(IConsole::IResult *pResult, void *pUserData);
static void ConUnSuper(IConsole::IResult *pResult, void *pUserData);
static void ConSuper(IConsole::IResult *pResult, void *pUserData);
static void ConShotgun(IConsole::IResult *pResult, void *pUserData);