Opty - Long Schlong detection in AI aioming

This commit is contained in:
Pecusx
2025-12-24 23:26:10 +01:00
parent 6b02c77833
commit d498cd181e
2 changed files with 18 additions and 9 deletions
+18 -9
View File
@@ -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
View File
Binary file not shown.