From 04369f067b8ab5b674a55467cc4dad98a9359273 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Tue, 17 May 2016 08:44:01 -0400 Subject: better mob combat stuff --- src/entities.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/entities.cpp') diff --git a/src/entities.cpp b/src/entities.cpp index ff8dd5d..c3c580c 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -117,7 +117,7 @@ void Entity::spawn(float x, float y) // generate a name name = new char[32]; if (type == MOBT) - name[0] = '\0'; + strncpy(name, "mob", 3); else randGetomName(this); @@ -127,7 +127,6 @@ void Entity::spawn(float x, float y) void Entity::takeHit(unsigned int _health, unsigned int cooldown) { if (hitCooldown <= 1) { - std::cout << "Taking hit " << std::endl; // modify variables health = fmax(health - _health, 0); forcedMove = true; -- cgit v1.2.3