fix the bus dropping you off right into the sun /o\
This commit is contained in:
parent
7e56f1f07b
commit
2c44d89c53
24
src/chat.rs
24
src/chat.rs
|
@ -778,6 +778,7 @@ pub fn handle_chat_scripts(
|
||||||
mut q_playercam: Query<(&mut Position, &mut LinearVelocity), With<actor::PlayerCamera>>,
|
mut q_playercam: Query<(&mut Position, &mut LinearVelocity), With<actor::PlayerCamera>>,
|
||||||
mut ew_sfx: EventWriter<audio::PlaySfxEvent>,
|
mut ew_sfx: EventWriter<audio::PlaySfxEvent>,
|
||||||
mut ew_effect: EventWriter<effects::SpawnEffectEvent>,
|
mut ew_effect: EventWriter<effects::SpawnEffectEvent>,
|
||||||
|
id2pos: Res<actor::Id2Pos>,
|
||||||
) {
|
) {
|
||||||
for script in er_chatscript.read() {
|
for script in er_chatscript.read() {
|
||||||
// Parse the script string
|
// Parse the script string
|
||||||
|
@ -834,19 +835,20 @@ pub fn handle_chat_scripts(
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if let Ok((mut pos, mut v)) = q_playercam.get_single_mut() {
|
if let Ok((mut pos, mut v)) = q_playercam.get_single_mut() {
|
||||||
if param1 == "oscillation".to_string() {
|
let busstop = match param1 {
|
||||||
*pos = Position(DVec3::new(-184968e3, 149410e3, -134273e3));
|
"serenity" => Some("busstop"),
|
||||||
|
"oscillation" => Some("busstop2"),
|
||||||
|
"metisprime" => Some("busstop3"),
|
||||||
|
_ => None
|
||||||
|
};
|
||||||
|
if let Some(station) = busstop {
|
||||||
|
if let Some(target) = id2pos.0.get(&station.to_string()) {
|
||||||
|
pos.0 = *target + DVec3::new(0.0, -1000.0, 0.0);
|
||||||
v.0 = DVec3::ZERO;
|
v.0 = DVec3::ZERO;
|
||||||
|
} else {
|
||||||
|
error!("Could not determine position of actor with ID: '{}'", station);
|
||||||
}
|
}
|
||||||
else if param1 == "metisprime".to_string() {
|
} else {
|
||||||
*pos = Position(DVec3::new(27643e3, -47e3, -124434e3));
|
|
||||||
v.0 = DVec3::ZERO;
|
|
||||||
}
|
|
||||||
else if param1 == "serenity".to_string() {
|
|
||||||
*pos = Position(DVec3::new(-121095e3, 582e3, -190816e3));
|
|
||||||
v.0 = DVec3::ZERO;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
error!("Invalid destination for cryotrip chat script: '{}'", param1);
|
error!("Invalid destination for cryotrip chat script: '{}'", param1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue