Skip to content

Fix crate spawned actors not crushing crushable actors and spawning inside other actors.#20849

Merged
Mailaender merged 2 commits into
OpenRA:bleedfrom
PunkPun:fix-crate
Aug 8, 2023
Merged

Fix crate spawned actors not crushing crushable actors and spawning inside other actors.#20849
Mailaender merged 2 commits into
OpenRA:bleedfrom
PunkPun:fix-crate

Conversation

@PunkPun

@PunkPun PunkPun commented May 7, 2023

Copy link
Copy Markdown
Member

I fix it by pushing cell selection logic into end world task, and by calling SetPosition after the actor was spawned

@PunkPun PunkPun changed the title Fix crates spawned actors not crushing crushable actors and spawning inside other actors. Fix crate spawned actors not crushing crushable actors and spawning inside other actors. May 7, 2023
@anvilvapre

Copy link
Copy Markdown
Contributor

I fix it by pushing cell selection logic into end world task

Side question. This seems like a fix for more and more things. Which makes sense. But if so much tasks become frame end tasks, being executed after a logic tick, won't you have the frame end tasks competing as well.

@PunkPun

PunkPun commented May 11, 2023

Copy link
Copy Markdown
Member Author

I don't think so. End frame tasks are mostly there to handle object creation as to avoid modified collection during enumeration crashes. And as it seems much of the older code processes creations checks at the wrong time. It's not unlikely that some major refactor screwed a lot of code up.

Fwiw I've also seen end frame tasks used for multithreading.

@abcdefg30

Copy link
Copy Markdown
Member

Does that mean we can just put the SetPosition part into the frame end task?

@PunkPun

PunkPun commented May 11, 2023

Copy link
Copy Markdown
Member Author

I'm not sure what exactly you mean. But I don't really see a reason why we can't put SetPosition there.

@abcdefg30

Copy link
Copy Markdown
Member

I was asking if we can just put the SetPosition stuff inside the task and leave the rest outside.

@PunkPun

PunkPun commented May 11, 2023

Copy link
Copy Markdown
Member Author

No, then none of the bogus behavior would be fixed

Mailaender
Mailaender previously approved these changes May 19, 2023
@Mailaender

Copy link
Copy Markdown
Member

Can you remove the test case?

@PunkPun

PunkPun commented Aug 8, 2023

Copy link
Copy Markdown
Member Author

removed

@Mailaender Mailaender merged commit 54dac39 into OpenRA:bleed Aug 8, 2023
@Mailaender

Copy link
Copy Markdown
Member

Changelog

@PunkPun PunkPun deleted the fix-crate branch August 8, 2023 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants