summaryrefslogtreecommitdiff
path: root/src/strife
diff options
context:
space:
mode:
authorSamuel Villareal2010-09-16 01:21:58 +0000
committerSamuel Villareal2010-09-16 01:21:58 +0000
commite93890502ea653c49f358dfb79008e47310c464c (patch)
treea6535270facd5ceb2c6fe44f7e3e087bb451f045 /src/strife
parent0ac04776267a1a84724fcccfada12f769f4c315a (diff)
downloadchocolate-doom-e93890502ea653c49f358dfb79008e47310c464c.tar.gz
chocolate-doom-e93890502ea653c49f358dfb79008e47310c464c.tar.bz2
chocolate-doom-e93890502ea653c49f358dfb79008e47310c464c.zip
+ EV_DoLockedDoor completed
Subversion-branch: /branches/strife-branch Subversion-revision: 2090
Diffstat (limited to 'src/strife')
-rw-r--r--src/strife/doomdef.h58
-rw-r--r--src/strife/p_doors.c203
2 files changed, 183 insertions, 78 deletions
diff --git a/src/strife/doomdef.h b/src/strife/doomdef.h
index ab797147..4880dac5 100644
--- a/src/strife/doomdef.h
+++ b/src/strife/doomdef.h
@@ -107,35 +107,35 @@ typedef enum
// villsa [STRIFE]
typedef enum
{
- key_BaseKey,
- key_GovsKey,
- key_Passcard,
- key_IDBadge,
- key_PrisonKey,
- key_SeveredHand,
- key_Power1Key,
- key_Power2Key,
- key_Power3Key,
- key_GoldKey,
- key_IDCard,
- key_SilverKey,
- key_OracleKey,
- key_MilitaryID,
- key_OrderKey,
- key_WarehouseKey,
- key_BrassKey,
- key_RedCrystalKey,
- key_BlueCrystalKey,
- key_ChapelKey,
- key_CatacombKey,
- key_SecurityKey,
- key_CoreKey,
- key_MaulerKey,
- key_FactoryKey,
- key_MineKey,
- key_NewKey5,
-
- NUMCARDS
+ key_BaseKey, // 0
+ key_GovsKey, // 1
+ key_Passcard, // 2
+ key_IDCard, // 3
+ key_PrisonKey, // 4
+ key_SeveredHand, // 5
+ key_Power1Key, // 6
+ key_Power2Key, // 7
+ key_Power3Key, // 8
+ key_GoldKey, // 9
+ key_IDBadge, // 10
+ key_SilverKey, // 11
+ key_OracleKey, // 12
+ key_MilitaryID, // 13
+ key_OrderKey, // 14
+ key_WarehouseKey, // 15
+ key_BrassKey, // 16
+ key_RedCrystalKey, // 17
+ key_BlueCrystalKey, // 18
+ key_ChapelKey, // 19
+ key_CatacombKey, // 20
+ key_SecurityKey, // 21
+ key_CoreKey, // 22
+ key_MaulerKey, // 23
+ key_FactoryKey, // 24
+ key_MineKey, // 25
+ key_NewKey5, // 26
+
+ NUMCARDS // 27
} card_t;
diff --git a/src/strife/p_doors.c b/src/strife/p_doors.c
index 0615448a..d84d92bf 100644
--- a/src/strife/p_doors.c
+++ b/src/strife/p_doors.c
@@ -215,63 +215,168 @@ void T_VerticalDoor(vldoor_t* door)
// Move a locked door up/down
//
-int
-EV_DoLockedDoor
-( line_t* line,
- vldoor_e type,
- mobj_t* thing )
+int EV_DoLockedDoor(line_t* line, vldoor_e type, mobj_t* thing)
{
- player_t* p;
-
+ player_t* p;
+
p = thing->player;
-
- if (!p)
- return 0;
-
-/* switch(line->special)
+
+ if(!p)
+ return 0;
+
+ switch(line->special)
{
- case 99: // Blue Lock
- case 133:
- if ( !p )
- return 0;
- if (!p->cards[it_bluecard] && !p->cards[it_blueskull])
- {
- p->message = DEH_String(PD_BLUEO);
- S_StartSound(NULL,sfx_oof);
- return 0;
- }
- break;
-
- case 134: // Red Lock
- case 135:
- if ( !p )
- return 0;
- if (!p->cards[it_redcard] && !p->cards[it_redskull])
- {
- p->message = DEH_String(PD_REDO);
- S_StartSound(NULL,sfx_oof);
- return 0;
- }
- break;
-
- case 136: // Yellow Lock
- case 137:
- if ( !p )
- return 0;
- if (!p->cards[it_yellowcard] &&
- !p->cards[it_yellowskull])
- {
- p->message = DEH_String(PD_YELLOWO);
- S_StartSound(NULL,sfx_oof);
- return 0;
- }
- break;
- }*/
+ case 99:
+ case 133:
+ if(!p->cards[key_IDCard])
+ {
+ p->message = DEH_String("You need an id card");
+ S_StartSound(NULL, sfx_oof);
+ return 0;
+ }
+ break;
+
+ case 134:
+ case 135:
+ if(!p->cards[key_IDBadge])
+ {
+ p->message = DEH_String("You need an id badge");
+ S_StartSound(NULL, sfx_oof);
+ return 0;
+ }
+ break;
+
+ case 136:
+ case 137:
+ if(!p->cards[key_Passcard])
+ {
+ p->message = DEH_String("You need a pass card");
+ S_StartSound(NULL, sfx_oof);
+ return 0;
+ }
+ break;
+
+ case 151:
+ case 164:
+ if(!p->cards[key_GoldKey])
+ {
+ p->message = DEH_String("You need a gold key");
+ S_StartSound(NULL, sfx_oof);
+ return 0;
+ }
+ break;
+
+ case 153:
+ case 163:
+ if(!p->cards[key_SilverKey])
+ {
+ p->message = DEH_String("You need a silver key");
+ S_StartSound(NULL, sfx_oof);
+ return 0;
+ }
+ break;
+
+ case 152:
+ case 162:
+ if(!p->cards[key_BrassKey])
+ {
+ p->message = DEH_String("You need a brass key");
+ S_StartSound(NULL, sfx_oof);
+ return 0;
+ }
+ break;
+
+ case 167:
+ case 168:
+ if(!p->cards[key_SeveredHand])
+ {
+ p->message = DEH_String("Hand print not on file");
+ S_StartSound(NULL, sfx_oof);
+ return 0;
+ }
+ break;
+
+ case 171:
+ if(!p->cards[key_PrisonKey])
+ {
+ p->message = DEH_String("You don't have the key to the prison");
+ S_StartSound(NULL, sfx_oof);
+ return 0;
+ }
+ break;
+
+ case 172:
+ if(!p->cards[key_Power1Key])
+ {
+ p->message = DEH_String("You don't have the key");
+ S_StartSound(NULL, sfx_oof);
+ return 0;
+ }
+ break;
+
+ case 173:
+ if(!p->cards[key_Power2Key])
+ {
+ p->message = DEH_String("You don't have the key");
+ S_StartSound(NULL, sfx_oof);
+ return 0;
+ }
+ break;
+
+ case 176:
+ if(!p->cards[key_Power3Key])
+ {
+ p->message = DEH_String("You don't have the key");
+ S_StartSound(NULL, sfx_oof);
+ return 0;
+ }
+ break;
+
+ case 189:
+ if(!p->cards[key_OracleKey])
+ {
+ p->message = DEH_String("You don't have the key");
+ S_StartSound(NULL, sfx_oof);
+ return 0;
+ }
+ break;
+
+ case 191:
+ if(!p->cards[key_MilitaryID])
+ {
+ p->message = DEH_String("You don't have the key");
+ S_StartSound(NULL, sfx_oof);
+ return 0;
+ }
+ break;
+
+ case 192:
+ if(!p->cards[key_WarehouseKey])
+ {
+ p->message = DEH_String("You don't have the key");
+ S_StartSound(NULL, sfx_oof);
+ return 0;
+ }
+ break;
+
+ case 223:
+ if(!p->cards[key_MineKey])
+ {
+ p->message = DEH_String("You don't have the key");
+ S_StartSound(NULL, sfx_oof);
+ return 0;
+ }
+ break;
+ }
return EV_DoDoor(line,type);
}
+//
+// EV_DoDoor
+//
+
int EV_DoDoor(line_t* line, vldoor_e type)
{
int secnum, rtn;