First, I don't know if this should go here or somewhere else
I found a fail between a guard fight next to a tapestry with floor and I would like to fix it.
The guard stops being aggresive if you move him to the tapestry with floor and does not do anything else than turning to see the prince
watch the video to understand
Guard fight fail
Guard fight fail
65536
- atrueprincefanfrom18
- Site Shah
- Posts: 1786
- Joined: January 21st, 2020, 2:53 pm
- Contact:
Re: Guard fight fail
This has already been discussed before in this thread. I don't know if it can be fixed. If it can be fixed it's David who can help you fix it. And if it can be fixed, it's in the correct thread!
Re: Guard fight fail
I've recently fixed this in SDLPoP:Emiliano Fierro wrote: ↑June 20th, 2020, 1:04 am I found a fail between a guard fight next to a tapestry with floor and I would like to fix it.
The guard stops being aggresive if you move him to the tapestry with floor and does not do anything else than turning to see the prince
https://github.com/NagyD/SDLPoP/commit/ ... 30f45eb150
https://github.com/NagyD/SDLPoP/commit/ ... aac97bb54f
I've also found how to fix this in PoP DOS:
Search: 80 3E F9 42 07 75 03 E9 31 FF 80 3E F9 42 0C 75 9C E9 27 FF
(The offset is 0x6B20 in unpacked v1.0.)
Change to: 8B 5E FE 39 5E FA 74 A5 3C 07 75 A1 3C 0C E9 2A FF 90 90 90
This hack is not perfect, though.
If either the guard or the prince is between a doortop on the left and a gate on the right (and they are adjacent tiles), and his opponent is on his left side, then the game thinks they can see each other.
I could solve this in SDLPoP (see the second commit), but in PoP DOS there is simply not enough space to do this properly.
Details:
Code: Select all
We change this part:
seg003:0A76 E8 20 00 call near ptr get_tile_at_kid
seg003:0A79 3C 14 cmp al, tiles_20_wall
seg003:0A7B 75 03 jnz loc_5270
seg003:0A7D E9 3B FF jmp return_0
seg003:0A80 loc_5270:
seg003:0A80 80 3E F9 42 07 cmp curr_tile2, tiles_7_doortop_with_floor
seg003:0A85 75 03 jnz loc_527A
seg003:0A87 E9 31 FF jmp return_0
seg003:0A8A loc_527A:
seg003:0A8A 80 3E F9 42 0C cmp curr_tile2, tiles_12_doortop
seg003:0A8F 75 9C jnz loc_521D
seg003:0A91 E9 27 FF jmp return_0
The new code is:
00000A80:i8B5EFE mov bx,[bp-02] ; right_pos
00000A83:i395EFA cmp [bp-06],bx ; left_pos
00000A86:i74A5 je file:00000A2D ; loc_521D
00000A88:i3C07 cmp al,07 ; tiles_7_doortop_with_floor
00000A8A:i75A1 jne file:00000A2D ; loc_521D
00000A8C:i3C0C cmp al,0C ; tiles_12_doortop
00000A8E:iE92AFF jmpn file:000009BB ; return_0
(followed by 3 NOPs)