Forum Archive

Go Back   3D Realms Forums > 3D Realms Topics > Other Apogee/3D Realms Games > Rise of the Triad (1995) Source Code
Blogs FAQ Members List Social Groups Calendar Mark Forums Read

Notices

 
 
Thread Tools
Old 09-10-2003, 01:14 PM   #1
DrLex
\'Orphan\' touchplates bug fix
This is not a real bug, but rather lack of protection against a bug in map files:

While playing the Extreme ROTT levels, I often encountered crashes when stepping on some touchplates. These crashes occur in both OS X and Linux, but not in the original DOS version. There, all those nasty touchplates are treated as if they have already been stepped upon.
After some debugging, I found out that they have NULL pointers in the 'touchplate' array (probably the developer of the level forgot to attach an action to them.) Apparently DOS doesn't care about the game accessing memory in the system area, and by chance the right byte has the right value, therefore it doesn't crash. So this behavior can be simulated by adding a few extra checks:

in rt_playr.c around line 3765:
change:
if (touchplate[index-1]->complete)
into:
if (touchplate[index-1] == NULL || touchplate[index-1]->complete)

in rt_door around 753:
change:
[i]else if (touchplate->complete)
into:
[i]else if (touchplate[i] == NULL || touchplate->complete)
DrLex is offline  
Old 09-11-2003, 02:37 PM   #2
DrLex
Re: \'Orphan\' touchplates bug fix
These are two levels I remember (there also is one in "A Boulder Vision", but it would need to replay the level to find it and this takes quite long)





At any rate, the current solution seems better to me than having those "touch-segfaults"...
DrLex is offline  
Old 09-11-2003, 04:50 PM   #3
Joe Siegler
3D Realms Staff

Joe Siegler's Avatar
Re: \'Orphan\' touchplates bug fix
Well, Hoppe Hop is mine, as you can see by my initials in the wall. [img]images/icons/smile.gif[/img] Fire Flight is Tom Hall's.

I'll have to play it again to see the exact spot you're referring to, but I am curious to see here.

I know for a fact I used tricks like that in Boulder Vision (also mine). There were several time released things that required running over a touchplate, but I can guarantee you they serve a purpose. They were never thre as "orphaned touchplates". They do SOMETHING, even if it's not blatantly obvious.
__________________
Apogee / 3D Realms Employee: Dec 14, 1992 - May 22, 2009, Oct 23, 2014 - current

"Lifting up the Cross to the waiting lost" - Petra | John 3:16
Joe Siegler is offline  
Old 09-11-2003, 06:09 PM   #4
DrLex
Re: \'Orphan\' touchplates bug fix
In the meantime I blasted through A Boulder Vision too and found the touchplate, it's the second one in a row of 4, starting from the bottom of the map or from the right of the wall if you enter the room. The others behave normally...

DrLex is offline  
Old 09-11-2003, 11:46 PM   #5
Joe Siegler
3D Realms Staff

Joe Siegler's Avatar
Re: \'Orphan\' touchplates bug fix
As one of the two level designers for the EROTT pack, I'd be curious as to the EXACT spot and levels you're referring to here.

Some of the touchplates aren't as "useless" as you might believe. I know in some of my EROTT levels, I'd use a touchplate that would seem to do nothing, but in fact, it sets off some object off elsewhere in the level which moves objects that are timed to go off when the game player arrives at a certain spot in a level.

By forcing them all to be touched like that before they were originally diesnged to be, you've likely corrupted the level design.
__________________
Apogee / 3D Realms Employee: Dec 14, 1992 - May 22, 2009, Oct 23, 2014 - current

"Lifting up the Cross to the waiting lost" - Petra | John 3:16
Joe Siegler is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 02:21 AM.

Page generated in 0.12470198 seconds (100.00% PHP - 0% MySQL) with 18 queries

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.

Website is 1987-2014 Apogee Software, Ltd.
Ideas and messages posted here become property of Apogee Software Ltd.