mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-07 16:13:23 +08:00
Tidied up bot logic
This commit is contained in:
parent
98058bc449
commit
da61158f8a
@ -251,9 +251,7 @@ class SpazBot(basespaz.Spaz):
|
|||||||
self.node.move_up_down = 0.0
|
self.node.move_up_down = 0.0
|
||||||
|
|
||||||
# Otherwise try to go pick it up.
|
# Otherwise try to go pick it up.
|
||||||
else:
|
elif self.target_flag.node:
|
||||||
assert self.target_flag.node
|
|
||||||
if self.target_flag.node.exists():
|
|
||||||
target_pt_raw = ba.Vec3(*self.target_flag.node.position)
|
target_pt_raw = ba.Vec3(*self.target_flag.node.position)
|
||||||
diff = (target_pt_raw - our_pos)
|
diff = (target_pt_raw - our_pos)
|
||||||
diff = ba.Vec3(diff[0], 0, diff[2]) # Don't care about y.
|
diff = ba.Vec3(diff[0], 0, diff[2]) # Don't care about y.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user