mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fix spawning few entities at once
This commit is contained in:
parent
89fbc86eb5
commit
44862d0acc
@ -262,8 +262,8 @@ fn handle_spawn(server: &mut Server, entity: EcsEntity, args: String, action: &C
|
||||
match server.state.read_component_cloned::<comp::Pos>(entity) {
|
||||
Some(mut pos) => {
|
||||
pos.0.x += 1.0; // Temp fix TODO: Solve NaN issue with positions of pets
|
||||
let body = kind_to_body(id);
|
||||
for _ in 0..amount {
|
||||
let body = kind_to_body(id);
|
||||
server
|
||||
.create_npc(pos, get_npc_name(id), body)
|
||||
.with(agent)
|
||||
|
Loading…
Reference in New Issue
Block a user