mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-27 07:05:38 +03:00
Implemented CVar mp_respawn_immunity_force_unset Closed #462
This commit is contained in:
parent
6ff75da41c
commit
46f697fb46
@ -70,6 +70,7 @@ Archive's bin directory contains 2 subdirectories, 'bugfixed' and 'pure'
|
||||
| mp_legacy_bombtarget_touch | 1 | 0 | 1 | Legacy func_bomb_target touch. New one is more strict. <br/>`0` New behavior<br/>`1` Legacy behavior|
|
||||
| mp_respawn_immunitytime | 0 | 0 | - | Specifies the players defense time after respawn. (in seconds).<br/>`0` disabled<br/>`>0.00001` time delay to remove protection |
|
||||
| mp_respawn_immunity_effects | 1 | 0 | 1 | Enable effects on player spawn protection.<br/>`0` disabled<br/>`1` enable (Use in conjunction with the cvar mp_respawn_immunitytime) |
|
||||
| mp_respawn_immunity_force_unset | 1 | 0 | 1 | Force unset spawn protection if the player doing any action.<br/>`0` disabled<br/>`1` enabled |
|
||||
| mp_kill_filled_spawn | 1 | 0 | 1 | Kill the player in filled spawn before spawning some one else (Prevents players stucking in each other).<br />Only disable this if you have semiclip or other plugins that prevents stucking.<br/>`0` disabled<br/>`1` enabled |
|
||||
| mp_allow_point_servercommand | 0 | 0 | 1 | Allow use of point_servercommand entities in map.<br/>`0` disallow<br/>`1` allow<br/>`NOTE`: Potentially dangerous for untrusted maps. |
|
||||
| mp_hullbounds_sets | 1 | 0 | 1 | Sets mins/maxs hull bounds for the player.<br/>`0` disabled<br/>`1` enabled |
|
||||
|
7
dist/game.cfg
vendored
7
dist/game.cfg
vendored
@ -243,6 +243,13 @@ mp_respawn_immunitytime "0"
|
||||
// Default value: "1"
|
||||
mp_respawn_immunity_effects 1
|
||||
|
||||
// Force unset spawn protection if the player doing any action.
|
||||
// 0 - disabled
|
||||
// 1 - enabled
|
||||
//
|
||||
// Default value: "1"
|
||||
mp_respawn_immunity_force_unset 1
|
||||
|
||||
// Kill the player in filled spawn before spawning some one else (Prevents players stucking in each other).
|
||||
// Only disable this if you have semiclip or other plugins that prevents stucking
|
||||
// 0 - disabled
|
||||
|
@ -129,6 +129,7 @@ cvar_t item_staytime = { "mp_item_staytime", "300", FCVAR_SERVER, 30
|
||||
cvar_t legacy_bombtarget_touch = { "mp_legacy_bombtarget_touch", "1", 0, 1.0f, nullptr };
|
||||
cvar_t respawn_immunitytime = { "mp_respawn_immunitytime", "0", FCVAR_SERVER, 0.0f, nullptr };
|
||||
cvar_t respawn_immunity_effects = { "mp_respawn_immunity_effects", "1", FCVAR_SERVER, 0.0f, nullptr };
|
||||
cvar_t respawn_immunity_force_unset = { "mp_respawn_immunity_force_unset", "1", FCVAR_SERVER, 0.0f, nullptr };
|
||||
cvar_t kill_filled_spawn = { "mp_kill_filled_spawn", "1", 0, 0.0f, nullptr };
|
||||
cvar_t afk_bomb_drop_time = { "mp_afk_bomb_drop_time", "0", FCVAR_SERVER, 0.0f, nullptr };
|
||||
cvar_t buy_anywhere = { "mp_buy_anywhere", "0", FCVAR_SERVER, 0.0f, nullptr };
|
||||
@ -341,6 +342,7 @@ void EXT_FUNC GameDLLInit()
|
||||
CVAR_REGISTER(&legacy_bombtarget_touch);
|
||||
CVAR_REGISTER(&respawn_immunitytime);
|
||||
CVAR_REGISTER(&respawn_immunity_effects);
|
||||
CVAR_REGISTER(&respawn_immunity_force_unset);
|
||||
CVAR_REGISTER(&kill_filled_spawn);
|
||||
CVAR_REGISTER(&afk_bomb_drop_time);
|
||||
CVAR_REGISTER(&buy_anywhere);
|
||||
|
@ -158,6 +158,7 @@ extern cvar_t item_staytime;
|
||||
extern cvar_t legacy_bombtarget_touch;
|
||||
extern cvar_t respawn_immunitytime;
|
||||
extern cvar_t respawn_immunity_effects;
|
||||
extern cvar_t respawn_immunity_force_unset;
|
||||
extern cvar_t kill_filled_spawn;
|
||||
extern cvar_t afk_bomb_drop_time;
|
||||
extern cvar_t buy_anywhere;
|
||||
|
@ -4504,8 +4504,8 @@ void EXT_FUNC CBasePlayer::__API_HOOK(PreThink)()
|
||||
|
||||
#ifdef REGAMEDLL_ADD
|
||||
auto protectStateCurrent = CSPlayer()->GetProtectionState();
|
||||
if (protectStateCurrent == CCSPlayer::ProtectionSt_Expired ||
|
||||
(protectStateCurrent == CCSPlayer::ProtectionSt_Active && (m_afButtonPressed & IN_ACTIVE)))
|
||||
if (protectStateCurrent == CCSPlayer::ProtectionSt_Expired || (respawn_immunity_force_unset.value &&
|
||||
(protectStateCurrent == CCSPlayer::ProtectionSt_Active && (m_afButtonPressed & IN_ACTIVE))))
|
||||
{
|
||||
RemoveSpawnProtection();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user