shithub: choc

Download patch

ref: 04a3bc8c48b80f979de8f4983eaa7093ca9fa11e
parent: 687ff30bcc7ae07e8dcc7928598aa0ea268201bd
author: Samuel Villareal <[email protected]>
date: Sat Sep 18 01:09:21 EDT 2010

+ healthamounts array added

Subversion-branch: /branches/strife-branch
Subversion-revision: 2105

--- a/src/strife/p_dialog.c
+++ b/src/strife/p_dialog.c
@@ -112,6 +112,9 @@
 // Item to display to player when picked up or recieved
 char pickupstring[46];
 
+// Health based on gameskill given by the front's medic
+static const int healthamounts[] = { -100 , -75, -50, -50, -100 };
+
 //=============================================================================
 //
 // Dialog State Sets
@@ -740,9 +743,8 @@
 
     // health refill (at front HQ)
     case MT_TOKEN_HEALTH:
-        // [STRIFE] TODO - add healthamounts array
-        //if(!P_GiveBody(player, healthamounts[gameskill]))
-        //    return false;
+        if(!P_GiveBody(player, healthamounts[gameskill]))
+            return false;
         break;
 
     // alarm
@@ -1212,7 +1214,7 @@
         {
             sprintf(mission_objective, "log%i", objective);
             objlump = W_CacheLumpName(mission_objective, PU_CACHE);
-            strncpy(mission_objective, objlump, 300);
+            strncpy(mission_objective, objlump, OBJECTIVE_LEN);
         }
         dialogplayer->message = message;
     }