Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetObjectUiDiscoveryMask updates too late when creating new creatures #667

Open
Cjreek opened this issue Sep 18, 2024 · 0 comments
Open
Labels
game Issues with the game code.

Comments

@Cjreek
Copy link

Cjreek commented Sep 18, 2024

Describe the bug

When creating a creature like this and setting the UI discovery mask to NONE, the creature name is still visible (for a moment) if a player already had the Tab key pressed when the creature spawns:

object oCreature = CreateObject(OBJECT_TYPE_CREATURE, "blueprint", lLocation, FALSE);
SetObjectUiDiscoveryMask(oCreature, OBJECT_UI_DISCOVERY_NONE);

This even happens in if explicitely first setting the mask to none before even adding the creature to an area (NWNX C++ code):

CNWSCreature* pCreature = new CNWSCreature();
pCreature->LoadFromTemplate("blueprint");
pCreature->m_nUiDiscoveryMask = 0;

Utils::AddToArea(pCreature, pArea, pLocation->m_vPosition.x, pLocation->m_vPosition.y, pLocation->m_vPosition.z);

Custom content or overrides used

No response

Game version

37-9

First seen on game version

No response

OS

Linux

Distribution

Steam

@Cjreek Cjreek added the game Issues with the game code. label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
game Issues with the game code.
Projects
None yet
Development

No branches or pull requests

1 participant