From 58c6022ebc22e88397f4ac85788b02dafa679b7d Mon Sep 17 00:00:00 2001 From: Uneven Prankster Date: Sat, 12 Aug 2023 13:32:39 -0300 Subject: Replaced checks with trap asserts, it's 2023, you can use gdb, we have technology --- src/rumble.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/rumble.c') diff --git a/src/rumble.c b/src/rumble.c index 5e782b7..798b5ec 100644 --- a/src/rumble.c +++ b/src/rumble.c @@ -20,11 +20,8 @@ static fx32 timer = 0; void set_rumble(f32 duration, f32 strength) { - // Sanity check - if(strength > 1.0f) - strength = 1.0f; - else if(strength < 0.0f) - strength = 0.0f; + // If game code is surpassing this something is wrong!! + assert(strength >= 0.f && strength <= 1.f); XINPUT_VIBRATION state = {}; state.wLeftMotorSpeed = (unsigned)(strength * 65535.0f); -- cgit v1.2.3