From 7ff82427d9d809d923634ebedc69b21bc8ee482c Mon Sep 17 00:00:00 2001 From: Chris Taylor Date: Tue, 17 Apr 2012 15:20:51 +0800 Subject: [PATCH] Skip rendering of OBJ_NONE objects to avoid a failed Assert (can happen when playing a demo then going to the editor) --- CHANGELOG.txt | 1 + main/render.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a2ef61f0c..ea5acaf71 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,7 @@ D1X-Rebirth Changelog -------- main/gameseq.c: Allow level progressing if playing the builtin mission with EDITOR compiled - only exit if Current_level_num is 0 editor/med.c: Reset the player object for the editor, since demo playback mucks it up +main/render.c: Skip rendering of OBJ_NONE objects to avoid a failed Assert (can happen when playing a demo then going to the editor) 20120416 -------- diff --git a/main/render.c b/main/render.c index c000ab986..3ed9dc8ce 100644 --- a/main/render.c +++ b/main/render.c @@ -1243,6 +1243,9 @@ void build_object_lists(int n_segs) int new_segnum,did_migrate,list_pos; obj = &Objects[objnum]; + + if (obj->type == OBJ_NONE) + continue; Assert( obj->segnum == segnum );