I thought Doors where considered activators?

Post » Fri May 27, 2011 10:27 pm

Question about GetFirstRefInCell using type 18 for activators.

This is not finding doors. I thought Doors where considered activators?

If I do not use any filter but then do the check "IsActivator" it works.
So why would GetFirstRefInCell 18 not work?
User avatar
Emmi Coolahan
 
Posts: 3335
Joined: Wed Jan 24, 2007 9:14 pm

Post » Fri May 27, 2011 9:40 pm

They did include a specific door code: "24: Door"
So maybe they separated them for flexibility?
User avatar
Lynette Wilson
 
Posts: 3424
Joined: Fri Jul 14, 2006 4:20 pm

Post » Sat May 28, 2011 1:32 am

Doors are special activators. They have their own record (DOOR).
User avatar
xx_Jess_xx
 
Posts: 3371
Joined: Thu Nov 30, 2006 12:01 pm

Post » Sat May 28, 2011 9:33 am

oh... so really when they say 18 == activators they mean activators except doors?

Kind- a svcks eggs because now I have to do a separate sweep for doors.
I do not see why doors should be separated, but I guess that is because I am not making a door mod.

Or should I just not use a filter?

Questions: is using a filter on getfirstref FASTER and less CPU intensive then not using any filter?
Or is it all the same speed and the filter just truncates the list that it then give you?

They did include a specific door code: "24: Door"
So maybe they separated them for flexibility?

User avatar
Tessa Mullins
 
Posts: 3354
Joined: Mon Oct 22, 2007 5:17 am

Post » Fri May 27, 2011 8:10 pm

oh... so really when they say 18 == activators they mean activators except doors?

Kind- a svcks eggs because now I have to do a separate sweep for doors.
I do not see why doors should be separated, but I guess that is because I am not making a door mod.

Or should I just not use a filter?

Questions: is using a filter on getfirstref FASTER and less CPU intensive then not using any filter?
Or is it all the same speed and the filter just truncates the list that it then give you?


This is me just throwing an educated guess, but I don?t think it?s a "list" at all, it?s an iterator, essentially a pointer to the first ref, containing info on where to find the next ref. It does?t matter if you use a filter or not - it matters how many refs you iterate through.
User avatar
herrade
 
Posts: 3469
Joined: Thu Apr 05, 2007 1:09 pm

Post » Fri May 27, 2011 6:13 pm

It is indeed implemented as a linked list internally. Besides, you don't need to worry about performance in most cases. So unless you're planning to walk so many times every frame, you can use whatever code logic that fits your purpose.
User avatar
Tanika O'Connell
 
Posts: 3412
Joined: Fri Jan 26, 2007 1:34 am

Post » Fri May 27, 2011 6:50 pm

um..thanks, I think....but just to be clear then:

Using a filter on getfirstref is not faster and less CPU intensive then not using any filter.
It is all the same speed and the filter just truncates the "internal" list that it then gives you.

er...right?


It is indeed implemented as a linked list internally. Besides, you don't need to worry about performance in most cases. So unless you're planning to walk so many times every frame, you can use whatever code logic that fits your purpose.

User avatar
courtnay
 
Posts: 3412
Joined: Sun Nov 05, 2006 8:49 pm

Post » Fri May 27, 2011 9:30 pm

Pragmatically, yes.
User avatar
Allison C
 
Posts: 3369
Joined: Mon Dec 18, 2006 11:02 am


Return to IV - Oblivion