Removing dead commented out code
parent
caf813754c
commit
064c80d800
12
src/Beam.cpp
12
src/Beam.cpp
|
@ -265,17 +265,7 @@ void Beam::StaticUpdate(const float timeStep)
|
|||
}
|
||||
}
|
||||
}
|
||||
// for (unsigned int i=0; i<laserBeams.size(); i++) {
|
||||
// CollisionContact c;
|
||||
// laserBeams[i].frame->GetCollisionSpace()->TraceRay(
|
||||
// laserBeams[i].pos, laserBeams[i].dir,
|
||||
// (float)laserBeams[i].length, &c,
|
||||
// laserBeams[i].firer->GetGeom());
|
||||
// if (c.userData1) {
|
||||
// Body *hit = static_cast<Body*>(c.userData1);
|
||||
// hit->OnDamage(laserBeams[i].firer, laserBeams[i].damage);
|
||||
// }
|
||||
// }
|
||||
|
||||
if (m_mining) {
|
||||
// need to test for terrain hit
|
||||
if (GetFrame()->GetBody() && GetFrame()->GetBody()->IsType(Object::PLANET)) {
|
||||
|
|
45
src/Beam.h
45
src/Beam.h
|
@ -61,51 +61,6 @@ private:
|
|||
static std::unique_ptr<Graphics::Material> s_sideMat;
|
||||
static std::unique_ptr<Graphics::Material> s_glowMat;
|
||||
static Graphics::RenderState *s_renderState;
|
||||
|
||||
/*
|
||||
|
||||
Space::AddLaserBeam(GetFrame(), pos, dir, 10000.0, this, damage);
|
||||
|
||||
|
||||
// Assumed to be at model coords
|
||||
void Ship::RenderLaserfire()
|
||||
{
|
||||
static const GLfloat fogDensity = 0.001;
|
||||
static const GLfloat fogColor[4] = { 0,0,0,1.0 };
|
||||
const ShipType &stype = GetShipType();
|
||||
glDisable(GL_LIGHTING);
|
||||
glEnable(GL_FOG);
|
||||
glFogi(GL_FOG_MODE, GL_EXP2);
|
||||
glFogfv(GL_FOG_COLOR, fogColor);
|
||||
glFogf(GL_FOG_DENSITY, fogDensity);
|
||||
glHint(GL_FOG_HINT, GL_NICEST);
|
||||
|
||||
for (int i=0; i<ShipType::GUNMOUNT_MAX; i++) {
|
||||
if (!m_gunState[i]) continue;
|
||||
glPushAttrib(GL_CURRENT_BIT | GL_LINE_BIT);
|
||||
switch (m_equipment.Get(Equip::SLOT_LASER, i)) {
|
||||
case Equip::LASER_2MW_BEAM:
|
||||
glColor3f(1,.5,0); break;
|
||||
case Equip::LASER_4MW_BEAM:
|
||||
glColor3f(1,1,0); break;
|
||||
default:
|
||||
case Equip::LASER_1MW_BEAM:
|
||||
glColor3f(1,0,0); break;
|
||||
}
|
||||
glLineWidth(2.0f);
|
||||
glBegin(GL_LINES);
|
||||
vector3f pos = stype.gunMount[i].pos;
|
||||
glVertex3f(pos.x, pos.y, pos.z);
|
||||
glVertex3fv(&((10000)*stype.gunMount[i].dir)[0]);
|
||||
glEnd();
|
||||
glPopAttrib();
|
||||
}
|
||||
glDisable(GL_FOG);
|
||||
glEnable(GL_LIGHTING);
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
};
|
||||
|
||||
#endif /* _BEAM_H */
|
||||
|
|
Loading…
Reference in New Issue