From d498cd181eab40dd839774f3d8897d98e41e1a9c Mon Sep 17 00:00:00 2001 From: Pecusx Date: Wed, 24 Dec 2025 23:26:10 +0100 Subject: [PATCH] Opty - Long Schlong detection in AI aioming --- ai.asm | 27 ++++++++++++++++++--------- scorch.xex | Bin 32721 -> 32707 bytes 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/ai.asm b/ai.asm index d660a36..535280f 100644 --- a/ai.asm +++ b/ai.asm @@ -437,9 +437,10 @@ loop01 beq skipThisPlayer lda eXistenZ,y beq skipThisPlayer - lda BarrelLength,y - cmp #LongBarrel ; if target has Long Schlong do not aim - beq skipThisPlayer + ; moved to CheckTeamMember for optimization + ;lda BarrelLength,y + ;cmp #LongBarrel ; if target has Long Schlong do not aim + ;beq skipThisPlayer jsr CheckTeamMember bcc skipThisPlayer ; if the same Team lda skilltable,y @@ -501,9 +502,10 @@ loop01 beq skipThisPlayer lda eXistenZ,y beq skipThisPlayer - lda BarrelLength,y - cmp #LongBarrel ; if target has Long Schlong do not aim - beq skipThisPlayer + ; moved to CheckTeamMember for optimization + ;lda BarrelLength,y + ;cmp #LongBarrel ; if target has Long Schlong do not aim + ;beq skipThisPlayer jsr CheckTeamMember bcc skipThisPlayer ; if the same Team lda LowResDistances,x @@ -822,9 +824,10 @@ SetNextTarget beq skipThisPlayer lda eXistenZ,y beq skipThisPlayer - lda BarrelLength,y - cmp #LongBarrel ; if target has Long Schlong do not aim - beq skipThisPlayer + ; moved to CheckTeamMember for optimization + ;lda BarrelLength,y + ;cmp #LongBarrel ; if target has Long Schlong do not aim + ;beq skipThisPlayer jsr CheckTeamMember bcc skipThisPlayer ; if the same Team ; check target direction @@ -852,6 +855,11 @@ TankHit .proc CheckTeamMember ; Target tank number in Y ; 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 bit TeamGame ; if teams game bvc no_teams @@ -859,6 +867,7 @@ TankHit eor TankNr ror ; check lower bits of tank numbers (team) no_teams +SchlongIsLong rts .endp ;---------------------------------------------- diff --git a/scorch.xex b/scorch.xex index 5498bd6d68023ccef755cd9c020bbbf47376e3c4..d250351b534c574f7c78f51101b685d24bef2da2 100644 GIT binary patch delta 655 zcmZ{iUr19?9LGKD+H!R2UMjpfkTWP)N=&H-TY)_!NciGILi>A_L5!w8%}U7X;g%0g zgwsQ9-rXDQ5~rq&E?QzEDBW^3T{S2fA|?!aiMw93@yQG!=_hDP(N6yiO`fhZmx7srr}B& zCJe=3Ew zbfE(3D6nh-vc0O9|5cI);OQ#!Y9+bZdnAmhNR5%mzR0|$xHsyT_VZ+?2P6ZxWN4aI{_^f delta 644 zcmZ9HOK1~O6ozx_)R^Gd2{f7}RBti(tfZnyd_Wa!X(byM7Hpe`5~@*?xG73D>f&k^ zQ3BV6W-^&sWRR<^28RkMZ5Or-MoejSs#&qC51s`p*gbUHT#?`x z9>O#n!LNr-g9c{ivSp7);F=&I&U7vB-*X~SO>&b#O znMazZkg>^Hi0+lw_G&>MKlioUbEdMUhIP(k7Tt1+-cIG3R9@9QWB8W;(5^`#JHeeA zFS7UN*+zkb@8(&(v({pFqXncb7X4OM6~>CJJi%>ff_JT&`}3uVtYi}*c>C;Zu{Ew^C0L5n-xN)Sk9yYJV qAw6Y)CB=SWbTfE{li`P(c!GY&Kikr{Gty>!K?Kp3pHn=M8