From 31184d21da639e79a5254f18a869467d555dc6fd Mon Sep 17 00:00:00 2001 From: Quaternions <krakow20@gmail.com> Date: Mon, 10 Mar 2025 13:39:43 -0700 Subject: [PATCH] bsp_loader: transform spawn after loop --- lib/bsp_loader/src/bsp.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/bsp_loader/src/bsp.rs b/lib/bsp_loader/src/bsp.rs index 00bc845..4c966e7 100644 --- a/lib/bsp_loader/src/bsp.rs +++ b/lib/bsp_loader/src/bsp.rs @@ -311,14 +311,10 @@ pub fn convert<'a>( Ok(Entity::InfoNode(_info_node))=>(), Ok(Entity::InfoNodeHint(_info_node_hint))=>(), Ok(Entity::InfoParticleSystem(_info_particle_system))=>(), - Ok(Entity::InfoPlayerCounterterrorist(spawn))=>{ - found_spawn=Some(valve_transform(spawn.origin.into())); - }, + Ok(Entity::InfoPlayerCounterterrorist(spawn))=>found_spawn=Some(spawn.origin), Ok(Entity::InfoPlayerLogo(_info_player_logo))=>(), Ok(Entity::InfoPlayerStart(_info_player_start))=>(), - Ok(Entity::InfoPlayerTerrorist(spawn))=>{ - found_spawn=Some(valve_transform(spawn.origin.into())); - }, + Ok(Entity::InfoPlayerTerrorist(spawn))=>found_spawn=Some(spawn.origin), Ok(Entity::InfoTarget(_info_target))=>(), // InfoTeleportDestination is Spawn# Ok(Entity::InfoTeleportDestination(_info_teleport_destination))=>(), @@ -466,7 +462,7 @@ pub fn convert<'a>( world_models.push(model::Model{ mesh:mesh_id, attributes:ATTRIBUTE_INTERSECT_DEFAULT, - transform:integer::Planar64Affine3::from_translation(spawn_point), + transform:integer::Planar64Affine3::from_translation(valve_transform(spawn_point.into())), color:glam::Vec4::W, });