Permalink
Browse files

Improve the particle display for lasers.

  • Loading branch information...
thebracket committed Jun 2, 2017
1 parent 853ed8e commit 82c7c89209614f2d5e26e38e62b4cd351d606e3c
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/planet/builder/regions/buildings.cpp
  2. +1 −1 src/systems/gui/particle_system.cpp
@@ -59,7 +59,7 @@ void add_building(std::string tag, const int x, const int y, const int z, const
} else if (tag == "ship_defense_turret") {
std::cout << "Turret created\n";
new_building->assign(viewshed_t{8, false});
new_building->assign(turret_t{8, 0, 1, 8, 0, civ_owner});
new_building->assign(turret_t{8, 2, 3, 8, 3, civ_owner});
new_building->assign(initiative_t{});
}
}
@@ -28,7 +28,7 @@ void particle_system::update(const double ms) {
switch (msg.type) {
case PARTICLE_SMOKE : particles.push_back(particle_t{ msg.x, msg.y, msg.z, rltk::vchar{ 176, rltk::colors::GREY, rltk::colors::BLACK }, 1, 20 }); break;
case PARTICLE_MIASMA : particles.push_back(particle_t{ msg.x, msg.y, msg.z, rltk::vchar{ 176, rltk::colors::GREEN, rltk::colors::BLACK }, 2, 20 }); break;
case PARTICLE_PROJECTILE : particles.push_back(particle_t{ msg.x, msg.y, msg.z, rltk::vchar{ '*', rltk::colors::GREY, rltk::colors::BLACK }, 3, msg.dx, msg.dy, msg.dz }); break;
case PARTICLE_PROJECTILE : particles.push_back(particle_t{ msg.x, msg.y, msg.z, rltk::vchar{ '*', rltk::colors::YELLOW, rltk::colors::BLACK }, 3, msg.dx, msg.dy, msg.dz }); break;
case PARTICLE_BOOM_FUSE : particles.push_back(particle_t{ msg.x, msg.y, msg.z, rltk::vchar{ '!', rltk::colors::RED, rltk::colors::BLACK }, 4, 20}); break;
case PARTICLE_BOOM : particles.push_back(particle_t{ msg.x, msg.y, msg.z, rltk::vchar{ 176, rltk::lerp(rltk::colors::RED, rltk::colors::YELLOW, (float)rng.roll_dice(1,100)/100.0f), rltk::colors::BLACK}, 5, 20}); break;
}

0 comments on commit 82c7c89

Please sign in to comment.