I added some new variables that should be used for all weapons. My custom weapons set these variables, but I need some place to store some defaults. For this purpose I though I could simply use a class that extends Weapon.
Problem is: I can't typecast to this class.
just fills my log with "did not work". I just can't put my finger on what I'm doing wrong
Code:
class CustomWeapon extends Weapon
abstract;
var byte Foobar;
defaultproperties
{
}
Code:
if (Pawn.Weapon != None)
if (CustomWeapon(Pawn.Weapon) != None)
log("worked");
else
log("did not work");
else
log("no pawn.weapon");