Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Friendly Fire
#1
Friendly fire:
.zip   friendlyfire.zip (Size: 1.2 MB / Downloads: 248)

How it works. There is a check which checks if you are on the same team as the object with the itr you are getting "hit" by. Pretty obvious. Assembly:

Code:
CPU Disasm
Address   Hex dump          Command                                  Comments
004177C4  |.  8B85 64030000 MOV EAX,DWORD PTR SS:[EBP+364]
004177CA  |.  3B83 64030000 CMP EAX,DWORD PTR DS:[EBX+364]
004177D0      0F85 90000000 JNE 00417866


JNE = jump if not equal. This exe replaces that JNE with a JMP, so it makes the game think all objects are always on separate teams.

Thanks to xsoameix for reverse engineering the giant "process_attack" function here: https://github.com/xsoameix/lf2/blob/mas...ss.rb#L506

And to Zort for bringing it up on IRC.


Friendly fire 2:

.zip   friendlyfire2.zip (Size: 1.2 MB / Downloads: 79)

So in the first one, you could hit yourself with your own projectiles. That was cool but kind of broke firen and freeze as they would hit them selves with the explosion and tornado which kinda made them stupidly weak. This version works by changing the comparison to check if the "owner" is the same rather than the team. i.e (notcie the 354 instead of 364 :P):

Code:
CPU Disasm
Address   Hex dump          Command                                  Comments
004177C4  |.  8B85 64030000 MOV EAX,DWORD PTR SS:[EBP+354]
004177CA  |.  3B83 64030000 CMP EAX,DWORD PTR DS:[EBX+354]
004177D0      0F85 90000000 JNE 00417866


Edit 3:

They are probably both broken in different ways. Too lazy to think about the best way of fixing them.
[Image: doty7Xn.gif]

10 ʏᴇᴀʀs sɪɴᴄᴇ ɪʀᴄ ɢᴏᴏᴅ.ɪ ᴡᴀʟᴋ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴇᴍᴘᴛʏ sᴛʀᴇᴇᴛs ᴛʀʏɪɴɢ ᴛᴏ ᴛʜɪɴᴋ ᴏғ sᴏᴍᴇᴛʜɪɴɢ ᴇʟsᴇ ʙᴜᴛ ᴍʏ ᴘᴀᴛʜ ᴀʟᴡᴀʏs ʟᴇᴀᴅs ᴛᴏ ᴛʜᴇ ɪʀᴄ. ɪ sᴛᴀʀᴇ ᴀᴛ ᴛʜᴇ sᴄʀᴇᴇɴ ғᴏʀ ʜᴏᴜʀs ᴀɴᴅ ᴛʀʏ ᴛᴏ sᴜᴍᴍᴏɴ ᴛʜᴇ ɢᴏᴏᴅ ɪʀᴄ. ɪ ᴡᴀᴛᴄʜ ᴏᴛʜᴇʀ ɪʀᴄ ᴄʜᴀɴɴᴇʟs ʙᴜᴛ ɪᴛ ɪs ɴᴏ ɢᴏᴏᴅ. ɪ ᴘᴇsᴛᴇʀ ᴢᴏʀᴛ ᴀɴᴅ ᴛʀʏ ᴛᴏ ʀᴇsɪsᴛ ʜɪs sᴇxɪɴᴇss ʙᴜᴛ ɪᴛ ɪs ᴀʟʟ ᴍᴇᴀɴɪɴɢʟᴇss. ᴛʜᴇ ᴇɴᴅ ɪs ɴᴇᴀʀ.ɪ ᴛʜᴇɴ ᴜsᴜᴀʟʟʏ ʀᴇᴀᴅ sᴏᴍᴇ ᴏʟᴅ ɪʀᴄ ʟᴏɢs ᴀɴᴅ ᴄʀʏ ᴍʏsᴇʟғ ᴛᴏ sʟᴇᴇᴘ.


Reply
Thanks given by: Electric2Shock , Ariyan


Messages In This Thread
Friendly Fire - by Boop - 02-28-2015, 03:42 PM
RE: Friendly Fire - by A-Man - 02-28-2015, 06:07 PM
RE: Friendly Fire - by Boop - 02-28-2015, 06:22 PM
RE: Friendly Fire - by A-Man - 03-01-2015, 04:33 AM
RE: Friendly Fire - by o_g349 - 03-14-2015, 07:03 PM



Users browsing this thread: 2 Guest(s)