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

Fix citizen SelectModel VScript hook having issues in save/restore #350

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Blixibon
Copy link
Member

@Blixibon Blixibon commented Jan 8, 2025

This PR fixes citizens which selected a model via SelectModel switching back to default citizen models after loading a save.

After using the SelectModel hook, citizens will now have their type set to CT_UNIQUE, which bypasses the model selection code and prevents a new one from being selected by accident later.


PR Checklist

  • My PR follows all guidelines in the CONTRIBUTING.md file
  • My PR targets a develop branch OR targets another branch with a specific goal in mind

@@ -839,6 +839,9 @@ void CNPC_Citizen::SelectModel()
}
}

// Models selected this way must be unique to avoid conflicts in save/restore
m_Type = CT_UNIQUE;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little bit skeptical of this change. In Entropy : Zero 2, some citizen types have different effects such as jump rebels or rebel brutes. Using the SelectModel hook on them would remove these effects. I don't have a better alternative to suggest but I think maybe there should be a separate way to set m_Type or perhaps the save/restore bugs need to be addressed directly.

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