@@ -50,6 +50,7 @@ public void Launch()
5050 Trailer . Rate = TrailRate ;
5151 Trailer . enabled = true ;
5252
53+ // Set launched
5354 Launched = Time . realtimeSinceStartup ;
5455 IsLaunched = true ;
5556 }
@@ -73,7 +74,7 @@ public void FixedUpdate()
7374 EffectManager . sendEffect ( ExplosionEffectID , EffectManager . INSANE , transform . position ) ;
7475 EffectManager . sendEffect ( 123 , EffectManager . INSANE , transform . position ) ;
7576 StartCoroutine ( DoExplosionEffects ( ) ) ;
76- DamageTool . explode ( transform . position , ExplosionRadius , EDeathCause . GRENADE , Player . channel . owner . playerID . steamID ,
77+ DamageTool . explode ( transform . position , ExplosionRadius , EDeathCause . MISSILE , Player . channel . owner . playerID . steamID ,
7778 ExplosionDamage , ExplosionDamage , ExplosionDamage , ExplosionDamage , ExplosionDamage , ExplosionDamage , ExplosionDamage ,
7879 ExplosionDamage , out _ ) ;
7980 AlertTool . alert ( transform . position , 200f ) ;
@@ -93,7 +94,6 @@ private IEnumerator DoExplosionEffects(float timeToComplete = 0.2f, bool destroy
9394 {
9495 if ( ExplosionEffects . Count == 0 )
9596 {
96- System . Console . WriteLine ( "No Effects to run" ) ;
9797 yield break ;
9898 }
9999
@@ -119,7 +119,6 @@ private IEnumerator DoExplosionEffects(float timeToComplete = 0.2f, bool destroy
119119 var position = transform . position + ( Random . insideUnitSphere * ExplosionRadius ) ;
120120
121121 effects . Add ( ( position , randomEffect ) ) ;
122- System . Console . WriteLine ( $ "Scheduled effect at { position } : { randomEffect } ") ;
123122 }
124123
125124 // Order effects inside to out of the sphere to simulate an outward explosion
@@ -142,12 +141,13 @@ private IEnumerator DoExplosionEffects(float timeToComplete = 0.2f, bool destroy
142141 }
143142 yield return new WaitForSeconds ( effectDelay ) ;
144143 }
144+
145+ // If set, destroy the object once the coroutine is finished
145146 if ( destroyPost )
146147 {
147148 Destroy ( Trailer ) ;
148149 Destroy ( this ) ;
149150 }
150- System . Console . WriteLine ( "done" ) ;
151151 }
152152 }
153153}
0 commit comments