mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-04-05 01:09:00 +03:00
Add new CVar mp_jump_height (#1022)
This commit is contained in:
parent
94a7eb4cbb
commit
d8faea0966
@ -124,6 +124,7 @@ This means that plugins that do binary code analysis (Orpheu for example) probab
|
||||
| mp_ammo_respawn_time | 20 | 0.0 | - | The respawn time for ammunition. |
|
||||
| mp_vote_flags | km | 0 | - | Vote systems enabled in server.<br/>`0` voting disabled<br/>`k` votekick enabled via `vote` command<br/>`m` votemap enabled via `votemap` command |
|
||||
| mp_votemap_min_time | 180 | 0.0 | - | Minimum seconds that must elapse on map before `votemap` command can be used. |
|
||||
| mp_jump_height | 45 | 0.0 | - | Player jump height. |
|
||||
| bot_excellent_morale | 0 | 0 | 1 | Bots always have great morale regardless of defeat or victory. |
|
||||
| mp_randomspawn | 0 | 0 | 1 | Random player spawns<br/>`0` disabled <br/>`1` enabled<br/>`NOTE`: Navigation `maps/.nav` file required |
|
||||
|
||||
|
5
dist/game.cfg
vendored
5
dist/game.cfg
vendored
@ -628,6 +628,11 @@ mp_vote_flags "km"
|
||||
// Default value: "180"
|
||||
mp_votemap_min_time "180"
|
||||
|
||||
// Player jump height
|
||||
//
|
||||
// Default value: "45"
|
||||
mp_jump_height "45"
|
||||
|
||||
// Bots always have great morale regardless of defeat or victory.
|
||||
// 0 - disabled (default behaviour)
|
||||
// 1 - enabled
|
||||
|
@ -172,6 +172,7 @@ cvar_t deathmsg_flags = { "mp_deathmsg_flags", "abc", 0, 0.0f
|
||||
cvar_t assist_damage_threshold = { "mp_assist_damage_threshold", "40", 0, 40.0f, nullptr };
|
||||
cvar_t freezetime_duck = { "mp_freezetime_duck", "1", 0, 1.0f, nullptr };
|
||||
cvar_t freezetime_jump = { "mp_freezetime_jump", "1", 0, 1.0f, nullptr };
|
||||
cvar_t jump_height = { "mp_jump_height", "45", FCVAR_SERVER, 45.0f, nullptr };
|
||||
|
||||
cvar_t hostages_rescued_ratio = { "mp_hostages_rescued_ratio", "1.0", 0, 1.0f, nullptr };
|
||||
|
||||
@ -453,6 +454,7 @@ void EXT_FUNC GameDLLInit()
|
||||
|
||||
CVAR_REGISTER(&freezetime_duck);
|
||||
CVAR_REGISTER(&freezetime_jump);
|
||||
CVAR_REGISTER(&jump_height);
|
||||
CVAR_REGISTER(&defuser_allocation);
|
||||
CVAR_REGISTER(&location_area_info);
|
||||
CVAR_REGISTER(&chat_loc_fallback);
|
||||
|
@ -201,6 +201,7 @@ extern cvar_t deathmsg_flags;
|
||||
extern cvar_t assist_damage_threshold;
|
||||
extern cvar_t freezetime_duck;
|
||||
extern cvar_t freezetime_jump;
|
||||
extern cvar_t jump_height;
|
||||
extern cvar_t defuser_allocation;
|
||||
extern cvar_t location_area_info;
|
||||
extern cvar_t chat_loc_fallback;
|
||||
|
@ -1487,7 +1487,7 @@ void CBasePlayer::PackDeadPlayerItems()
|
||||
{
|
||||
DropShield();
|
||||
#ifdef REGAMEDLL_ADD
|
||||
if(iPackGun != GR_PLR_DROP_GUN_ALL)
|
||||
if (iPackGun != GR_PLR_DROP_GUN_ALL)
|
||||
#endif
|
||||
{
|
||||
bSkipPrimSec = true;
|
||||
@ -2219,7 +2219,7 @@ void EXT_FUNC CBasePlayer::__API_HOOK(Killed)(entvars_t *pevAttacker, int iGib)
|
||||
{
|
||||
CBasePlayer *pAttacker = CBasePlayer::Instance(pevAttacker);
|
||||
|
||||
if(pAttacker /*safety*/ && !pAttacker->IsBot() && pAttacker->m_iTeam != m_iTeam)
|
||||
if (pAttacker /*safety*/ && !pAttacker->IsBot() && pAttacker->m_iTeam != m_iTeam)
|
||||
{
|
||||
if (pAttacker->HasShield())
|
||||
killerHasShield = true;
|
||||
|
@ -2429,13 +2429,18 @@ inline real_t PM_JumpHeight(bool longjump)
|
||||
#ifdef REGAMEDLL_API
|
||||
if (longjump)
|
||||
{
|
||||
if(pmoveplayer->m_flLongJumpHeight > 0.0)
|
||||
if (pmoveplayer->m_flLongJumpHeight > 0.0)
|
||||
return pmoveplayer->m_flLongJumpHeight;
|
||||
}
|
||||
else if (pmoveplayer->m_flJumpHeight > 0.0)
|
||||
return pmoveplayer->m_flJumpHeight;
|
||||
#endif
|
||||
|
||||
#ifdef REGAMEDLL_ADD
|
||||
return Q_sqrt(2.0 * 800.0f * (longjump ? 56.0f : Q_max(jump_height.value, 0.0f)));
|
||||
#else
|
||||
return Q_sqrt(2.0 * 800.0f * (longjump ? 56.0f : 45.0f));
|
||||
#endif
|
||||
}
|
||||
|
||||
LINK_HOOK_VOID_CHAIN2(PM_Jump)
|
||||
|
Loading…
x
Reference in New Issue
Block a user