Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit fc17009
Author: Sergey Shorokhov <wopox1337@ya.ru>
Date:   Sun Jul 3 09:34:27 2022 +0300

    DYING_TIME -> DEATH_ANIMATION_TIME

commit 73bb0ec
Merge: 1400a4e 1081301
Author: Sergey Shorokhov <wopox1337@ya.ru>
Date:   Sun Jul 3 09:31:07 2022 +0300

    Merge remote-tracking branch 'origin' into death_cam_time

commit 1400a4e
Author: Sergey Shorokhov <wopox1337@ya.ru>
Date:   Fri Mar 11 18:51:08 2022 +0300

    remove death animation skip

commit f8ff803
Author: Sergey Shorokhov <wopox1337@ya.ru>
Date:   Thu Mar 10 07:37:26 2022 +0300

    lil order fixes & indent

commit cf39535
Merge: f2d29a8 972e14a
Author: Sergey Shorokhov <wopox1337@ya.ru>
Date:   Thu Mar 10 07:33:02 2022 +0300

    Merge remote-tracking branch 'origin/master' into death_cam_time

commit f2d29a8
Author: Shorokhov Sergey <wopox1337@ya.ru>
Date:   Thu Jan 16 15:44:03 2020 +0300

    resolve conflicts

commit bad3024
Merge: ee475c9 2694a92
Author: Shorokhov Sergey <wopox1337@ya.ru>
Date:   Thu Jan 16 15:40:28 2020 +0300

    Merge branch 'master' into death_cam_time

    # Conflicts:
    #	README.md
    #	dist/game.cfg

commit 2694a92
Merge: 44e7758 2eba3b1
Author: Shorokhov Sergey <wopox1337@ya.ru>
Date:   Thu Jan 16 15:37:16 2020 +0300

    Merge branch 'master' of https://github.com/s1lentq/ReGameDLL_CS

commit ee475c9
Author: Shorokhov Sergey <wopox1337@ya.ru>
Date:   Thu Jan 16 15:05:58 2020 +0300

    a better description

commit b8e9693
Author: Shorokhov Sergey <wopox1337@ya.ru>
Date:   Thu Jan 16 14:58:03 2020 +0300

    update description

commit 44f5abe
Author: Shorokhov Sergey <wopox1337@ya.ru>
Date:   Thu Dec 26 14:49:04 2019 +0300

    cvar value handling

commit a903680
Author: Shorokhov Sergey <wopox1337@ya.ru>
Date:   Thu Dec 26 14:48:09 2019 +0300

    magic numbers to named const (№2)

commit 652af47
Author: Shorokhov Sergey <wopox1337@ya.ru>
Date:   Thu Dec 26 14:46:03 2019 +0300

    magic numbers to named const

commit b1e12d6
Author: Shorokhov Sergey <wopox1337@ya.ru>
Date:   Thu Dec 26 14:43:46 2019 +0300

    Add description

commit d04f4ce
Author: Shorokhov Sergey <wopox1337@ya.ru>
Date:   Thu Dec 26 14:43:01 2019 +0300

    Add new CVar: mp_dying_time < 0 .. 999>

commit 44e7758
Merge: eaaa3fd fd06d65
Author: Shorohov Sergey <wopox1337@ya.ru>
Date:   Mon Dec 2 16:04:42 2019 +0300

    Merge pull request rehlds#7 from s1lentq/master

    update

commit eaaa3fd
Merge: 5307bb7 46624d9
Author: Shorohov Sergey <wopox1337@ya.ru>
Date:   Wed Oct 2 16:43:33 2019 +0300

    Merge pull request rehlds#6 from s1lentq/master

    Up

commit 5307bb7
Merge: e51af43 3aa9872
Author: Shorohov Sergey <wopox1337@ya.ru>
Date:   Tue Sep 3 15:58:57 2019 +0300

    Merge pull request rehlds#5 from s1lentq/master

    update

commit e51af43
Merge: 411a028 4d8a1b9
Author: Shorokhov Sergey <wopox1337@ya.ru>
Date:   Mon Sep 2 11:59:43 2019 +0300

    Merge branch 'master' of https://github.com/wopox1337/ReGameDLL_CS

commit 4d8a1b9
Merge: feae856 75bdc26
Author: Shorohov Sergey <wopox1337@ya.ru>
Date:   Mon Jul 29 16:40:36 2019 +0300

    Merge pull request rehlds#4 from s1lentq/master

    uptodate

commit feae856
Merge: a5283cf b669a39
Author: Shorohov Sergey <wopox1337@ya.ru>
Date:   Mon Jul 8 14:06:12 2019 +0300

    Merge pull request rehlds#3 from s1lentq/master

    uptodate

commit a5283cf
Merge: c8a6a4a cee63d9
Author: Shorohov Sergey <wopox1337@ya.ru>
Date:   Sun Jun 9 12:58:36 2019 +0300

    Merge pull request rehlds#2 from s1lentq/master

    up

commit c8a6a4a
Merge: 94f0fdb 935064c
Author: Shorohov Sergey <wopox1337@ya.ru>
Date:   Thu Jun 6 01:04:50 2019 +0300

    Merge pull request rehlds#1 from s1lentq/master

    update
  • Loading branch information
dystopm committed Jul 12, 2023
1 parent e1d1c11 commit 50f56b3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
4 changes: 4 additions & 0 deletions regamedll/dlls/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ cvar_t hostages_rescued_ratio = { "mp_hostages_rescued_ratio", "1.0", 0, 1.0f, n

cvar_t legacy_vehicle_block = { "mp_legacy_vehicle_block", "1", 0, 0.0f, nullptr };

cvar_t dying_time = { "mp_dying_time", "3.0", 0, 3.0f, nullptr };

void GameDLL_Version_f()
{
if (Q_stricmp(CMD_ARGV(1), "version") != 0)
Expand Down Expand Up @@ -418,6 +420,8 @@ void EXT_FUNC GameDLLInit()

CVAR_REGISTER(&legacy_vehicle_block);

CVAR_REGISTER(&dying_time);

// print version
CONSOLE_ECHO("ReGameDLL version: " APP_VERSION "\n");

Expand Down
3 changes: 2 additions & 1 deletion regamedll/dlls/game.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,9 @@ extern cvar_t sv_enablebunnyhopping;
extern cvar_t plant_c4_anywhere;
extern cvar_t give_c4_frags;
extern cvar_t hostages_rescued_ratio;

extern cvar_t legacy_vehicle_block;
extern cvar_t dying_time;

#endif

extern cvar_t scoreboard_showmoney;
Expand Down
13 changes: 12 additions & 1 deletion regamedll/dlls/gamerules.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const float ROUND_RESPAWN_TIME = 20.0f;
const float ROUND_BEGIN_DELAY = 5.0f; // delay before beginning new round
const float ITEM_KILL_DELAY = 300.0f;
const float RADIO_TIMEOUT = 1.5f;
const float DEATH_ANIMATION_TIME = 3.0f;

const int MAX_INTERMISSION_TIME = 120; // longest the intermission can last, in seconds

Expand Down Expand Up @@ -206,7 +207,7 @@ enum
SCENARIO_BLOCK_PRISON_ESCAPE_TIME = BIT(8), // flag "i"
SCENARIO_BLOCK_BOMB_TIME = BIT(9), // flag "j"
SCENARIO_BLOCK_HOSTAGE_RESCUE_TIME = BIT(10), // flag "k"

};

// Player relationship return codes
Expand Down Expand Up @@ -336,6 +337,7 @@ class CGameRules
inline void SetGameOver() { m_bGameOver = true; }
static float GetItemKillDelay();
static float GetRadioTimeout();
static float GetDyingTime();

public:
BOOL m_bFreezePeriod; // TRUE at beginning of round, set to FALSE when the period expires
Expand Down Expand Up @@ -921,6 +923,15 @@ inline float CGameRules::GetRadioTimeout()
#endif
}

inline float CGameRules::GetDyingTime()
{
#ifdef REGAMEDLL_ADD
return dying_time.value;
#else
return DEATH_ANIMATION_TIME;
#endif
}

bool IsBotSpeaking();
void SV_Continue_f();
void SV_Tutor_Toggle_f();
Expand Down
2 changes: 1 addition & 1 deletion regamedll/dlls/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3857,7 +3857,7 @@ void CBasePlayer::PlayerDeathThink()
{
// if the player has been dead for one second longer than allowed by forcerespawn,
// forcerespawn isn't on. Send the player off to an intermission camera until they choose to respawn.
if (g_pGameRules->IsMultiplayer() && HasTimePassedSinceDeath(3.0f) && !(m_afPhysicsFlags & PFLAG_OBSERVER))
if (g_pGameRules->IsMultiplayer() && HasTimePassedSinceDeath(CGameRules::GetDyingTime()) && !(m_afPhysicsFlags & PFLAG_OBSERVER))
{
// Send message to everybody to spawn a corpse.
SpawnClientSideCorpse();
Expand Down

0 comments on commit 50f56b3

Please sign in to comment.