Tidied up bot logic

This commit is contained in:
Eric Froemling 2020-04-13 20:07:11 -07:00
parent 98058bc449
commit da61158f8a

View File

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