mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
@@ -106,10 +106,6 @@ Particle::Particle(
|
||||
updateVertices();
|
||||
}
|
||||
|
||||
Particle::~Particle()
|
||||
{
|
||||
}
|
||||
|
||||
void Particle::OnRegisterSceneNode()
|
||||
{
|
||||
if (IsVisible)
|
||||
@@ -227,17 +223,16 @@ void Particle::updateVertices()
|
||||
0, 0, 0, 0, m_color, tx0, ty0);
|
||||
|
||||
v3s16 camera_offset = m_env->getCameraOffset();
|
||||
for(u16 i=0; i<4; i++)
|
||||
{
|
||||
for (video::S3DVertex &vertex : m_vertices) {
|
||||
if (m_vertical) {
|
||||
v3f ppos = m_player->getPosition()/BS;
|
||||
m_vertices[i].Pos.rotateXZBy(atan2(ppos.Z-m_pos.Z, ppos.X-m_pos.X)/core::DEGTORAD+90);
|
||||
vertex.Pos.rotateXZBy(atan2(ppos.Z-m_pos.Z, ppos.X-m_pos.X)/core::DEGTORAD+90);
|
||||
} else {
|
||||
m_vertices[i].Pos.rotateYZBy(m_player->getPitch());
|
||||
m_vertices[i].Pos.rotateXZBy(m_player->getYaw());
|
||||
vertex.Pos.rotateYZBy(m_player->getPitch());
|
||||
vertex.Pos.rotateXZBy(m_player->getYaw());
|
||||
}
|
||||
m_box.addInternalPoint(m_vertices[i].Pos);
|
||||
m_vertices[i].Pos += m_pos*BS - intToFloat(camera_offset, BS);
|
||||
m_box.addInternalPoint(vertex.Pos);
|
||||
vertex.Pos += m_pos*BS - intToFloat(camera_offset, BS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -285,8 +280,6 @@ ParticleSpawner::ParticleSpawner(IGameDef *gamedef, LocalPlayer *player,
|
||||
}
|
||||
}
|
||||
|
||||
ParticleSpawner::~ParticleSpawner() {}
|
||||
|
||||
void ParticleSpawner::step(float dtime, ClientEnvironment* env)
|
||||
{
|
||||
m_time += dtime;
|
||||
|
Reference in New Issue
Block a user