mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-17 21:48:19 +00:00
Add rcon commands (un)infinite_jump, practice commands /(un)infjump
This commit is contained in:
parent
7a74c05b2d
commit
3f676794f6
|
@ -2166,6 +2166,13 @@ void CGameContext::ConPracticeJetpack(IConsole::IResult *pResult, void *pUserDat
|
||||||
ConJetpack(pResult, pUserData);
|
ConJetpack(pResult, pUserData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CGameContext::ConPracticeEndlessJump(IConsole::IResult *pResult, void *pUserData)
|
||||||
|
{
|
||||||
|
CGameContext *pSelf = (CGameContext *)pUserData;
|
||||||
|
if(pSelf->GetPracticeCharacter(pResult))
|
||||||
|
ConEndlessJump(pResult, pUserData);
|
||||||
|
}
|
||||||
|
|
||||||
void CGameContext::ConPracticeSetJumps(IConsole::IResult *pResult, void *pUserData)
|
void CGameContext::ConPracticeSetJumps(IConsole::IResult *pResult, void *pUserData)
|
||||||
{
|
{
|
||||||
CGameContext *pSelf = (CGameContext *)pUserData;
|
CGameContext *pSelf = (CGameContext *)pUserData;
|
||||||
|
@ -2208,6 +2215,13 @@ void CGameContext::ConPracticeUnJetpack(IConsole::IResult *pResult, void *pUserD
|
||||||
ConUnJetpack(pResult, pUserData);
|
ConUnJetpack(pResult, pUserData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CGameContext::ConPracticeUnEndlessJump(IConsole::IResult *pResult, void *pUserData)
|
||||||
|
{
|
||||||
|
CGameContext *pSelf = (CGameContext *)pUserData;
|
||||||
|
if(pSelf->GetPracticeCharacter(pResult))
|
||||||
|
ConUnEndlessJump(pResult, pUserData);
|
||||||
|
}
|
||||||
|
|
||||||
void CGameContext::ConPracticeUnWeapons(IConsole::IResult *pResult, void *pUserData)
|
void CGameContext::ConPracticeUnWeapons(IConsole::IResult *pResult, void *pUserData)
|
||||||
{
|
{
|
||||||
CGameContext *pSelf = (CGameContext *)pUserData;
|
CGameContext *pSelf = (CGameContext *)pUserData;
|
||||||
|
|
|
@ -277,6 +277,14 @@ void CGameContext::ConJetpack(IConsole::IResult *pResult, void *pUserData)
|
||||||
pChr->SetJetpack(true);
|
pChr->SetJetpack(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CGameContext::ConEndlessJump(IConsole::IResult *pResult, void *pUserData)
|
||||||
|
{
|
||||||
|
CGameContext *pSelf = (CGameContext *)pUserData;
|
||||||
|
CCharacter *pChr = pSelf->GetPlayerChar(pResult->m_ClientId);
|
||||||
|
if(pChr)
|
||||||
|
pChr->SetEndlessJump(true);
|
||||||
|
}
|
||||||
|
|
||||||
void CGameContext::ConSetJumps(IConsole::IResult *pResult, void *pUserData)
|
void CGameContext::ConSetJumps(IConsole::IResult *pResult, void *pUserData)
|
||||||
{
|
{
|
||||||
CGameContext *pSelf = (CGameContext *)pUserData;
|
CGameContext *pSelf = (CGameContext *)pUserData;
|
||||||
|
@ -317,6 +325,14 @@ void CGameContext::ConUnJetpack(IConsole::IResult *pResult, void *pUserData)
|
||||||
pChr->SetJetpack(false);
|
pChr->SetJetpack(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CGameContext::ConUnEndlessJump(IConsole::IResult *pResult, void *pUserData)
|
||||||
|
{
|
||||||
|
CGameContext *pSelf = (CGameContext *)pUserData;
|
||||||
|
CCharacter *pChr = pSelf->GetPlayerChar(pResult->m_ClientId);
|
||||||
|
if(pChr)
|
||||||
|
pChr->SetEndlessJump(false);
|
||||||
|
}
|
||||||
|
|
||||||
void CGameContext::ConUnWeapons(IConsole::IResult *pResult, void *pUserData)
|
void CGameContext::ConUnWeapons(IConsole::IResult *pResult, void *pUserData)
|
||||||
{
|
{
|
||||||
CGameContext *pSelf = (CGameContext *)pUserData;
|
CGameContext *pSelf = (CGameContext *)pUserData;
|
||||||
|
|
|
@ -161,6 +161,11 @@ void CCharacter::SetJetpack(bool Active)
|
||||||
m_Core.m_Jetpack = Active;
|
m_Core.m_Jetpack = Active;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CCharacter::SetEndlessJump(bool Active)
|
||||||
|
{
|
||||||
|
m_Core.m_EndlessJump = Active;
|
||||||
|
}
|
||||||
|
|
||||||
void CCharacter::SetJumps(int Jumps)
|
void CCharacter::SetJumps(int Jumps)
|
||||||
{
|
{
|
||||||
m_Core.m_Jumps = Jumps;
|
m_Core.m_Jumps = Jumps;
|
||||||
|
|
|
@ -48,6 +48,7 @@ public:
|
||||||
|
|
||||||
void SetWeapon(int W);
|
void SetWeapon(int W);
|
||||||
void SetJetpack(bool Active);
|
void SetJetpack(bool Active);
|
||||||
|
void SetEndlessJump(bool Active);
|
||||||
void SetJumps(int Jumps);
|
void SetJumps(int Jumps);
|
||||||
void SetSolo(bool Solo);
|
void SetSolo(bool Solo);
|
||||||
void SetSuper(bool Super);
|
void SetSuper(bool Super);
|
||||||
|
|
|
@ -3692,6 +3692,8 @@ void CGameContext::RegisterDDRaceCommands()
|
||||||
Console()->Register("super", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConSuper, this, "Makes you super");
|
Console()->Register("super", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConSuper, this, "Makes you super");
|
||||||
Console()->Register("unsuper", "", CFGFLAG_SERVER, ConUnSuper, this, "Removes super from you");
|
Console()->Register("unsuper", "", CFGFLAG_SERVER, ConUnSuper, this, "Removes super from you");
|
||||||
Console()->Register("invincible", "?i['0'|'1']", CFGFLAG_SERVER | CMDFLAG_TEST, ConToggleInvincible, this, "Toggles invincible mode");
|
Console()->Register("invincible", "?i['0'|'1']", CFGFLAG_SERVER | CMDFLAG_TEST, ConToggleInvincible, this, "Toggles invincible mode");
|
||||||
|
Console()->Register("infinite_jump", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConEndlessJump, this, "Gives you infinite jump");
|
||||||
|
Console()->Register("uninfinite_jump", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConUnEndlessJump, this, "Removes infinite jump from you");
|
||||||
Console()->Register("endless_hook", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConEndlessHook, this, "Gives you endless hook");
|
Console()->Register("endless_hook", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConEndlessHook, this, "Gives you endless hook");
|
||||||
Console()->Register("unendless_hook", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConUnEndlessHook, this, "Removes endless hook from you");
|
Console()->Register("unendless_hook", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConUnEndlessHook, this, "Removes endless hook from you");
|
||||||
Console()->Register("solo", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConSolo, this, "Puts you into solo part");
|
Console()->Register("solo", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConSolo, this, "Puts you into solo part");
|
||||||
|
@ -3825,6 +3827,8 @@ void CGameContext::RegisterChatCommands()
|
||||||
Console()->Register("unweapons", "", CFGFLAG_CHAT | CMDFLAG_PRACTICE, ConPracticeUnWeapons, this, "Removes all weapons from you");
|
Console()->Register("unweapons", "", CFGFLAG_CHAT | CMDFLAG_PRACTICE, ConPracticeUnWeapons, this, "Removes all weapons from you");
|
||||||
Console()->Register("ninja", "", CFGFLAG_CHAT | CMDFLAG_PRACTICE, ConPracticeNinja, this, "Makes you a ninja");
|
Console()->Register("ninja", "", CFGFLAG_CHAT | CMDFLAG_PRACTICE, ConPracticeNinja, this, "Makes you a ninja");
|
||||||
Console()->Register("unninja", "", CFGFLAG_CHAT | CMDFLAG_PRACTICE, ConPracticeUnNinja, this, "Removes ninja from you");
|
Console()->Register("unninja", "", CFGFLAG_CHAT | CMDFLAG_PRACTICE, ConPracticeUnNinja, this, "Removes ninja from you");
|
||||||
|
Console()->Register("infjump", "", CFGFLAG_CHAT | CMDFLAG_PRACTICE, ConPracticeEndlessJump, this, "Gives you infinite jump");
|
||||||
|
Console()->Register("uninfjump", "", CFGFLAG_CHAT | CMDFLAG_PRACTICE, ConPracticeUnEndlessJump, this, "Removes infinite jump from you");
|
||||||
Console()->Register("endless", "", CFGFLAG_CHAT | CMDFLAG_PRACTICE, ConPracticeEndlessHook, this, "Gives you endless hook");
|
Console()->Register("endless", "", CFGFLAG_CHAT | CMDFLAG_PRACTICE, ConPracticeEndlessHook, this, "Gives you endless hook");
|
||||||
Console()->Register("unendless", "", CFGFLAG_CHAT | CMDFLAG_PRACTICE, ConPracticeUnEndlessHook, this, "Removes endless hook from you");
|
Console()->Register("unendless", "", CFGFLAG_CHAT | CMDFLAG_PRACTICE, ConPracticeUnEndlessHook, this, "Removes endless hook from you");
|
||||||
Console()->Register("invincible", "?i['0'|'1']", CFGFLAG_CHAT | CMDFLAG_PRACTICE, ConPracticeToggleInvincible, this, "Toggles invincible mode");
|
Console()->Register("invincible", "?i['0'|'1']", CFGFLAG_CHAT | CMDFLAG_PRACTICE, ConPracticeToggleInvincible, this, "Toggles invincible mode");
|
||||||
|
|
|
@ -396,12 +396,14 @@ private:
|
||||||
static void ConGrenade(IConsole::IResult *pResult, void *pUserData);
|
static void ConGrenade(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConLaser(IConsole::IResult *pResult, void *pUserData);
|
static void ConLaser(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConJetpack(IConsole::IResult *pResult, void *pUserData);
|
static void ConJetpack(IConsole::IResult *pResult, void *pUserData);
|
||||||
|
static void ConEndlessJump(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConSetJumps(IConsole::IResult *pResult, void *pUserData);
|
static void ConSetJumps(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConWeapons(IConsole::IResult *pResult, void *pUserData);
|
static void ConWeapons(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConUnShotgun(IConsole::IResult *pResult, void *pUserData);
|
static void ConUnShotgun(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConUnGrenade(IConsole::IResult *pResult, void *pUserData);
|
static void ConUnGrenade(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConUnLaser(IConsole::IResult *pResult, void *pUserData);
|
static void ConUnLaser(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConUnJetpack(IConsole::IResult *pResult, void *pUserData);
|
static void ConUnJetpack(IConsole::IResult *pResult, void *pUserData);
|
||||||
|
static void ConUnEndlessJump(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConUnWeapons(IConsole::IResult *pResult, void *pUserData);
|
static void ConUnWeapons(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConAddWeapon(IConsole::IResult *pResult, void *pUserData);
|
static void ConAddWeapon(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConRemoveWeapon(IConsole::IResult *pResult, void *pUserData);
|
static void ConRemoveWeapon(IConsole::IResult *pResult, void *pUserData);
|
||||||
|
@ -488,12 +490,14 @@ private:
|
||||||
static void ConPracticeGrenade(IConsole::IResult *pResult, void *pUserData);
|
static void ConPracticeGrenade(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConPracticeLaser(IConsole::IResult *pResult, void *pUserData);
|
static void ConPracticeLaser(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConPracticeJetpack(IConsole::IResult *pResult, void *pUserData);
|
static void ConPracticeJetpack(IConsole::IResult *pResult, void *pUserData);
|
||||||
|
static void ConPracticeEndlessJump(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConPracticeSetJumps(IConsole::IResult *pResult, void *pUserData);
|
static void ConPracticeSetJumps(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConPracticeWeapons(IConsole::IResult *pResult, void *pUserData);
|
static void ConPracticeWeapons(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConPracticeUnShotgun(IConsole::IResult *pResult, void *pUserData);
|
static void ConPracticeUnShotgun(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConPracticeUnGrenade(IConsole::IResult *pResult, void *pUserData);
|
static void ConPracticeUnGrenade(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConPracticeUnLaser(IConsole::IResult *pResult, void *pUserData);
|
static void ConPracticeUnLaser(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConPracticeUnJetpack(IConsole::IResult *pResult, void *pUserData);
|
static void ConPracticeUnJetpack(IConsole::IResult *pResult, void *pUserData);
|
||||||
|
static void ConPracticeUnEndlessJump(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConPracticeUnWeapons(IConsole::IResult *pResult, void *pUserData);
|
static void ConPracticeUnWeapons(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConPracticeNinja(IConsole::IResult *pResult, void *pUserData);
|
static void ConPracticeNinja(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConPracticeUnNinja(IConsole::IResult *pResult, void *pUserData);
|
static void ConPracticeUnNinja(IConsole::IResult *pResult, void *pUserData);
|
||||||
|
|
Loading…
Reference in a new issue