Merge branch 'qutrin/spawn-amount-fix' into 'master'

Fix spawning few entities at once

See merge request veloren/veloren!259
This commit is contained in:
Joshua Barretto 2019-06-28 17:08:13 +00:00
commit 763c8db60b

View File

@ -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)