[Opentnl-cvs] tnl/zap projectile.cpp,1.3,1.4 projectile.h,1.1,1.2
Brought to you by:
mark_frohnmayer,
s_alanet
From: Ben G. <s_a...@us...> - 2004-04-20 21:54:00
|
Update of /cvsroot/opentnl/tnl/zap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2244/zap Modified Files: projectile.cpp projectile.h Log Message: Updated docs. Fixed projectile issues. Index: projectile.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/projectile.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** projectile.cpp 20 Apr 2004 19:25:48 -0000 1.3 --- projectile.cpp 20 Apr 2004 21:53:35 -0000 1.4 *************** *** 45,48 **** --- 45,49 ---- liveTime = t; collided = false; + alive = true; mShooter = shooter; } *************** *** 105,108 **** --- 106,110 ---- hitObject->damageObject(&theInfo); } + liveTime = 0; *************** *** 162,166 **** { process(deltaT); ! if(liveTime) { if(liveTime <= deltaT) --- 164,168 ---- { process(deltaT); ! if(alive) { if(liveTime <= deltaT) *************** *** 168,171 **** --- 170,174 ---- getGame()->deleteObject(this, 500); liveTime = 0; + alive = false; } else *************** *** 178,181 **** --- 181,195 ---- process(deltaT); liveTime += deltaT; + /* if(alive) + { + if(liveTime <= deltaT) + { + getGame()->deleteObject(this, 500); + liveTime = 0; + alive = false; + } + else + liveTime -= deltaT; + } */ } Index: projectile.h =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/projectile.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** projectile.h 20 Apr 2004 04:27:20 -0000 1.1 --- projectile.h 20 Apr 2004 21:53:37 -0000 1.2 *************** *** 42,45 **** --- 42,46 ---- U32 liveTime; bool collided; + bool alive; SafePtr<Ship> mShooter; |