simulated function ChangeWeaponProperties() { local int i; local WeaponInfo CurrentWeaponInfo; local class Weapon; local class PrjFire; local class InstantFire; local class MeleeFire; for(i = 0; i < WeaponInfoArray.length; i++) { CurrentWeaponInfo = WeaponInfoArray[i]; Weapon = CurrentWeaponInfo.Weapon; //log("Check"@Weapon); class(Weapon.default.PickupClass).default.Cost = CurrentWeaponInfo.Cost; Weapon.default.Weight = CurrentWeaponInfo.Weight; if (CurrentWeaponInfo.WeaponType == 3) { if(class(Weapon)!=None) { if (CurrentWeaponInfo.Damage > 0) class(Weapon).default.SentryClass.default.HitDamages = CurrentWeaponInfo.Damage; if (CurrentWeaponInfo.HP > 0) class(Weapon).default.SentryClass.default.TurretHealth = CurrentWeaponInfo.HP; if (CurrentWeaponInfo.Range > 0) class(Weapon).default.SentryClass.default.EffectiveRange = CurrentWeaponInfo.Range; if (CurrentWeaponInfo.FireRate > 0) class(Weapon).default.SentryClass.default.FireRateTime = 1.0 / CurrentWeaponInfo.FireRate; continue; } else if(class(Weapon)!=None) { if (CurrentWeaponInfo.Damage > 0) class(Weapon).default.SentryClass.default.HitDamages = CurrentWeaponInfo.Damage; if (CurrentWeaponInfo.HP > 0) class(Weapon).default.SentryClass.default.TurretHealth = CurrentWeaponInfo.HP; if (CurrentWeaponInfo.Range > 0) class(Weapon).default.SentryClass.default.EffectiveRange = CurrentWeaponInfo.Range; if (CurrentWeaponInfo.FireRate > 0) class(Weapon).default.SentryClass.default.FireRateTime = 1.0 / CurrentWeaponInfo.FireRate; continue; } else if(class(Weapon)!=None) { if (CurrentWeaponInfo.Damage > 0) class(Weapon).default.SentryClass.default.HitDamages = CurrentWeaponInfo.Damage; if (CurrentWeaponInfo.HP > 0) class(Weapon).default.SentryClass.default.TurretHealth = CurrentWeaponInfo.HP; if (CurrentWeaponInfo.Range > 0) class(Weapon).default.SentryClass.default.EffectiveRange = CurrentWeaponInfo.Range; if (CurrentWeaponInfo.FireRate > 0) class(Weapon).default.SentryClass.default.FireRateTime = 1.0 / CurrentWeaponInfo.FireRate; continue; } else if(class(Weapon)!=None) { //log("Find!"); if (CurrentWeaponInfo.Damage > 0) class(Weapon).default.SentryClass.default.HitDamage = CurrentWeaponInfo.Damage; if (CurrentWeaponInfo.HP > 0) class(Weapon).default.SentryClass.default.SentryHealth = CurrentWeaponInfo.HP; if (CurrentWeaponInfo.Range > 0) class(Weapon).default.SentryClass.default.SightRadius = CurrentWeaponInfo.Range; if (CurrentWeaponInfo.FireRate > 0) class(Weapon).default.SentryClass.default.FireRateTime = 1.0 / CurrentWeaponInfo.FireRate; continue; } } if (CurrentWeaponInfo.FireRate > 0) Weapon.default.FireModeClass[0].default.FireRate = 1.0 / CurrentWeaponInfo.FireRate; if (CurrentWeaponInfo.AutoFire >= 1) Weapon.default.FireModeClass[0].default.bWaitForRelease = CurrentWeaponInfo.AutoFire != 1; if (CurrentWeaponInfo.WeaponType == 0) { MeleeFire = class(Weapon.default.FireModeClass[0]); if (CurrentWeaponInfo.Range > 0) class(Weapon).default.WeaponRange = CurrentWeaponInfo.Range; if (CurrentWeaponInfo.Range > 0) MeleeFire.default.WeaponRange = CurrentWeaponInfo.Range; if (CurrentWeaponInfo.Damage > 0) MeleeFire.default.MeleeDamage = CurrentWeaponInfo.Damage; continue; } if (CurrentWeaponInfo.MagCapacity > 0) Weapon.default.MagCapacity = CurrentWeaponInfo.MagCapacity; if (CurrentWeaponInfo.ReloadRate > 0) Weapon.default.ReloadRate = CurrentWeaponInfo.ReloadRate; if (CurrentWeaponInfo.Spread >= 0) Weapon.default.FireModeClass[0].default.Spread = CurrentWeaponInfo.Spread; if (CurrentWeaponInfo.WeaponType == 1) { PrjFire = class(Weapon.default.FireModeClass[0]); PrjFire.default.EffectiveRange = 5000; if (CurrentWeaponInfo.Projectiles > 0) PrjFire.default.ProjPerFire = CurrentWeaponInfo.Projectiles; if (CurrentWeaponInfo.RecoilX > 0) PrjFire.default.maxVerticalRecoilAngle = CurrentWeaponInfo.RecoilX; if (CurrentWeaponInfo.RecoilY > 0) PrjFire.default.maxHorizontalRecoilAngle = CurrentWeaponInfo.RecoilY; if (CurrentWeaponInfo.ProjectileSpeed > 0) PrjFire.default.ProjectileClass.default.Speed = CurrentWeaponInfo.ProjectileSpeed; if (CurrentWeaponInfo.ProjectileSpeed > 0) PrjFire.default.ProjectileClass.default.MaxSpeed = CurrentWeaponInfo.ProjectileSpeed; if (CurrentWeaponInfo.Damage > 0) PrjFire.default.ProjectileClass.default.Damage = CurrentWeaponInfo.Damage; if (CurrentWeaponInfo.DamageRadius > 0) PrjFire.default.ProjectileClass.default.DamageRadius = CurrentWeaponInfo.DamageRadius; } else if (CurrentWeaponInfo.WeaponType == 2) { InstantFire = class(Weapon.default.FireModeClass[0]); if (CurrentWeaponInfo.RecoilX > 0) InstantFire.default.maxVerticalRecoilAngle = CurrentWeaponInfo.RecoilX; if (CurrentWeaponInfo.RecoilY > 0) InstantFire.default.maxHorizontalRecoilAngle = CurrentWeaponInfo.RecoilY; if (CurrentWeaponInfo.Damage > 0) InstantFire.default.DamageMin = CurrentWeaponInfo.Damage; if (CurrentWeaponInfo.Damage > 0) InstantFire.default.DamageMax = CurrentWeaponInfo.Damage; } } }