mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-06 18:08:26 +00:00
Deprecated halftime for timescale.
There's backwards compatibility of course. Untested but should work..
This commit is contained in:
parent
2b0e549150
commit
5c22149b93
@ -26,7 +26,7 @@
|
||||
"runspeed" "260.00" // Running speed. Requires DHooks, shavit-misc and shavit_misc_staticprestrafe set to 1.
|
||||
"gravity" "1.0" // Gravity setting, 1.0 for default. Standard for low gravity styles is 0.6.
|
||||
"speed" "1.0" // Speed multiplier, 1.0 for default. Standard for slowmo styles is 0.5.
|
||||
"halftime" "0" // Calculation of times will be halved, replays WILL NOT function properly.
|
||||
"timescale" "1.0" // Timing will scale with this setting.
|
||||
"velocity" "1.0" // % of horizontal velocity to keep per jump. a value 0.9 will make the player lose 10% of their velocity per jump. Likewise, values above 1 will result in speed gains.
|
||||
"bonus_velocity" "0.0" // Bonus velocity to gain per jump. If set to e.g. 100.0, the player will gain 100 bonus velocity per jump.
|
||||
"min_velocity" "0.0" // Minimum amount of horizontal velocity to keep per jump. If set to 600.0, the player can't have less than 600 velocity per jump.
|
||||
@ -220,7 +220,7 @@
|
||||
"clantag" "SLOW"
|
||||
|
||||
"speed" "0.5"
|
||||
"halftime" "1"
|
||||
"timescale" "0.5"
|
||||
|
||||
"unranked" "1"
|
||||
}
|
||||
|
||||
@ -98,7 +98,7 @@ enum
|
||||
fRunspeed,
|
||||
fGravityMultiplier,
|
||||
fSpeedMultiplier,
|
||||
bHalftime,
|
||||
fTimescale,
|
||||
fVelocity,
|
||||
fBonusVelocity,
|
||||
fMinVelocity,
|
||||
|
||||
@ -1576,7 +1576,7 @@ bool LoadStyles()
|
||||
gA_StyleSettings[i][fRunspeed] = kv.GetFloat("runspeed", 260.00);
|
||||
gA_StyleSettings[i][fGravityMultiplier] = kv.GetFloat("gravity", 1.0);
|
||||
gA_StyleSettings[i][fSpeedMultiplier] = kv.GetFloat("speed", 1.0);
|
||||
gA_StyleSettings[i][bHalftime] = view_as<bool>(kv.GetNum("halftime", 0));
|
||||
gA_StyleSettings[i][fTimescale] = view_as<bool>(kv.GetNum("halftime", 0))? 0.5:kv.GetFloat("timescale", 1.0); // backwards compat for old halftime setting
|
||||
gA_StyleSettings[i][fVelocity] = kv.GetFloat("velocity", 1.0);
|
||||
gA_StyleSettings[i][fBonusVelocity] = kv.GetFloat("bonus_velocity", 0.0);
|
||||
gA_StyleSettings[i][fMinVelocity] = kv.GetFloat("min_velocity", 0.0);
|
||||
@ -1938,12 +1938,7 @@ public void OnGameFrame()
|
||||
continue;
|
||||
}
|
||||
|
||||
float time = frametime;
|
||||
|
||||
if(gA_StyleSettings[gI_Style[i]][bHalftime])
|
||||
{
|
||||
time /= 2.0;
|
||||
}
|
||||
float time = frametime * view_as<float>(gA_StyleSettings[gI_Style[i]][fTimescale]);
|
||||
|
||||
any[] snapshot = new any[TIMERSNAPSHOT_SIZE];
|
||||
snapshot[bTimerEnabled] = gB_TimerEnabled[i];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user