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 );
}