summaryrefslogtreecommitdiff
path: root/src/strife/p_switch.c
diff options
context:
space:
mode:
authorJames Haley2010-09-22 00:10:59 +0000
committerJames Haley2010-09-22 00:10:59 +0000
commit5aa95863f364142d404a989eec0d28844352811a (patch)
tree96eb6dc5beffe70b852bf039fc81d3c5eb1a7a5d /src/strife/p_switch.c
parent6ae54ada023321ec629a52cc4f91ccd8e3aa06ff (diff)
downloadchocolate-doom-5aa95863f364142d404a989eec0d28844352811a.tar.gz
chocolate-doom-5aa95863f364142d404a989eec0d28844352811a.tar.bz2
chocolate-doom-5aa95863f364142d404a989eec0d28844352811a.zip
Fixed firing of missiles when looking up/down so that the aimslope
calculated in P_AimLineAttack is used. Added W1 handling for linetype 182 to P_CrossSpecialLine, which lets missiles break windows. Corrected numerous mistakes in the implementation of P_ChangeSwitchTexture. Subversion-branch: /branches/strife-branch Subversion-revision: 2128
Diffstat (limited to 'src/strife/p_switch.c')
-rw-r--r--src/strife/p_switch.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/strife/p_switch.c b/src/strife/p_switch.c
index d190da09..f40e24ac 100644
--- a/src/strife/p_switch.c
+++ b/src/strife/p_switch.c
@@ -263,7 +263,6 @@ void P_ChangeSwitchTexture(line_t* line, int useAgain)
sound = sfx_swtchn;
- // EXIT SWITCH?
// villsa [STRIFE] check for linetype 182 (break glass)
if(line->special == 182)
{
@@ -272,11 +271,12 @@ void P_ChangeSwitchTexture(line_t* line, int useAgain)
if(useAgain)
{
- texMid = 0;
+ // haleyjd 09/21/10: Corrected (>> 16 == next field)
texTop = 0;
+ texBot = 0;
}
- if(texBot)
+ if(texMid) // haleyjd 09/21/10: Corrected (>> 16 == next field)
useAgain = 0;
sound = sfx_bglass;
@@ -295,7 +295,7 @@ void P_ChangeSwitchTexture(line_t* line, int useAgain)
if(sl->sound)
sound = sl->sound;
- S_StartSound(buttonlist->soundorg,sound);
+ S_StartSound(buttonlist->soundorg, sound);
sides[line->sidenum[0]].toptexture = switchlist[i^1];
if(useAgain)
@@ -318,13 +318,14 @@ void P_ChangeSwitchTexture(line_t* line, int useAgain)
sides[line->sidenum[0]].midtexture = switchlist[i^1];
// villsa [STRIFE] affect second side of line
+ // BUG: will crash if 1S line is marked with TWOSIDED flag!
if(line->flags & ML_TWOSIDED)
sides[line->sidenum[1]].midtexture = switchlist[i^1];
if(useAgain)
P_StartButton(line, middle,switchlist[i],BUTTONTIME);
- // villsa [STRIFE]
+ // villsa [STRIFE]: Mines Converter hack
if(sound == sfx_firxpl)
{
breakglass = true;