projects
/
gbrg
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98a7c40
)
unit_cpu: Made the default AI follow the player a little bit less
author
Lukas Krickl
<lukas@krickl.dev>
Thu, 21 Aug 2025 18:27:24 +0000
(20:27 +0200)
committer
Lukas Krickl
<lukas@krickl.dev>
Thu, 21 Aug 2025 18:27:24 +0000
(20:27 +0200)
src/unit_cpu.s
patch
|
blob
|
history
diff --git
a/src/unit_cpu.s
b/src/unit_cpu.s
index 961ecb06a27802ddfaeca90d065ff4da4e988fb9..2325cad277580fed04dc466c73a1fa1ca3a9b2c9 100644
(file)
--- a/
src/unit_cpu.s
+++ b/
src/unit_cpu.s
@@
-24,7
+24,7
@@
unit_handle_cpu_inputs:
; there's a change the
; unit will just move randomly anyway
call rand
- and a, 0x
7F
+ and a, 0x
2
cp a, 0
jp z, @random_move
@@
-45,7
+45,7
@@
unit_handle_cpu_inputs:
; are we in scan range?
cp a, UNIT_SCAN_RANGE_Y
jr nc, @not_in_y_range REL
- cp a,
1
+ cp a,
0
jr z, @not_in_y_range REL
; which direction?
@@
-74,7
+74,7
@@
unit_handle_cpu_inputs:
; are we in scan range?
cp a, UNIT_SCAN_RANGE_X
jr nc, @not_in_x_range REL
- cp a,
1
+ cp a,
0
jr z, @not_in_x_range REL
; which direction?