From 5aa95863f364142d404a989eec0d28844352811a Mon Sep 17 00:00:00 2001 From: James Haley Date: Wed, 22 Sep 2010 00:10:59 +0000 Subject: 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 --- src/strife/p_switch.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/strife/p_switch.c') 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; -- cgit v1.2.3