In the following, for some reason in the AlwaysFire function it acts as if CanFire always returns false and prints the appropriate log line, but [CanFire] is never displayed on the server or the client, as if it isn't actually calling the function (and obviously it isn't if its getting false back)
Code:
// My_BaseWeapon.uc
class My_BaseWeapon extends Weapon
abstract;
function bool CanFire()
{
Log("[CanFire]", 'MyMod');
return true;
}
// My_BaseFire.uc
class My_BaseFire extends WeaponFire;
simulated function bool AllowFire()
{
if(!Weapon.IsA('My_BaseWeapon'))
return Super.AllowFire();
if(!My_BaseWeapon(Weapon).CanFire())
{
Log("[AllowFire]: !My_BaseWeapon(Weapon).CanFire()",'MyMod');
return false;
}
return true;
}
Last edited: