mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Added default explosion radius
This commit is contained in:
parent
5b62531da3
commit
e6f384fc11
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user