shithub: choc

Download patch

ref: 6afda3400f46f67ef49510e13f9a206242503981
parent: aa5529bc6cbd5424c33f624d8a33fc482d18c489
author: James Haley <haleyjd@hotmail.com>
date: Fri Sep 24 02:46:59 EDT 2010

Started work on P_UseSpecialLine cuz I was bored.

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

--- a/src/strife/p_switch.c
+++ b/src/strife/p_switch.c
@@ -453,6 +453,8 @@
 //
 boolean P_UseSpecialLine(mobj_t* thing, line_t* line, int side)
 {
+    static char usemessage[92]; // [STRIFE]
+
     // Err...
     // Use the back sides of VERY SPECIAL lines...
     if (side)
@@ -464,10 +466,8 @@
 
         default:
             return false;
-            break;
         }
     }
-
     
     // Switches that other things can activate.
     if (!thing->player)
@@ -528,9 +528,11 @@
         break;
 
     case 11:
-        // Exit level
-        P_ChangeSwitchTexture(line,0);
-        G_ExitLevel (0);
+        // Exit level - [STRIFE] Modified to take tag, etc.
+        P_ChangeSwitchTexture(line, 1);
+        if(levelTimer && levelTimeCount)
+            break;
+        G_ExitLevel(line->tag);
         break;
 
     case 14:
@@ -888,16 +890,30 @@
 
         P_ChangeSwitchTexture(line, 1);
 
-        GiveVoiceObjective("VOC70", "LOG70", -1);
-        thing->player->message = DEH_String("Incoming Message from BlackBird...");
+        GiveVoiceObjective("voc70", "log70", 0);
+        // haleyjd: Strife used sprintf here, not a direct set.
+        DEH_snprintf(usemessage, sizeof(usemessage), 
+                     "Incoming Message from BlackBird...");
+        thing->player->message = usemessage;
 
         break;
 
+    case 234:
+        // haleyjd 09/24/10: [STRIFE] SR Raise Door if Quest 3
+        if(!(thing->player->questflags & QF_QUEST3)) // STRIFE-TODO: identify quest 3
+        {
+            DEH_snprintf(usemessage, sizeof(usemessage), 
+                         "That doesn't seem to work!");
+            thing->player->message = usemessage;
+        }
+        else if(EV_DoDoor(line, normal))
+            P_ChangeSwitchTexture(line, 1);
+        break;
+
     case 666:
         // villsa [STRIFE] Move wall
         P_MoveWall(line, thing);
         break;
-
     }
 
     return true;