Skip to content

Commit 95443a3

Browse files
committed
feat(launch control): reduce charge time
- Reduce launch control charging time. - Remove debug code.
1 parent 2801764 commit 95443a3

4 files changed

Lines changed: 6 additions & 36 deletions

File tree

SSV2/includes/classes/CWheel.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Enums.eWheelConfigFlags = {
4141
BIKE_WHEEL = 0,
4242
LEFTWHEEL = 1,
4343
REARWHEEL = 2,
44-
STEER = 3,
44+
STEER = 3, -- this can be used to immediately render steering when changing steering mode in the handling editor. We need to refactor handling editor to reflect vehicle memory instead of runtime bools
4545
POWERED = 4,
4646
TILT_INDEP = 5,
4747
TILT_SOLID = 6,

SSV2/includes/features/vehicle/launch_control.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ end
3737

3838
function LaunchControl:Init()
3939
self.m_state = eLaunchControlState.NONE
40-
self.m_timer = Timer.new(3000)
40+
self.m_timer = Timer.new(2000)
4141
self.m_timer:pause()
4242
self.m_last_pop_time = 0
4343
self.m_thread = ThreadManager:RegisterLooped("SS_LAUNCH_CTRL", function()
@@ -192,7 +192,7 @@ function LaunchControl:OnTick()
192192
local r, g, b, a = 255, 255, 255, 255
193193

194194
if (not self.m_timer) then
195-
self.m_timer = Timer.new(3000)
195+
self.m_timer = Timer.new(2000)
196196
self.m_timer:pause()
197197
end
198198

@@ -226,7 +226,7 @@ function LaunchControl:OnTick()
226226
0.01,
227227
Color(r, g, b, a),
228228
Color(0, 0, 0, 150),
229-
math.min(1, math.max(0, self.m_timer:elapsed() / 3000))
229+
math.min(1, math.max(0, self.m_timer:elapsed() / 2000))
230230
)
231231

232232
if (self.m_timer:is_done() and self.m_state == eLaunchControlState.LOADING) then

SSV2/includes/frontend/settings/debug_ui.lua

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -528,36 +528,6 @@ local function DrawMiscTests()
528528
Notifier:Add(label, string.random(), level)
529529
end
530530
end
531-
532-
if (ImGui.Button("Fucking CWheel")) then
533-
ThreadManager:Run(function()
534-
local PV = Self:GetVehicle()
535-
if (not PV:IsValid()) then
536-
return
537-
end
538-
539-
local wheel_array = PV:Resolve().m_wheels
540-
if (wheel_array:IsNull()) then
541-
return
542-
end
543-
544-
local wheel_lf = CWheel(wheel_array:Get(1))
545-
local wheel_lr = CWheel(wheel_array:Get(3))
546-
if (not wheel_lf or not wheel_lr or not wheel_lf:IsValid()) then
547-
return
548-
end
549-
550-
local susp_comp_f = wheel_lf.m_suspension_forward_offset
551-
local susp_comp_r = wheel_lr.m_suspension_forward_offset
552-
local unk_minus4 = susp_comp_f:sub(0x4)
553-
local unk_plus4 = susp_comp_f:add(0x4)
554-
local m_tyre_radius = wheel_lf.m_tyre_radius
555-
printf("susp_comp_f : %s\nsusp_comp_r : %s",
556-
susp_comp_f:get_float(),
557-
susp_comp_r:get_float()
558-
)
559-
end)
560-
end
561531
end
562532

563533
return function()

SSV2/includes/frontend/vehicle/stancer_ui.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ local ref <const> = {
1010
m_camber = { label = "VEH_STANCE_CAMBER", fmt = "%.2f°", min = -1.0, max = 1.0 },
1111
m_track_width = { label = "VEH_STANCE_TRACK_WIDTH", fmt = "%.2f", min = -0.5, max = 0.5 },
1212
m_susp_comp = { label = "VEH_STANCE_SUSP_COMP", fmt = "%.2f", min = -0.6, max = 0.6 },
13-
m_wheel_width = { label = "VEH_STANCE_WHEEL_WIDTH", fmt = "%.2f", min = -0.5, max = 0.5, drawdata_only = true, tooltip = "VEH_STANCE_NON_STOCK" },
14-
m_wheel_size = { label = "VEH_STANCE_WHEEL_SIZE", fmt = "%.2f", min = -0.5, max = 0.5, drawdata_only = true, tooltip = "VEH_STANCE_NON_STOCK" },
13+
m_wheel_width = { label = "VEH_STANCE_WHEEL_WIDTH", fmt = "%.2f", min = 0.0, max = 1.5, drawdata_only = true, tooltip = "VEH_STANCE_NON_STOCK" },
14+
m_wheel_size = { label = "VEH_STANCE_WHEEL_SIZE", fmt = "%.2f", min = 0.0, max = 1.5, drawdata_only = true, tooltip = "VEH_STANCE_NON_STOCK" },
1515
}
1616

1717
---@param key string

0 commit comments

Comments
 (0)