mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
Opty - Long Schlong detection in AI aioming
This commit is contained in:
@@ -437,9 +437,10 @@ loop01
|
|||||||
beq skipThisPlayer
|
beq skipThisPlayer
|
||||||
lda eXistenZ,y
|
lda eXistenZ,y
|
||||||
beq skipThisPlayer
|
beq skipThisPlayer
|
||||||
lda BarrelLength,y
|
; moved to CheckTeamMember for optimization
|
||||||
cmp #LongBarrel ; if target has Long Schlong do not aim
|
;lda BarrelLength,y
|
||||||
beq skipThisPlayer
|
;cmp #LongBarrel ; if target has Long Schlong do not aim
|
||||||
|
;beq skipThisPlayer
|
||||||
jsr CheckTeamMember
|
jsr CheckTeamMember
|
||||||
bcc skipThisPlayer ; if the same Team
|
bcc skipThisPlayer ; if the same Team
|
||||||
lda skilltable,y
|
lda skilltable,y
|
||||||
@@ -501,9 +502,10 @@ loop01
|
|||||||
beq skipThisPlayer
|
beq skipThisPlayer
|
||||||
lda eXistenZ,y
|
lda eXistenZ,y
|
||||||
beq skipThisPlayer
|
beq skipThisPlayer
|
||||||
lda BarrelLength,y
|
; moved to CheckTeamMember for optimization
|
||||||
cmp #LongBarrel ; if target has Long Schlong do not aim
|
;lda BarrelLength,y
|
||||||
beq skipThisPlayer
|
;cmp #LongBarrel ; if target has Long Schlong do not aim
|
||||||
|
;beq skipThisPlayer
|
||||||
jsr CheckTeamMember
|
jsr CheckTeamMember
|
||||||
bcc skipThisPlayer ; if the same Team
|
bcc skipThisPlayer ; if the same Team
|
||||||
lda LowResDistances,x
|
lda LowResDistances,x
|
||||||
@@ -822,9 +824,10 @@ SetNextTarget
|
|||||||
beq skipThisPlayer
|
beq skipThisPlayer
|
||||||
lda eXistenZ,y
|
lda eXistenZ,y
|
||||||
beq skipThisPlayer
|
beq skipThisPlayer
|
||||||
lda BarrelLength,y
|
; moved to CheckTeamMember for optimization
|
||||||
cmp #LongBarrel ; if target has Long Schlong do not aim
|
;lda BarrelLength,y
|
||||||
beq skipThisPlayer
|
;cmp #LongBarrel ; if target has Long Schlong do not aim
|
||||||
|
;beq skipThisPlayer
|
||||||
jsr CheckTeamMember
|
jsr CheckTeamMember
|
||||||
bcc skipThisPlayer ; if the same Team
|
bcc skipThisPlayer ; if the same Team
|
||||||
; check target direction
|
; check target direction
|
||||||
@@ -852,6 +855,11 @@ TankHit
|
|||||||
.proc CheckTeamMember
|
.proc CheckTeamMember
|
||||||
; Target tank number in Y
|
; Target tank number in Y
|
||||||
; result in C bit ; 0 - the same Team ; 1 - another Team
|
; result in C bit ; 0 - the same Team ; 1 - another Team
|
||||||
|
; optimization
|
||||||
|
lda #LongBarrel-1
|
||||||
|
cmp BarrelLength,y ; if target has Long Schlong do not aim
|
||||||
|
bcc SchlongIsLong
|
||||||
|
; end of optimization
|
||||||
sec ; if there is no team play, then as a member of another team
|
sec ; if there is no team play, then as a member of another team
|
||||||
bit TeamGame ; if teams game
|
bit TeamGame ; if teams game
|
||||||
bvc no_teams
|
bvc no_teams
|
||||||
@@ -859,6 +867,7 @@ TankHit
|
|||||||
eor TankNr
|
eor TankNr
|
||||||
ror ; check lower bits of tank numbers (team)
|
ror ; check lower bits of tank numbers (team)
|
||||||
no_teams
|
no_teams
|
||||||
|
SchlongIsLong
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
|
|||||||
BIN
Binary file not shown.
Reference in New Issue
Block a user