[pull] master from DCurrent:master - #104
Merged
Merged
Conversation
Add updatelogic.c and updatedlogic.c global event hooks that execute before and after each engine logical tick. Place the post-update hook before the logical clock advances so both events observe the same tick value. Add matching updatelogicscript and updatedlogicscript level commands, along with level property constants for accessing their script objects. Run global hooks before their level counterparts and preserve the existing ingame and alwaysupdate execution policy. Logical hooks remain inactive while paused or when an outer-loop iteration processes no logical tick. Fix missing breaks in the level script-property getter that caused script properties to fall through and return an incorrect value.
Add modelload.c and odelunload.c global hooks for observing model cache state transitions without repeatedly scanning the full model collection. Add modelloadscript and modelunloadscript model commands for template- specific initialization and teardown. Expose the model pointer, cache index, and model name through model, modelindex, and modelname locals. Store lifecycle scripts in model cache entries so they are not copied into spawned entity modeldata. Fire model-owned callbacks before their global counterparts, and fire unload callbacks before native model destruction while the model pointer remains valid. Add lifecycle state guards to prevent recursive self-unloading and removal of partially loaded models. Preserve cache-owned script storage across ordinary unload and reload operations, then release it during model cache shutdown. Do not inherit lifecycle callbacks through model subclassing, avoiding shared compiled-script lifetime dependencies between parent and child models. Update unload_model() to use findmodel() so requesting removal of an absent model no longer loads it merely to unload it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )