public override void Draw() { int num = MySandboxGame.TotalGamePlayTimeInMilliseconds - this.m_rifleGun.LastTimeShoot; MyGunBase gunBase = this.m_rifleGun.GunBase; if (gunBase.UseDefaultMuzzleFlash && (num <= gunBase.MuzzleFlashLifeSpan)) { GenerateMuzzleFlash(gunBase.GetMuzzleWorldPosition(), (Vector3)gunBase.GetMuzzleWorldMatrix().Forward, 0.1f, 0.3f); } }
public override void Draw() { // Draw muzzle flash int deltaTime = MySandboxGame.TotalGamePlayTimeInMilliseconds - m_rifleGun.LastTimeShoot; MyGunBase rifleBase = m_rifleGun.GunBase; if (deltaTime <= rifleBase.MuzzleFlashLifeSpan) { MyParticleEffects.GenerateMuzzleFlashLocal(this.Entity, rifleBase.GetMuzzleLocalPosition(), Vector3.Forward, 0.2f, 0.3f); } }
public override void Draw() { // Draw muzzle flash int deltaTime = MySandboxGame.TotalGamePlayTimeInMilliseconds - m_rifleGun.LastTimeShoot; MyGunBase rifleBase = m_rifleGun.GunBase; if (rifleBase.UseDefaultMuzzleFlash && deltaTime <= rifleBase.MuzzleFlashLifeSpan) { MyParticleEffects.GenerateMuzzleFlash(rifleBase.GetMuzzleWorldPosition(), rifleBase.GetMuzzleWorldMatrix().Forward, 0.1f, 0.3f); } }
private void PredictTargetPosition(ref Vector3 transformedRelativeTarget, MyCharacter bot) { if (bot != null && bot.CurrentWeapon != null) { MyGunBase gun = bot.CurrentWeapon.GunBase as MyGunBase; if (gun != null) { float time; MyWeaponPrediction.GetPredictedTargetPosition(gun, bot, m_aimTarget, out transformedRelativeTarget, out time, VRage.Game.MyEngineConstants.UPDATE_STEP_SIZE_IN_SECONDS * MyBehaviorTreeCollection.UPDATE_COUNTER); } } }
private void PredictTargetPosition(ref Vector3 transformedRelativeTarget, MyCharacter bot) { if ((bot != null) && (bot.CurrentWeapon != null)) { MyGunBase gunBase = bot.CurrentWeapon.GunBase as MyGunBase; if (gunBase != null) { float num; MyWeaponPrediction.GetPredictedTargetPosition(gunBase, bot, this.m_aimTarget, out transformedRelativeTarget, out num, 0.1666667f); } } }
public override void Draw() { // Draw muzzle flash int deltaTime = MySandboxGame.TotalGamePlayTimeInMilliseconds - m_rifleGun.LastTimeShoot; MyGunBase rifleBase = m_rifleGun.GunBase; if (deltaTime <= rifleBase.MuzzleFlashLifeSpan) { if (MySandboxGame.Config.GraphicsRenderer == MySandboxGame.DirectX9RendererKey) { MyParticleEffects.GenerateMuzzleFlashLocal(Container.Entity, rifleBase.GetMuzzleLocalPosition(), Vector3.Forward, 0.1f, 0.3f); } else { MyParticleEffects.GenerateMuzzleFlash(rifleBase.GetMuzzleWorldPosition(), rifleBase.GetMuzzleWorldMatrix().Forward, 0.1f, 0.3f); } } }
public virtual void Init(MyEntity entity, MyLargeTurretBase turretBase) { m_entity = entity; m_turretBase = turretBase; m_gunBase = turretBase.GunBase as MyGunBase; // Check for the dummy cubes for the muzzle flash positions: if (m_entity.Model != null) { if (m_entity.Model.Dummies.ContainsKey("camera")) { CameraDummy = m_entity.Model.Dummies["camera"]; } m_gunBase.LoadDummies(m_entity.Model.Dummies); } m_entity.OnClose += m_entity_OnClose; }