mirror of
https://github.com/redstrate/Kawari.git
synced 2025-05-20 01:37:45 +00:00
Fallback to 0,0,0 if we fail to find aetheryte destination
This commit is contained in:
parent
d82cb2d048
commit
d7499e6015
1 changed files with 13 additions and 8 deletions
|
@ -384,14 +384,19 @@ impl ZoneConnection {
|
||||||
let new_zone = Zone::load(&mut game_data.game_data, zone_id);
|
let new_zone = Zone::load(&mut game_data.game_data, zone_id);
|
||||||
|
|
||||||
// find it on the other side
|
// find it on the other side
|
||||||
let (object, _) = new_zone.find_pop_range(pop_range_id).unwrap();
|
if let Some((object, _)) = new_zone.find_pop_range(pop_range_id) {
|
||||||
|
// set the exit position
|
||||||
// set the exit position
|
self.exit_position = Some(Position {
|
||||||
self.exit_position = Some(Position {
|
x: object.transform.translation[0],
|
||||||
x: object.transform.translation[0],
|
y: object.transform.translation[1],
|
||||||
y: object.transform.translation[1],
|
z: object.transform.translation[2],
|
||||||
z: object.transform.translation[2],
|
});
|
||||||
});
|
} else {
|
||||||
|
tracing::warn!(
|
||||||
|
"Failed to find pop range in {}. Falling back to 0,0,0!",
|
||||||
|
new_zone.id
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
territory_type = zone_id;
|
territory_type = zone_id;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue