World: Give different error message on WorldInfoError::UnsupportedVersion
This commit is contained in:
parent
dbf58a54a8
commit
1da941755a
@ -75,11 +75,14 @@ impl Level {
|
||||
match error {
|
||||
// If it doesn't exist, just make a new one
|
||||
WorldInfoError::InfoNotFound => (),
|
||||
_ => {
|
||||
log::error!("Failed to load world info!");
|
||||
WorldInfoError::UnsupportedVersion(version) => {
|
||||
log::error!("Failed to load world info!, {version}");
|
||||
log::error!("{}", error);
|
||||
panic!("Unsupported world data! See the logs for more info.");
|
||||
}
|
||||
e => {
|
||||
panic!("World Error {}", e);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let dat_path = level_folder.root_folder.join(LEVEL_DAT_FILE_NAME);
|
||||
|
||||
@ -67,8 +67,8 @@ impl ThrownItemEntity {
|
||||
self.entity.velocity.store(velocity);
|
||||
let len = velocity.horizontal_length();
|
||||
self.entity.set_rotation(
|
||||
velocity.x.atan2(velocity.z).to_degrees() as f32,
|
||||
velocity.y.atan2(len).to_degrees() as f32,
|
||||
velocity.x.atan2(velocity.z) as f32 * 57.295_776,
|
||||
velocity.y.atan2(len) as f32 * 57.295_776,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
#![expect(clippy::module_name_repetitions)]
|
||||
#![expect(clippy::struct_excessive_bools)]
|
||||
// Not warn event sending macros
|
||||
#![allow(unused_labels)]
|
||||
#![expect(unused_labels)]
|
||||
|
||||
#[cfg(target_os = "wasi")]
|
||||
compile_error!("Compiling for WASI targets is not supported!");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user