cinvoke-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cinvoke-svn] r127 - trunk/skorpion


From: will
Subject: [cinvoke-svn] r127 - trunk/skorpion
Date: 18 Nov 2006 02:36:17 -0500

Author: vmy
Date: 2006-11-18 02:36:13 -0500 (Sat, 18 Nov 2006)
New Revision: 127

Modified:
   trunk/skorpion/ParticleSystem.cs
   trunk/skorpion/skorpion.cs
Log:
three thrusters in correct locations relative to ship

Modified: trunk/skorpion/ParticleSystem.cs
===================================================================
--- trunk/skorpion/ParticleSystem.cs    2006-11-18 07:26:07 UTC (rev 126)
+++ trunk/skorpion/ParticleSystem.cs    2006-11-18 07:36:13 UTC (rev 127)
@@ -282,7 +282,7 @@
 
                                                // remove particles... or if 
they are a spark that has faded
                                                //if (p.positionVector.Y + 100 
< _radius || p.isSpark && p.fadeProgression <= 0.0f)
-                                               if(fT > .3f  || p.isSpark && 
p.fadeProgression <= 0.0f)
+                                               if(fT > .03f  || p.isSpark && 
p.fadeProgression <= 0.0f)
                                                {
                                                        // Kill particle
                                                        _freeParticles.Add(p);

Modified: trunk/skorpion/skorpion.cs
===================================================================
--- trunk/skorpion/skorpion.cs  2006-11-18 07:26:07 UTC (rev 126)
+++ trunk/skorpion/skorpion.cs  2006-11-18 07:36:13 UTC (rev 127)
@@ -498,15 +498,15 @@
                        Vector3 right = Vector3.Cross(ort, up);
                        right.Normalize();
 
-                       Vector3 v2 = s.Position + (s.Orientation * -5.5f) + 
(s.UpDirection * 10.5f);
-                       Vector3 v = new Vector3(s.Orientation.X, 
s.Orientation.Y, s.Orientation.Z);
+                       Vector3 position = s.Position + (s.Orientation * -5.5f) 
+ (s.UpDirection * 10.5f);
+                       Vector3 orientation = new Vector3(s.Orientation.X, 
s.Orientation.Y, s.Orientation.Z);
                                                
-                       v.Scale(100);
+                       orientation.Scale(100);
                                                
                        iThrusterParticleSystem.Update(.03F,
                                g_clrColor[(int)iThrusterParticleColor],
                                g_clrColorFade[(int)iThrusterParticleColor],
-                               v2, v);
+                               position, orientation);
                        iDevice.RenderState.ZBufferWriteEnable = false;
                        iDevice.RenderState.AlphaBlendEnable = true;
                        iDevice.RenderState.SourceBlend = Blend.One;
@@ -515,6 +515,39 @@
                        iThrusterParticleSystem.Render(iDevice);
                        iDevice.RenderState.ZBufferWriteEnable = true;
                        iDevice.RenderState.AlphaBlendEnable = false;
+
+                       position = s.Position + (s.Orientation * -5.5f) + 
(s.UpDirection * -8f)
+                               + (right * 11);
+                                               
+                       iThrusterParticleSystem.Update(.03F,
+                               g_clrColor[(int)iThrusterParticleColor],
+                               g_clrColorFade[(int)iThrusterParticleColor],
+                               position, orientation);
+                       iDevice.RenderState.ZBufferWriteEnable = false;
+                       iDevice.RenderState.AlphaBlendEnable = true;
+                       iDevice.RenderState.SourceBlend = Blend.One;
+                       iDevice.RenderState.DestinationBlend = Blend.One;
+                       iDevice.SetTexture(0, iThrusterParticleTexture);
+                       iThrusterParticleSystem.Render(iDevice);
+                       iDevice.RenderState.ZBufferWriteEnable = true;
+                       iDevice.RenderState.AlphaBlendEnable = false;
+
+                       position = s.Position + (s.Orientation * -5.5f) + 
(s.UpDirection * -8f)
+                               + (right * -11);
+                                               
+                       iThrusterParticleSystem.Update(.03F,
+                               g_clrColor[(int)iThrusterParticleColor],
+                               g_clrColorFade[(int)iThrusterParticleColor],
+                               position, orientation);
+                       iDevice.RenderState.ZBufferWriteEnable = false;
+                       iDevice.RenderState.AlphaBlendEnable = true;
+                       iDevice.RenderState.SourceBlend = Blend.One;
+                       iDevice.RenderState.DestinationBlend = Blend.One;
+                       iDevice.SetTexture(0, iThrusterParticleTexture);
+                       iThrusterParticleSystem.Render(iDevice);
+                       iDevice.RenderState.ZBufferWriteEnable = true;
+                       iDevice.RenderState.AlphaBlendEnable = false;
+
                }
 
                public void Render()





reply via email to

[Prev in Thread] Current Thread [Next in Thread]