Git Product home page Git Product logo

Comments (7)

claustromaniac avatar claustromaniac commented on September 15, 2024

A couple of months ago I noticed it doesn't return dead actors, but presumed it was like that by design. Does it fail to return other actors as well?

from xobse.

llde avatar llde commented on September 15, 2024

Dead Actors have no more any processing level, so it's normal.
I actually don't know. I didn't dig into the issue. (Maybe there is no actual issue and the function is doing what is supposed to do)

from xobse.

Forlini91 avatar Forlini91 commented on September 15, 2024

The issue has been reported by Saebel. I recall he made some tests and reported the commands GetFirstRer/GetNextRef returns some actors in high process the command GetHighActors doesn't.
I sent him a message to ask for details.

from xobse.

claustromaniac avatar claustromaniac commented on September 15, 2024

@llde : I thought the same when I tested it, that's why I presumed it was intentionally that way. But then I tested GetProcessLevel on a freshly killed actor and guess what? It returned 0 (high processing). Does that mean I found a bug in GetProcessLevel, or does GetProcessLevel return 0 simply because I called it on an invalid target?

Maybe dead actors happened to influence the results of Saebel's tests without him noticing that fact?

Edit: I'll probably test these things myself later if I can spare the time.

from xobse.

claustromaniac avatar claustromaniac commented on September 15, 2024

I ran some quick tests and it seems my previous assumptions were wrong. It turns out GetHighActors does return dead actors, and GetProcessLevel returns 0 for dead actors too (when appropriate).

My test plugin includes a global variable (TestCellDepth) that is meant as a way to quickly change the GetFirstRef function's cell depth parameter in-game. Setting that global to 3 and casting the test spell confirms the results of Saebel's tests. After three extensive tests I've come to the conclusion that GetHighActors does indeed return less elements than it should.

TEST GetHighActors vs GetProcessLevel.zip

from xobse.

Forlini91 avatar Forlini91 commented on September 15, 2024

By looking at the OBSE code it seems GetHighActors doesn't directly search for the active actors, but simply gets the list of actors in high process contained in an object ActorsProcessManager.
Now, OBSE doesn't instantiate this class, but reads an existing instance at location 0x00B3BD00 and tries to rebuild it in GameProcess.h. This means ActorsProcessManager is a vanilla class (so, not an OBSE class), and the list of high actors is maintained by the game itself.

If all this analysis is correct, then the code in GetHighActors is fine, and if this list of actors in high process doesn't contains all them, it means the vanilla game itself doesn't put them all in the list.
Maybe there's a valid reason or maybe it's only a bug.

from xobse.

claustromaniac avatar claustromaniac commented on September 15, 2024

If you're right and the code in GetHighActors is fine as it is (and it certainly looks that way), then improving it would likely make it a slower function, beating a significant part of its own purpose in the process. That sucks.

I wonder if the same happens with GetMediumHighActors and GetLowActors...

from xobse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.