Skip to content

Conversation

@RunnerScrab
Copy link
Contributor

@RunnerScrab RunnerScrab commented Oct 28, 2025

The code I used for reference was from 1.14.74. If there are higher level synchronization primitives I should use instead, LMK, but I couldn't find any to use with Object::refCountAndHandleLock I thought would be compatible.

This also seems to fix (or make accessible again) at least a few uses of BSScript::Actor, namely passing it as an argument to a native bound function, and the GetPosition and GetAngle functions.

(The previous commit on the feature branch updates the Address Library IDs for the GetSource() of the Activation Event and BarterMenu events. It probably should be in a separate PR, but it's kind of a small change on its own and does fix those events, so I will leave that to your judgment.)

@RunnerScrab
Copy link
Contributor Author

RunnerScrab commented Oct 28, 2025

Just realized I forgot to reimplement the destructor, which I believe has also been inlined.

After taking a look at it, I doubt I have the skill or knowledge to reimplement ~Object() correctly in the near future. It seems fine until the last function, and that has a large call tree that I'm having difficulty finding any sign of in 1.15.222.

@qudix
Copy link
Contributor

qudix commented Oct 29, 2025

Can you add a TODO: comment on the destructor explaining the problem for future reference.

Also Object.cpp is missing a newline at the end of the file.

Move new Object member functions definitions into a .cpp file

Add TODO for BSScript::~Object()
@RunnerScrab RunnerScrab force-pushed the RunnerScrab_FixBSScriptObject branch from c4ed02f to d3e3b73 Compare October 29, 2025 02:24
@qudix qudix merged commit 0305c5b into libxse:main Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants