Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Friendly fire
#10
lf2 new use itr kind 40~49 to hit teammate.
So do you want one ?
I decompiled the function func_417400/does_attack_success, this line can tell you why state 18 can attack your teammate.

If you want one, just modify here.

    C-Code:
# 00417862
          # attacker can't attack the one on same team.
          if (attacker->team == injured->team and
              attacker->team != no_team and
              <DVZ_ME#0> != itr_heal and
              # burning object can attack the one on same team except
              # flame and firen explosion.
              (attacker_state != fire_state or
               effect == flame_effect or
               effect == firen_explosion_effect
              ) and
              # weapons and balls and drinks can attack the balls in
              # opposite directions.
              (attacker_type != character_type or
               injured_type != attack_type or
               attacker->facing == injured->facing
              ) and
              # attacker can attack weapons and drinks on same team.
              injured_type != lignt_weapon_type and
              injured_type != heavy_weapon_type and
              injured_type != throw_weapon_type and
              injured_type != drink_type)
            break
          end


to:
    C-Code:
# 00417862
          # attacker can't attack the one on same team.
          if (attacker->team == injured->team and
              attacker->team != no_team and
              <DVZ_ME#0> != itr_heal and
              # burning object can attack the one on same team except
              # flame and firen explosion.
              (attacker_state != fire_state or
               effect == flame_effect or
               effect == firen_explosion_effect
              ) and
              itr_kind != 123 and
              <DVZ_ME#1>>effect != 456 and
              # weapons and balls and drinks can attack the balls in
              # opposite directions.
              (attacker_type != character_type or
               injured_type != attack_type or
               attacker->facing == injured->facing
              ) and
              # attacker can attack weapons and drinks on same team.
              injured_type != lignt_weapon_type and
              injured_type != heavy_weapon_type and
              injured_type != throw_weapon_type and
              injured_type != drink_type)
            break
          end


and compile this code to .dll
Decompiled functions: [documented] Functions decompiled
Decompile lf2.exe project for documentation: https://github.com/xsoameix/lf2
Decompile lf2.exe project for implementation: https://github.com/xsoameix/openlf2
Once any function fully engineer reversed in documentation project, then we implement it in implementation project.

lf2 data structure: Updated spreadsheet, many changes made by o_g349/xsoameix, I have two different nick names.

A old project: lf2-MS
Reply
Thanks given by:


Messages In This Thread
Friendly fire - by Marko - 08-20-2014, 11:59 AM
RE: Friendly fire - by Nyamaiku - 08-20-2014, 12:17 PM
RE: Friendly fire - by Hellblazer - 08-20-2014, 12:17 PM
RE: Friendly fire - by Marko - 08-20-2014, 01:54 PM
RE: Friendly fire - by Nyamaiku - 08-20-2014, 02:14 PM
RE: Friendly fire - by Marko - 08-20-2014, 02:24 PM
RE: Friendly fire - by TamBoy - 08-22-2014, 06:12 AM
RE: Friendly fire - by o_g349 - 08-20-2014, 03:43 PM
RE: Friendly fire - by Gespenst - 08-20-2014, 04:41 PM
RE: Friendly fire - by o_g349 - 08-22-2014, 07:45 AM
RE: Friendly fire - by A-Man - 08-22-2014, 08:30 AM
RE: Friendly fire - by o_g349 - 08-22-2014, 08:48 AM



Users browsing this thread: 2 Guest(s)