Deaths should be counted to Player::deaths parameter. Kills not counted yet.
authorsaiam
Mon, 08 Dec 2008 20:33:40 +0000
changeset 307 5b4806c61342
parent 306 4e774439e2c6
child 308 60f4b55d5713
Deaths should be counted to Player::deaths parameter. Kills not counted yet.
src/Player.cc
--- a/src/Player.cc	Mon Dec 08 20:31:55 2008 +0000
+++ b/src/Player.cc	Mon Dec 08 20:33:40 2008 +0000
@@ -28,7 +28,9 @@
     rope(*this),
     health(PLAYER_HEALTH),
     respawn_timer(PLAYER_RESPAWN_DELAY),
-    animation_step(0)
+    animation_step(0),
+    kills(0),
+    deaths(0)
 {
     // XXX: populate weapons from somewhere else
 
@@ -69,6 +71,9 @@
 }
 
 void Player::die (bool start_timer) {
+
+    deaths++; // Increment death counter
+
     // we don't have a rope anymore
     rope.release();