mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 10:28:26 +00:00
Merge branch 'master' into experimental
This commit is contained in:
commit
20d62f1a04
@ -154,7 +154,6 @@ Convar gCV_BotWeapon = null;
|
||||
Convar gCV_PlaybackCanStop = null;
|
||||
Convar gCV_PlaybackCooldown = null;
|
||||
Convar gCV_PlaybackPreRunTime = null;
|
||||
Convar gCV_MaxRecordLengthInStart = null;
|
||||
|
||||
// timer settings
|
||||
int gI_Styles = 0;
|
||||
@ -291,7 +290,6 @@ public void OnPluginStart()
|
||||
gCV_PlaybackCanStop = new Convar("shavit_replay_pbcanstop", "1", "Allow players to stop playback if they requested it?", 0, true, 0.0, true, 1.0);
|
||||
gCV_PlaybackCooldown = new Convar("shavit_replay_pbcooldown", "10.0", "Cooldown in seconds to apply for players between each playback they request/stop.\nDoes not apply to RCON admins.", 0, true, 0.0);
|
||||
gCV_PlaybackPreRunTime = new Convar("shavit_replay_preruntime", "1.0", "Time (in seconds) to record before a player leaves start zone. (The value should NOT be too high)", 0, true, 0.0);
|
||||
gCV_MaxRecordLengthInStart = new Convar("shavit_replay_maxlength_instart", "30.0", "Time (in seconds) to record when a player in start zone.", 0, true, 0.0);
|
||||
|
||||
gCV_CentralBot.AddChangeHook(OnConVarChanged);
|
||||
|
||||
@ -1604,7 +1602,7 @@ public Action Shavit_OnStart(int client)
|
||||
gI_PlayerPrerunFrames[client] = gA_PlayerFrames[client].Length - RoundToFloor(gCV_PlaybackPreRunTime.FloatValue * gF_Tickrate / gA_StyleSettings[Shavit_GetBhopStyle(client)].fTimescale);
|
||||
gI_PlayerTimerStartFrames[client] = gA_PlayerFrames[client].Length;
|
||||
|
||||
if(gA_PlayerFrames[client].Length >= RoundToFloor(gCV_MaxRecordLengthInStart.FloatValue * gF_Tickrate / gA_StyleSettings[Shavit_GetBhopStyle(client)].fTimescale))
|
||||
if(gA_PlayerFrames[client].Length >= RoundToFloor(gCV_PlaybackPreRunTime.FloatValue * gF_Tickrate / gA_StyleSettings[Shavit_GetBhopStyle(client)].fTimescale))
|
||||
{
|
||||
gA_PlayerFrames[client].Erase(0);
|
||||
gI_PlayerFrames[client]--;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user