Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. Function Detouring / Overriding Multiple Times

Function Detouring / Overriding Multiple Times

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
1 Posts 1 Posters 41 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • jakej78bundefined Offline
    jakej78bundefined Offline
    jakej78b
    wrote on last edited by jakej78b
    #1

    So I made a script that successfully sets the gavaknuckles to 1,000,000 damage, the only issue is when I combine this with another script that also detours level.callbackactordamage, one of the detours does not work. Specifically, I am trying to use this in conjunction with
    https://forum.plutonium.pw/topic/32538/release-zm-black-ops-2-custom-perks?_=1721359339869
    I don't see an issue with multiple detours myself, in my mind the first detour would simple execute the second detour's level.callbackactordamage which would then execute the original level.callbackactordamage, though this doesn't seem to be what is happening. How can I make both of these scripts work together? Also, the second script does not call the original function level.callbackactordamagestub, it calls it level.originalcallbackactordamage, which should mean that it is not being overriden.

    init()
    {
    	level.callbackactordamagestub = level.callbackactordamage;
    	level.callbackactordamage = ::buffDamage;
    }
    
    
    buffDamage( inflictor, attacker, damage, flags, meansofdeath, weapon, vpoint, vdir, shitloc, psoffsettime, boneindex )
    {
    	if (isDefined( attacker ) && isplayer( attacker )) {
    		if (weapon == "tazer_knuckles_zm") { 
    			damage = 1000000;
    		}
    	}
    	self [[level.callbackactordamagestub]]( inflictor, attacker, damage, flags, meansofdeath, weapon, vpoint, vdir, shitloc, psoffsettime, boneindex );
    } 
    
    1 Reply Last reply
    0

    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Donate