shithub: choc

Download patch

ref: 5e44a80f1d3be806700efa669a8322fb585efe34
parent: d3466465397e8778ec1fdf44f5691cd713db5211
parent: 3ae01da38ef180a53cbadbedaba8b38fb448fbd3
author: Simon Howard <[email protected]>
date: Mon Dec 9 05:44:58 EST 2019

Merge pull request #1226 from mfrancis95/redundancyfix

Remove unnecessary checks in EV_DoLockedDoor

--- a/src/doom/p_doors.c
+++ b/src/doom/p_doors.c
@@ -209,8 +209,6 @@
     {
       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);
@@ -221,8 +219,6 @@
 	
       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);
@@ -233,8 +229,6 @@
 	
       case 136:	// Yellow Lock
       case 137:
-	if ( !p )
-	    return 0;
 	if (!p->cards[it_yellowcard] &&
 	    !p->cards[it_yellowskull])
 	{