summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/game.hpp2
-rw-r--r--src/game/interface.cpp16
-rw-r--r--src/game/units.cpp5
3 files changed, 15 insertions, 8 deletions
diff --git a/src/game/game.hpp b/src/game/game.hpp
index aea381c..75ac555 100644
--- a/src/game/game.hpp
+++ b/src/game/game.hpp
@@ -109,7 +109,7 @@ namespace game {
void place(world::world_t *world);
void place(world::world_t *world, v2f_t x_);
- bool ignore_waking = false;
+ bool ignore_waking = true; // Most entities won't need this mechanism.
bool awake = false;
double wake_time = -INFINITY;
void wake(void);
diff --git a/src/game/interface.cpp b/src/game/interface.cpp
index f4403ea..d125392 100644
--- a/src/game/interface.cpp
+++ b/src/game/interface.cpp
@@ -180,14 +180,18 @@ void state_t::render_to(render::state_t *render)
x[1] += em;
}
- x = v2f_t(0.0f, h - em * 1.5);
- ss << "World S/T/E: ";
+ x = v2f_t(0.0f, h - em * 4.5);
+ ss << "World S/T:";
ss << game->world.stats.sectors << "/";
- ss << game->world.stats.tiles << "/";
- ss << game->world.stats.entities;
+ ss << game->world.stats.tiles;
render->render_text(x, em, ss.str(), render::ALIGN_LEFT_TOP, sf::Color::White);
- x[1] -= em;
+ x[1] += em;
+ ss.str(std::string());
+ ss << "Awake: " << game->awake_entities.size() << "/" << game->world.stats.entities;
+ render->render_text(x, em, ss.str(), render::ALIGN_LEFT_TOP, sf::Color::White);
+
+ x[1] += em;
ss.str(std::string());
ss << "View S/T/E: ";
ss << render->stats.sectors << "/";
@@ -203,7 +207,7 @@ void state_t::render_to(render::state_t *render)
fps += perf_hist[i];
fps /= count(perf_hist);
- x[1] -= em;
+ x[1] += em;
ss.str(std::string());
ss << std::fixed << std::setprecision(1);
ss << "FPS: " << fps;
diff --git a/src/game/units.cpp b/src/game/units.cpp
index 24b9567..ef7fc6f 100644
--- a/src/game/units.cpp
+++ b/src/game/units.cpp
@@ -277,7 +277,6 @@ unit_soldier_t::unit_soldier_t(game::state_t *game) : unit_t(game, UNIT_SOLDIER)
name = text::get(text::UNIT_NAME_SOLDIER);
- ignore_waking = true; // Always awake.
wake();
friendly = true;
controllable = true;
@@ -484,6 +483,8 @@ unit_spider_t::unit_spider_t(game::state_t *game) : unit_t(game, UNIT_SPIDER)
name = text::get(text::UNIT_NAME_SPIDER);
+ ignore_waking = false;
+
health = max_health = 4;
cs.armor_class = 15;
cs.hit_die = die_t(3, 6);
@@ -564,6 +565,8 @@ unit_nest_t::unit_nest_t(game::state_t *game_) : unit_t(game_, UNIT_NEST)
name = text::get(text::UNIT_NAME_NEST);
+ ignore_waking = false;
+
health = max_health = 45;
cs.armor_class = 5;