From 6afda3400f46f67ef49510e13f9a206242503981 Mon Sep 17 00:00:00 2001 From: James Haley Date: Fri, 24 Sep 2010 06:46:59 +0000 Subject: Started work on P_UseSpecialLine cuz I was bored. Subversion-branch: /branches/strife-branch Subversion-revision: 2134 --- src/strife/p_switch.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/strife/p_switch.c b/src/strife/p_switch.c index f40e24ac..b37e6586 100644 --- a/src/strife/p_switch.c +++ b/src/strife/p_switch.c @@ -453,6 +453,8 @@ static char speciallinemsg[92]; // 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 @@ boolean P_UseSpecialLine(mobj_t* thing, line_t* line, int side) default: return false; - break; } } - // Switches that other things can activate. if (!thing->player) @@ -528,9 +528,11 @@ boolean P_UseSpecialLine(mobj_t* thing, line_t* line, int side) 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 @@ boolean P_UseSpecialLine(mobj_t* thing, line_t* line, int side) 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; -- cgit v1.2.3