From f4632d58014dce0edc2d447dc934bae9cf957439 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Fri, 3 Jun 2016 08:47:13 -0400 Subject: coolarray, particles are good now --- src/entities.cpp | 4 ++-- src/world.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/entities.cpp b/src/entities.cpp index 2d9de76..f59b462 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -133,10 +133,10 @@ void Entity::die(void) alive = false; health = 0; - if (xmle) { + /*if (xmle) { xmle->SetAttribute("alive", false); currentXMLDoc.SaveFile(currentXML.c_str(), false); - } + }*/ } bool Entity::isAlive(void) const diff --git a/src/world.cpp b/src/world.cpp index 5ab20ed..b096180 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -718,7 +718,7 @@ void World::draw(Player *p) std::vector partVec(pss); GLfloat *pIndex = &partVec[0]; - + for (const auto &p : particles) { pc += 30; if (pc > pss) { @@ -1487,14 +1487,14 @@ addObject(std::string in, std::string p, float x, float y) void World:: addParticle(float x, float y, float w, float h, float vx, float vy, Color color, int d) { - particles.emplace_back(x, y, w, h, vx, vy, color, d); + particles.push_back(Particles(x, y, w, h, vx, vy, color, d)); particles.back().canMove = true; } void World:: addParticle(float x, float y, float w, float h, float vx, float vy, Color color, int d, unsigned char flags) { - particles.emplace_back(x, y, w, h, vx, vy, color, d); + particles.push_back(Particles(x, y, w, h, vx, vy, color, d)); particles.back().canMove = true; particles.back().gravity = flags & (1 << 0); particles.back().bounce = flags & (1 << 1); -- cgit v1.2.3