mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Added command uninvis_me
Signed-off-by: GreYFoXGTi <GreYFoXGTi@GMaiL.CoM>
This commit is contained in:
parent
427fedb79b
commit
c17371d2e4
|
@ -2014,11 +2014,21 @@ void CGameContext::ConInvisMe(IConsole::IResult *pResult, void *pUserData, int c
|
|||
pSelf->m_apPlayers[cid]->m_Invisible = true;
|
||||
}
|
||||
|
||||
void CGameContext::ConUnInvisMe(IConsole::IResult *pResult, void *pUserData, int cid)
|
||||
{
|
||||
CGameContext *pSelf = (CGameContext *)pUserData;
|
||||
//if(!pSelf->CheatsAvailable(cid)) return;
|
||||
if (!pSelf->m_apPlayers[cid])
|
||||
return;
|
||||
pSelf->m_apPlayers[cid]->m_Invisible = false;
|
||||
}
|
||||
|
||||
void CGameContext::OnConsoleInit()
|
||||
{
|
||||
m_pServer = Kernel()->RequestInterface<IServer>();
|
||||
m_pConsole = Kernel()->RequestInterface<IConsole>();
|
||||
Console()->Register("invis_me", "", CFGFLAG_SERVER, ConInvisMe, this, "",1);
|
||||
Console()->Register("uninvis_me", "", CFGFLAG_SERVER, ConUnInvisMe, this, "",1);
|
||||
Console()->Register("freeze", "i?i", CFGFLAG_SERVER, ConFreeze, this, "Freezes Player i1 for i2 seconds Default Infinity",2);
|
||||
Console()->Register("unfreeze", "i", CFGFLAG_SERVER, ConUnFreeze, this, "UnFreezes Player i",2);
|
||||
Console()->Register("timerstop", "i", CFGFLAG_SERVER, ConTimerStop, this, "Stops The Timer of Player i",2);
|
||||
|
|
|
@ -107,6 +107,7 @@ class CGameContext : public IGameServer
|
|||
static void ConchainSpecialMotdupdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
|
||||
|
||||
static void ConInvisMe(IConsole::IResult *pResult, void *pUserData, int cid);
|
||||
static void ConUnInvisMe(IConsole::IResult *pResult, void *pUserData, int cid);
|
||||
|
||||
CGameContext(int Resetting);
|
||||
void Construct(int Resetting);
|
||||
|
|
Loading…
Reference in a new issue