NicePack/sources/Weapons/BaseWeaponClasses/Melee/NiceMeleeWeapon.uc
Anton Tarasenko 12d95e387e Revert weapon conversion
This patch reverts first step of global weapon conversion
that would have halted the release of the next version for too long.
2020-04-17 23:06:41 +07:00

43 lines
1.3 KiB
Ucode

class NiceMeleeWeapon extends NiceWeapon;
var class<damageType> hitDamType;
var float weaponRange;
var Material BloodyMaterial;
var int BloodSkinSwitchArray;
var string BloodyMaterialRef;
static function PreloadAssets(Inventory Inv, optional bool bSkipRefCount){
super.PreloadAssets(Inv, bSkipRefCount);
if(default.BloodyMaterial == none && default.BloodyMaterialRef != "")
default.BloodyMaterial = Combiner(DynamicLoadObject(default.BloodyMaterialRef, class'Combiner', true));
if(NiceMeleeWeapon(Inv) != none)
NiceMeleeWeapon(Inv).BloodyMaterial = default.BloodyMaterial;
}
static function bool UnloadAssets(){
if(super.UnloadAssets())
default.BloodyMaterial = none;
return true;
}
//simulated function IncrementFlashCount(int mode){
//}
simulated function BringUp(optional Weapon PrevWeapon){
if(BloodyMaterial!=none && Skins[BloodSkinSwitchArray] == BloodyMaterial ){
Skins[BloodSkinSwitchArray] = default.Skins[BloodSkinSwitchArray];
Texture = default.Texture;
}
super.BringUp(PrevWeapon);
}
simulated function Fire(float F){
}
simulated function AltFire(float F){
}
simulated function bool HasAmmo(){
return true;
}
defaultproperties
{
weaponRange=70.000000
BloodSkinSwitchArray=2
PutDownAnim="PutDown"
bMeleeWeapon=True
}