summaryrefslogtreecommitdiff
path: root/src/npc.rs
diff options
context:
space:
mode:
authortom barrett <spalf0@gmail.com>2019-07-10 09:43:48 -0500
committertom barrett <spalf0@gmail.com>2019-07-10 09:43:48 -0500
commitced37025a37051db896443d310f5f613f1281882 (patch)
tree6faa646addcd2cfa1c49154a06846321a6e2e423 /src/npc.rs
parent503361ce70615d7c4b66bd7e49d56c61259dab32 (diff)
animation now always works, added player spawn
Diffstat (limited to 'src/npc.rs')
-rw-r--r--src/npc.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/npc.rs b/src/npc.rs
index c31f305..316908b 100644
--- a/src/npc.rs
+++ b/src/npc.rs
@@ -72,8 +72,8 @@ impl NPC {
pub fn build_npcs(tileset: &Tileset, map: &Map) -> Vec<NPC> {
let mut npcs = Vec::new();
- for (_name, position) in map.get_spawns() {
- npcs.push(NPC::new(tileset, position, map.get_dimensions()));
+ for point in map.get_spawn_points("peasant") {
+ npcs.push(NPC::new(tileset, point, map.get_dimensions()));
}
npcs