Duke4.net Forums: Simple way to get number of parent sector? - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Simple way to get number of parent sector?

User is offline   Danukem 

  • Duke Plus Developer

#1

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).

This post has been edited by Trooper Dan: 01 October 2016 - 07:26 PM

0

User is offline   Kyanos 

#2

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.
0

User is offline   Danukem 

  • Duke Plus Developer

#3

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.
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options