Skip to content

Comments

Rewrite of vanilla scripts to use engine iterators for alife objects#247

Draft
themrdemonized wants to merge 3 commits intoall-in-one-vs2022-wpofrom
65534-loop-banish
Draft

Rewrite of vanilla scripts to use engine iterators for alife objects#247
themrdemonized wants to merge 3 commits intoall-in-one-vs2022-wpofrom
65534-loop-banish

Conversation

@themrdemonized
Copy link
Owner

@themrdemonized themrdemonized commented Jun 9, 2025

Instead of hardcoded for loop to 65534 or 65535, scripts use alife():iterate_objects_without_actor(function(se_obj)) or for obj in game_objects_without_actor_iter() do

Suggestion:
From quick test, the trans_outfit.script has function transparent_gg(). The alife iteration causes noticeable lag for some reason. I replaced with game objects iterator to optimize it.
Since it caused a lag, maybe instead of object iterator, use for loop with max id.
For example
for i = 1, alife():max_id() - 1 do

@themrdemonized themrdemonized marked this pull request as draft June 9, 2025 07:57
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.

1 participant