We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74617d5 commit 4d42fbeCopy full SHA for 4d42fbe
src/hyperspace/library/simulation.clj
@@ -45,10 +45,11 @@
45
player
46
heading
47
power]
48
- (trace "fire" world player heading power)
49
(let [players (->> world
50
:players
51
- (remove #(= % player)))]
+ ; Sometimes game will pass players with wrong states here (dead vs alive), so
+ ; just compare positions here.
52
+ (remove #(= (:position %) (:position player))))]
53
(loop [bullet {:position (:position player)
54
:velocity [(* (Math/cos heading) power)
55
(* (Math/sin heading) power)]
0 commit comments