src/Player.hh
changeset 300 417183866f35
parent 296 4d3ebaa29430
child 302 e734d8e9bbb5
--- a/src/Player.hh	Mon Dec 08 17:39:01 2008 +0000
+++ b/src/Player.hh	Mon Dec 08 18:12:43 2008 +0000
@@ -40,6 +40,10 @@
     /** Our current health */
     Health health;
 
+    /** Our respawn-timer */
+    Timer respawn_timer;
+    CL_Slot respawn_slot;
+
     // XXX: hmm... updated where?
     int animation_step;
 
@@ -57,6 +61,21 @@
      * Remove player from state players list
      */
     ~Player (void);
+    
+    /**
+     * Move the worm to the given position, removeGround to dig a hole there, and enable ourselves
+     */
+    virtual void spawn (Vector position);
+
+    /**
+     * We die. Disable and prepare respawn_timer
+     */
+    virtual void die (void);
+
+    /**
+     * Calculate a new position for the worm, and respawn there. Also set health back to 100%
+     */
+    void respawn (TimeMS dt);
 
     /**
      *  Used by the network code to execute various actions