mirror of
https://github.com/badvision/lawless-legends.git
synced 2024-09-29 11:55:21 +00:00
Corrected handling of obstruction and script flags on 2D map.
This commit is contained in:
parent
329a7070ce
commit
d4a550f760
@ -468,7 +468,11 @@ class PackPartitions
|
||||
(0..<TILES_PER_ROW).each { colNum ->
|
||||
def x = hOff + colNum
|
||||
def tile = (row && x < width) ? row[x] : null
|
||||
def flags = ([colNum, rowNum] in locationsWithTriggers) ? 0x20 : 0
|
||||
def flags = 0
|
||||
if ([colNum, rowNum] in locationsWithTriggers)
|
||||
flags |= 0x20
|
||||
if (tile?.@obstruction == 'true')
|
||||
flags |= 0x40
|
||||
buf.put((byte)((tile ? tileMap[tile.@id] : 0) | flags))
|
||||
}
|
||||
}
|
||||
|
@ -1286,7 +1286,7 @@ ADVANCE: !zone {
|
||||
|
||||
JSR CALC
|
||||
LDA AVATAR_TILE ; get tile flags
|
||||
AND #$20 ; obstructed?
|
||||
AND #$40 ; obstructed?
|
||||
BEQ +
|
||||
|
||||
; Player moved to an obstructed place. Undo!
|
||||
@ -1311,7 +1311,7 @@ ADVANCE: !zone {
|
||||
BEQ .ret
|
||||
INY ; moved
|
||||
LDA AVATAR_TILE
|
||||
AND #$10 ; check script flag
|
||||
AND #$20 ; check script flag
|
||||
BEQ .ret
|
||||
INY ; moved and also new place is scripted
|
||||
.ret RTS
|
||||
|
Loading…
Reference in New Issue
Block a user