From 2567f7aa1d5a1def97cd3311793322b97cd32393 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Fri, 18 Jul 2008 15:24:02 +0100 Subject: [PATCH] Nicer exhaust effect --- src/Emitter.cpp | 5 ++++- src/Ship.cpp | 9 +++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Emitter.cpp b/src/Emitter.cpp index 0390acb..e67e261 100644 --- a/src/Emitter.cpp +++ b/src/Emitter.cpp @@ -195,7 +195,10 @@ void Emitter::NewParticle(int index) * Smoke trail constructor. Sets special Emitter constants. */ SmokeTrail::SmokeTrail() - : Emitter(0, 0, 0.9f, 0.9f, 0.0f, false, 0.2f, 0.0f, 0.5f, 0.5f, 20.0f, 2.0f, 2.0f) + : Emitter(0, 0, 0.9f, 0.9f, 0.0f, + false, 0.2f, + 0.0f, 0.1f, + 0.3f, 20.0f, 4.0f, 2.0f) { } diff --git a/src/Ship.cpp b/src/Ship.cpp index da56f8e..aae04cc 100644 --- a/src/Ship.cpp +++ b/src/Ship.cpp @@ -106,8 +106,13 @@ void Ship::Move() - (shipImage.GetWidth()/2)*(double)sin(angle*(PI/180)); exhaust.ypos = ypos + shipImage.GetHeight()/2 + (shipImage.GetHeight()/2)*(double)cos(angle*(PI/180)); - exhaust.yg = speedY; //+ (flGravity * 10); - exhaust.xg = speedX; + //exhaust.yg = speedY; //+ (flGravity * 10); + //exhaust.xg = speedX; + + const float SCALE = 10.0f; + exhaust.yg = SCALE * sin(angle); + exhaust.xg = SCALE * cos(angle); + explosion.xpos = xpos + shipImage.GetWidth()/2; explosion.ypos = ypos + shipImage.GetHeight()/2; } -- 2.39.2