diff --git a/constants.asm b/constants.asm index d724223..a99b73b 100644 --- a/constants.asm +++ b/constants.asm @@ -514,7 +514,8 @@ EndOfTheBarrelY .by 6,6,6,6,6,6,6,6,6 .by 5,5,5,5,5,5,5,5,5,5 .by 4,4,4,4,4,4,4,4,4,4,4,4,4 - .by 3,3,3,3,3,3,3,3,3,3,3,3,3,3 + .by 4,4,4,4,4,4,4,4,4,4,4,4,4,4 ; one pixel Up for fix problems with colision check +; .by 3,3,3,3,3,3,3,3,3,3,3,3,3,3 .by 0,0,0,0,0,0,0,0,0,0 ; not used .by 0,0,0,0,0,0,0,0,0,0 ; not used @@ -526,7 +527,8 @@ EndOfTheBarrelY .by 0,0,0,0 ; not used ; left angles from 90 (horizontally to the left) to 1 (vertically up) - .by 3,3,3,3,3,3,3,3,3,3,3,3,3,3 +; .by 3,3,3,3,3,3,3,3,3,3,3,3,3,3 + .by 4,4,4,4,4,4,4,4,4,4,4,4,4,4 ; one pixel Up for fix problems with colision check .by 4,4,4,4,4,4,4,4,4,4,4,4,4 .by 5,5,5,5,5,5,5,5,5,5 .by 6,6,6,6,6,6,6,6,6 diff --git a/scorch.xex b/scorch.xex index 52f800e..5c5991f 100644 Binary files a/scorch.xex and b/scorch.xex differ diff --git a/weapons.asm b/weapons.asm index adc34ce..bcad5ac 100644 --- a/weapons.asm +++ b/weapons.asm @@ -2288,6 +2288,8 @@ MIRValreadyAll CheckCollisionWithTankLoop lda eXistenZ,x beq DeadTank + lda ShieldEnergy,x + bne CheckCollisionWithShieldedTank ; tank with shield is bigger :) lda xtankstableH,x cmp xdraw+1 bne Condition01 @@ -2327,6 +2329,39 @@ DeadTank cpx NumberOfPlayers bne CheckCollisionWithTankLoop rts +CheckCollisionWithShieldedTank + lda xtankstableH,x + cmp xdraw+1 + bne Condition01a + lda xtankstableL,x + sec + sbc #4 ; 5 pixels more on left side + cmp xdraw +Condition01a + bcs LeftFromTheTank ;add 8 double byte + clc + adc #16 + tay + lda xtankstableH,x + adc #0 + cmp xdraw+1 + bne Condition02a + cpy xdraw +Condition02a + bcc RightFromTheTank + + lda ytankstable,x + cmp ydraw ; check range + bcc BelowTheTank ;(ytankstable,ytankstable+3) + sbc #4 ; we must rewrite EndOfTheBarrelY table or remove Y correction completely to "bold" tank !!! + cmp ydraw + bcs OverTheTank + inx + stx HitFlag ; index of hit tank+1 + dex + mwa xdraw XHit + mwa ydraw YHit + rts ; in X there is an index of the hit tank .endp ;-------------------------------------------------- CalculateExplosionRange0