TeamREPENTOGON / TeamREPENTOGON/REPENTOGON
POST_POST_INIT callbacks
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 345
- Forks
- 51
- Avg merge
- 11h 2m
- Merged PRs (30d)
- 4
Description
Currently with POST_INIT callbacks, as the docs say:
Accessing the initialized entity does provide incomplete data in some use cases. Only Position, Velocity, SpawnerType, SpawnerVariant, SpawnerEntity and some others are set before PostInit callbacks are called and are therefore accessible. Some other attributes (i.e. effect attributes or tear flags) will not be set. If you want to access those values, you need to hook into MC_NPC_UPDATE and check those attributes on the first possible frame.
Having to create a post_update callback that only runs on the first frame is just a little inelegant; would it be possible to either A) Add a new callback that runs once other fields have been set (The one Im dealing with right now is checking Bomb.IsFetus, but there are others), or adapting the current Post_Init callback to only run then instead (provided that doesnt break anything)
I'm not sure how major of an effect all the post_update callbacks we have to only run once and then never again have on performance, but either way, a dedicated callback to this sort of thing would definitely be a bit more elegant and appreciated
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by tracing the POST_INIT and MC_NPC_UPDATE callback entry points and the timing of entity field initialization; determine whether a new callback or changed POST_INIT semantics is appropriate. Done means the callback behavior and initialization guarantees are agreed and implemented without requiring one-shot post-update work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, lua
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100