mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-01-14 15:48:01 +03:00
New CVar: mp_plant_c4_anywhere
(#692)
* Added new CVar `mp_plant_anywhere` * API member for CVar `m_bCanPlantAnywhere` Co-authored-by: Sergey Shorokhov <wopox1337@ya.ru>
This commit is contained in:
parent
53181d3e9b
commit
112326aa63
@ -102,6 +102,7 @@ This means that plugins that do binary code analysis (Orpheu for example) probab
|
|||||||
| sv_allchat | 1 | 0 | 1 | Players can receive all other players text chat, team restrictions apply<br/>`0` disabled <br/>`1` enabled |
|
| sv_allchat | 1 | 0 | 1 | Players can receive all other players text chat, team restrictions apply<br/>`0` disabled <br/>`1` enabled |
|
||||||
| sv_autobunnyhopping | 0 | 0 | 1 | Players automatically re-jump while holding jump button.<br/>`0` disabled <br/>`1` enabled |
|
| sv_autobunnyhopping | 0 | 0 | 1 | Players automatically re-jump while holding jump button.<br/>`0` disabled <br/>`1` enabled |
|
||||||
| sv_enablebunnyhopping | 0 | 0 | 1 | Allow player speed to exceed maximum running speed.<br/>`0` disabled <br/>`1` enabled |
|
| sv_enablebunnyhopping | 0 | 0 | 1 | Allow player speed to exceed maximum running speed.<br/>`0` disabled <br/>`1` enabled |
|
||||||
|
| mp_plant_c4_anywhere | 0 | 0 | 1 | When set, players can plant anywhere, not only in bombsites.<br/>`0` disabled <br/>`1` enabled |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## How to install zBot for CS 1.6?
|
## How to install zBot for CS 1.6?
|
||||||
|
7
dist/game.cfg
vendored
7
dist/game.cfg
vendored
@ -476,3 +476,10 @@ sv_autobunnyhopping 0
|
|||||||
//
|
//
|
||||||
// Default value: "0"
|
// Default value: "0"
|
||||||
sv_enablebunnyhopping 0
|
sv_enablebunnyhopping 0
|
||||||
|
|
||||||
|
// When set, players can plant anywhere, not only in bombsites.
|
||||||
|
// 0 - disabled (default behaviour)
|
||||||
|
// 1 - enabled
|
||||||
|
//
|
||||||
|
// Default value: "0"
|
||||||
|
mp_plant_c4_anywhere 0
|
||||||
|
@ -161,6 +161,7 @@ cvar_t free_armor = { "mp_free_armor", "0", 0, 0.0f, null
|
|||||||
cvar_t allchat = { "sv_allchat", "0", 0, 0.0f, nullptr };
|
cvar_t allchat = { "sv_allchat", "0", 0, 0.0f, nullptr };
|
||||||
cvar_t sv_autobunnyhopping = { "sv_autobunnyhopping", "0", 0, 0.0f, nullptr };
|
cvar_t sv_autobunnyhopping = { "sv_autobunnyhopping", "0", 0, 0.0f, nullptr };
|
||||||
cvar_t sv_enablebunnyhopping = { "sv_enablebunnyhopping", "0", 0, 0.0f, nullptr };
|
cvar_t sv_enablebunnyhopping = { "sv_enablebunnyhopping", "0", 0, 0.0f, nullptr };
|
||||||
|
cvar_t plant_c4_anywhere = { "mp_plant_c4_anywhere", "0", 0, 0.0f, nullptr };
|
||||||
|
|
||||||
void GameDLL_Version_f()
|
void GameDLL_Version_f()
|
||||||
{
|
{
|
||||||
@ -391,6 +392,7 @@ void EXT_FUNC GameDLLInit()
|
|||||||
CVAR_REGISTER(&allchat);
|
CVAR_REGISTER(&allchat);
|
||||||
CVAR_REGISTER(&sv_autobunnyhopping);
|
CVAR_REGISTER(&sv_autobunnyhopping);
|
||||||
CVAR_REGISTER(&sv_enablebunnyhopping);
|
CVAR_REGISTER(&sv_enablebunnyhopping);
|
||||||
|
CVAR_REGISTER(&plant_c4_anywhere);
|
||||||
|
|
||||||
// print version
|
// print version
|
||||||
CONSOLE_ECHO("ReGameDLL version: " APP_VERSION "\n");
|
CONSOLE_ECHO("ReGameDLL version: " APP_VERSION "\n");
|
||||||
|
@ -187,6 +187,7 @@ extern cvar_t free_armor;
|
|||||||
extern cvar_t allchat;
|
extern cvar_t allchat;
|
||||||
extern cvar_t sv_autobunnyhopping;
|
extern cvar_t sv_autobunnyhopping;
|
||||||
extern cvar_t sv_enablebunnyhopping;
|
extern cvar_t sv_enablebunnyhopping;
|
||||||
|
extern cvar_t plant_c4_anywhere;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -6653,6 +6653,17 @@ void CBasePlayer::HandleSignals()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef REGAMEDLL_ADD
|
||||||
|
if (m_bHasC4 && (plant_c4_anywhere.value || CSPlayer()->m_bPlantC4Anywhere))
|
||||||
|
{
|
||||||
|
if (IsAlive() && (m_iTeam == TERRORIST || m_iTeam == CT)
|
||||||
|
&& !(m_signals.GetSignal() & SIGNAL_BOMB))
|
||||||
|
{
|
||||||
|
m_signals.Signal(SIGNAL_BOMB);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!CSGameRules()->m_bMapHasBombZone)
|
if (!CSGameRules()->m_bMapHasBombZone)
|
||||||
OLD_CheckBombTarget(this);
|
OLD_CheckBombTarget(this);
|
||||||
|
|
||||||
|
@ -48,7 +48,8 @@ public:
|
|||||||
m_bCanShootOverride(false),
|
m_bCanShootOverride(false),
|
||||||
m_bGameForcingRespawn(false),
|
m_bGameForcingRespawn(false),
|
||||||
m_bAutoBunnyHopping(false),
|
m_bAutoBunnyHopping(false),
|
||||||
m_bMegaBunnyJumping(false)
|
m_bMegaBunnyJumping(false),
|
||||||
|
m_bPlantC4Anywhere(false)
|
||||||
{
|
{
|
||||||
m_szModel[0] = '\0';
|
m_szModel[0] = '\0';
|
||||||
}
|
}
|
||||||
@ -129,6 +130,7 @@ public:
|
|||||||
bool m_bGameForcingRespawn;
|
bool m_bGameForcingRespawn;
|
||||||
bool m_bAutoBunnyHopping;
|
bool m_bAutoBunnyHopping;
|
||||||
bool m_bMegaBunnyJumping;
|
bool m_bMegaBunnyJumping;
|
||||||
|
bool m_bPlantC4Anywhere;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Inlines
|
// Inlines
|
||||||
|
Loading…
x
Reference in New Issue
Block a user