@@ -50,6 +50,7 @@ public void Launch()
50
50
Trailer . Rate = TrailRate ;
51
51
Trailer . enabled = true ;
52
52
53
+ // Set launched
53
54
Launched = Time . realtimeSinceStartup ;
54
55
IsLaunched = true ;
55
56
}
@@ -73,7 +74,7 @@ public void FixedUpdate()
73
74
EffectManager . sendEffect ( ExplosionEffectID , EffectManager . INSANE , transform . position ) ;
74
75
EffectManager . sendEffect ( 123 , EffectManager . INSANE , transform . position ) ;
75
76
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 ,
77
78
ExplosionDamage , ExplosionDamage , ExplosionDamage , ExplosionDamage , ExplosionDamage , ExplosionDamage , ExplosionDamage ,
78
79
ExplosionDamage , out _ ) ;
79
80
AlertTool . alert ( transform . position , 200f ) ;
@@ -93,7 +94,6 @@ private IEnumerator DoExplosionEffects(float timeToComplete = 0.2f, bool destroy
93
94
{
94
95
if ( ExplosionEffects . Count == 0 )
95
96
{
96
- System . Console . WriteLine ( "No Effects to run" ) ;
97
97
yield break ;
98
98
}
99
99
@@ -119,7 +119,6 @@ private IEnumerator DoExplosionEffects(float timeToComplete = 0.2f, bool destroy
119
119
var position = transform . position + ( Random . insideUnitSphere * ExplosionRadius ) ;
120
120
121
121
effects . Add ( ( position , randomEffect ) ) ;
122
- System . Console . WriteLine ( $ "Scheduled effect at { position } : { randomEffect } ") ;
123
122
}
124
123
125
124
// 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
142
141
}
143
142
yield return new WaitForSeconds ( effectDelay ) ;
144
143
}
144
+
145
+ // If set, destroy the object once the coroutine is finished
145
146
if ( destroyPost )
146
147
{
147
148
Destroy ( Trailer ) ;
148
149
Destroy ( this ) ;
149
150
}
150
- System . Console . WriteLine ( "done" ) ;
151
151
}
152
152
}
153
153
}
0 commit comments