From dc50958738d09a255e6a1832137949c46406a8f0 Mon Sep 17 00:00:00 2001 From: VirxEC Date: Tue, 31 Oct 2023 16:46:33 -0400 Subject: [PATCH] Boost pad fixes --- src/assets.rs | 3 ++- src/udp.rs | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/assets.rs b/src/assets.rs index 7c93027..d104523 100644 --- a/src/assets.rs +++ b/src/assets.rs @@ -144,7 +144,7 @@ fn load_texture(name: &str, asset_server: &AssetServer) -> Handle { asset_server.load(path) } -const DOUBLE_SIDED_MATS: [&str; 27] = [ +const DOUBLE_SIDED_MATS: [&str; 28] = [ "Trees.Materials.LombardyPoplar_B_NoWind_MIC", "Trees.Materials.LombardyPoplar_B_Mat", "FutureTech.Materials.ForceField_HexGage_MIC", @@ -172,6 +172,7 @@ const DOUBLE_SIDED_MATS: [&str; 27] = [ "Proto_BBall.SM.BackBoard_Teams_MIC", "Proto_BBall.Materials.BBall_Rim_MAT_INST", "Pickup_Boost.Materials.BoostPad_Large_MIC", + "Pickup_Boost.Materials.BoostPad_Small_MIC", ]; const TRANSPARENT_MATS: [&str; 2] = [ diff --git a/src/udp.rs b/src/udp.rs index 05514f2..19e2e54 100644 --- a/src/udp.rs +++ b/src/udp.rs @@ -548,6 +548,11 @@ fn update_pads( .find(|(_, loc)| loc.distance_squared(pad.position.xy()) < 25.) .map(|(i, _)| large_boost_pad_loc_rots.rots[i]); transform.rotate_y(rotation.unwrap_or_default().to_radians()); + if state.game_mode == GameMode::Soccer { + transform.translation.y += 2.6; + } else if state.game_mode == GameMode::Hoops { + transform.translation.y += 5.2; + } pad_glows.large.clone() } else { @@ -573,6 +578,24 @@ fn update_pads( { transform.rotate_y(PI.copysign(transform.translation.x * transform.translation.z) / 4.); } + } else if state.game_mode == GameMode::Hoops { + if transform.translation.z > 2810. { + transform.rotate_y(PI / 3.); + } + + if (500f32..1537.).contains(&transform.translation.x.abs()) + && (0f32..1025.).contains(&transform.translation.z) + { + transform.rotate_y(PI / 3.); + } + + if (511f32..513.).contains(&transform.translation.x.abs()) + && (511f32..513.).contains(&transform.translation.z.abs()) + { + transform.rotate_y(PI.copysign(transform.translation.x * transform.translation.z) / 12.); + } + + transform.translation.y += 5.7; } pad_glows.small.clone()