shithub: choc

Download patch

ref: 0cb9b40b21e08efc10cd33ead3e4d83c2ff8438b
parent: 5c644aea77f8e37f2f39928b2256c9a13cdebb99
author: linguica <github@andrewstine.org>
date: Fri Sep 11 13:05:22 EDT 2015

Add error message to untagged DR tag crash

I don't see any real downside in giving the player at least some
indication of why the game just forcibly quit when they try to use a DR
special on a 1-sided linedef.

--- a/src/doom/p_doors.c
+++ b/src/doom/p_doors.c
@@ -392,6 +392,12 @@
     }
 	
     // if the sector has an active thinker, use it
+
+    if (line->sidenum[side^1] == -1)
+    {
+        I_Error("EV_VerticalDoor: DR special type on 1-sided linedef");
+    }
+
     sec = sides[ line->sidenum[side^1]] .sector;
 
     if (sec->specialdata)