fix spawn and better match hitbox to player sprite

This commit is contained in:
Travis Shears 2026-04-25 20:05:01 +02:00
parent 414006b667
commit 7e75b665f5
Signed by: travisshears
GPG key ID: CB9BF1910F3F7469
6 changed files with 42 additions and 23 deletions

View file

@ -76,7 +76,7 @@
:objects
(let [objects (:content (first (filter #(= (get-in % [:attrs :name]) "objects") (:content map-tmx))))]
(vec (map (fn [obj]
(let [attrs (dissoc (:attrs obj) :id)
(let [attrs (assoc (:attrs obj) :x (Double. (get-in obj [:attrs :x])) :y (Double. (get-in obj [:attrs :y])))
tags (flatten (map :content (:content obj)))
properties (map #(hash-map (keyword (get-in % [:attrs :name])) (get-in % [:attrs :value])) tags)]