Let's say there is a sector that I'm looking at in CON code. Is there a simple way to tell whether the sector has a parent, and what the number of the parent sector is?
EDIT: So after looking at the wiki, here's my take on it. If it's a child sector, then every single wall of it should have its nextsector member set to the same sector (the parent sector), or -1 (white space).
Page 1 of 1
Simple way to get number of parent sector?
#1 Posted 01 October 2016 - 07:17 PM
This post has been edited by Trooper Dan: 01 October 2016 - 07:26 PM
#2 Posted 01 October 2016 - 07:34 PM
Checking the nextsector(s) should work as you said. Maybe something unique happens with updatesector which could possibly expose child sectors without looping through all the walls.
#3 Posted 01 October 2016 - 07:57 PM
I got it working the way I expected. Here's the issue I was having: There's a perk which is supposed to show the player whether there is a secret near where the player is looking (the player hitscan target). But in some cases, a secret item is in a sector not marked as secret, even though its parent sector is secret. Example: the RPG on the ledge in E1L1. So my perk was failing to tag the RPG as a secret item. Now it works -- this is a big improvement.
Share this topic:
Page 1 of 1