]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/c_forest.cpp
Switched the hybrid contrib files to an updated version for configscript. Thank you...
[irc/gameservirc.git] / gameserv / c_forest.cpp
index 87e20d03db09dbe647d13322d45e4a5ee48d1bab..e58effaf9e5a2d2c0d05a1f5f302ffba90a5fc72 100644 (file)
@@ -37,11 +37,16 @@ void do_forest(char *u)
 
     int num = rand() % 12;
 
-    source = find(u);
 
-    if (!is_playing(u))
+    if (!(source = find(u)) || !source->stats)
     {
         notice(s_GameServ, u, "You must be playing the game to search the forest!");
+       return;
+    }
+    else if (!is_alive(source))
+    {
+       notice(s_GameServ, u, "You are dead. Wait until tomorrow to search the forest some more.");
+       return;
     }
     else 
     {
@@ -51,7 +56,7 @@ void do_forest(char *u)
                 "till tomorrow!");
             return;
         }
-        else if (isnt_fighting(u))
+        else if (!is_fighting(u))
         {
             Player *p = source->stats;
             p->forest_fights--;