Added default explosion radius

This commit is contained in:
Joshua Barretto 2019-08-07 18:18:32 +01:00
parent 5b62531da3
commit e6f384fc11

View File

@ -677,7 +677,8 @@ fn handle_lantern(server: &mut Server, entity: EcsEntity, args: String, action:
}
fn handle_explosion(server: &mut Server, entity: EcsEntity, args: String, action: &ChatCommand) {
if let Ok(radius) = scan_fmt!(&args, action.arg_fmt, f32) {
let radius = scan_fmt!(&args, action.arg_fmt, f32).unwrap_or(8.0);
match server.state.read_component_cloned::<comp::Pos>(entity) {
Some(pos) => server
.state
@ -690,7 +691,6 @@ fn handle_explosion(server: &mut Server, entity: EcsEntity, args: String, action
),
}
}
}
fn handle_tell(server: &mut Server, entity: EcsEntity, args: String, action: &ChatCommand) {
if let Ok(alias) = scan_fmt!(&args, action.arg_fmt, String) {