mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
Exit from AI aiming bug fixed
This commit is contained in:
@@ -81,7 +81,7 @@ AIRoutines
|
|||||||
.proc Moron
|
.proc Moron
|
||||||
jsr RandomizeAngle
|
jsr RandomizeAngle
|
||||||
sta NewAngle
|
sta NewAngle
|
||||||
mwa #80 RandBoundaryLow
|
mwa #180 RandBoundaryLow
|
||||||
mwa #800 RandBoundaryHigh
|
mwa #800 RandBoundaryHigh
|
||||||
jsr RandomizeForce
|
jsr RandomizeForce
|
||||||
; choose the best weapon
|
; choose the best weapon
|
||||||
@@ -603,6 +603,8 @@ RepeatAim
|
|||||||
AimingRight
|
AimingRight
|
||||||
; make test Shoot (Flight)
|
; make test Shoot (Flight)
|
||||||
jsr SetStartAndFlight
|
jsr SetStartAndFlight
|
||||||
|
bit escFlag
|
||||||
|
bmi EndOfAim
|
||||||
lda HitFlag
|
lda HitFlag
|
||||||
beq NoHitInFirstLoopR ; impossible :)
|
beq NoHitInFirstLoopR ; impossible :)
|
||||||
bmi GroundHitInFirstLoopR
|
bmi GroundHitInFirstLoopR
|
||||||
@@ -646,6 +648,8 @@ EndOfFirstLoopR
|
|||||||
SecondLoopR
|
SecondLoopR
|
||||||
; make test Shoot (Flight)
|
; make test Shoot (Flight)
|
||||||
jsr SetStartAndFlight
|
jsr SetStartAndFlight
|
||||||
|
bit escFlag
|
||||||
|
bmi EndOfAim
|
||||||
lda HitFlag
|
lda HitFlag
|
||||||
beq NoHitInSecondLoopR ; impossible :)
|
beq NoHitInSecondLoopR ; impossible :)
|
||||||
bmi GroundHitInSecondLoopR
|
bmi GroundHitInSecondLoopR
|
||||||
@@ -698,6 +702,8 @@ AimSecondTry
|
|||||||
AimingLeft
|
AimingLeft
|
||||||
; make test Shoot (Flight)
|
; make test Shoot (Flight)
|
||||||
jsr SetStartAndFlight
|
jsr SetStartAndFlight
|
||||||
|
bit escFlag
|
||||||
|
bmi EndOfAim
|
||||||
lda HitFlag
|
lda HitFlag
|
||||||
beq NoHitInFirstLoopL ; impossible :)
|
beq NoHitInFirstLoopL ; impossible :)
|
||||||
bmi GroundHitInFirstLoopL
|
bmi GroundHitInFirstLoopL
|
||||||
@@ -741,6 +747,8 @@ EndOfFirstLoopL
|
|||||||
SecondLoopL
|
SecondLoopL
|
||||||
; make test Shoot (Flight)
|
; make test Shoot (Flight)
|
||||||
jsr SetStartAndFlight
|
jsr SetStartAndFlight
|
||||||
|
bit escFlag
|
||||||
|
bmi EndOfAim
|
||||||
lda HitFlag
|
lda HitFlag
|
||||||
beq NoHitInSecondLoopL ; impossible :)
|
beq NoHitInSecondLoopL ; impossible :)
|
||||||
bmi GroundHitInSecondLoopL
|
bmi GroundHitInSecondLoopL
|
||||||
@@ -795,8 +803,11 @@ SetStartAndFlight ; set start point (virtual barrel end :) ) and make test fl
|
|||||||
and #%00000001 ; START KEY
|
and #%00000001 ; START KEY
|
||||||
beq @speedup
|
beq @speedup
|
||||||
jsr MoveBarrelToNewPosition
|
jsr MoveBarrelToNewPosition
|
||||||
|
bit escFlag
|
||||||
|
bmi exit
|
||||||
@speedup
|
@speedup
|
||||||
jsr Flight
|
jsr Flight
|
||||||
|
exit
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
@@ -1077,16 +1088,14 @@ loop
|
|||||||
; result in A
|
; result in A
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
ldy TargetTankNr
|
ldy TargetTankNr
|
||||||
lda LowResDistances,x
|
|
||||||
cmp LowResDistances,y
|
|
||||||
@ bcs YisLower
|
|
||||||
sec
|
sec
|
||||||
lda LowResDistances,y
|
|
||||||
sbc LowResDistances,x
|
|
||||||
rts
|
|
||||||
YisLower
|
|
||||||
lda LowResDistances,x
|
lda LowResDistances,x
|
||||||
sbc LowResDistances,y
|
sbc LowResDistances,y
|
||||||
|
bcs YisLower
|
||||||
|
XisLower
|
||||||
|
eor #$ff
|
||||||
|
adc #1
|
||||||
|
YisLower
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
|||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user