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(Core/Map): remove hackfix that blocked update of GOs beeing set active #18812
fix(Core/Map): remove hackfix that blocked update of GOs beeing set active #18812
Conversation
…ctive - this just broke the whole purpose of setActive(true) if the gameobjects is still not really beeing set active afterwards - GetGridActivationRange() returns 0.0f for gameobjects anyways - so CalculateCellArea() will result in the minimal cell area around the gameobject's position - if the cell around the gameobject should not be updated, the gameobject should not have been set active in the first place
…et active azerothcore#18812 REMOVE WHEN IT BEE IN MAIN BRANCH
What needs to be tested. |
Well this should actually not have any negative impact at all. It might increase cpu load slightly (maybe?) as all gameobjects beeing set active now actually are beeing handled accordingly in the map update. So if there's no cpu load issues in a high population server for example, then this should be fine. |
Testing could also be done by assigning a custom gameobject script to a gameobject, do setActive(true) inside and e.g. print a log / error message in a loop. Before PR, the script execution would stop until the player comes back. |
Can this cause additional load understand? Or did the translator misinterpret your words? |
It depends. I didn't check the whole core to see which gameobjects are set active. So this might have a slight increase in load, but most likely right now it should not make any difference. Also the "increased load argument" is irrelevant in this case, as the hackfix has to be removed in my opinion and if any gameobjects should not be set active, that's the topic of another PR. |
Thanks for the reply. Honestly, I don't have enough knowledge to make a decision on a topic like this. I prefer that another colleague look at it. I trust his judgment to make the decision, but I would be calmer if someone else reviewed it for me. |
…beeing set active azerothcore#18812" This reverts commit dcb122f.
CPU usage is doubled |
Objects shouldn’t be set active indiscriminately and should also be set inactive once they’re no longer in use. Higher resource usage is likely due to indiscriminate/arbitrary use of the active flag. I still see no issue with this PR in particular, the faulty cases/bad scripting needs to be addressed instead |
Changes Proposed:
This PR proposes changes to:
Issues Addressed:
fun fact:
Battlefield::SpawnGameObject() sets all objects active after spawning them
SOURCE:
The changes have been validated through:
Tests Performed:
This PR has been:
How to Test the Changes:
Known Issues and TODO List:
How to Test AzerothCore PRs
When a PR is ready to be tested, it will be marked as [WAITING TO BE TESTED].
You can help by testing PRs and writing your feedback here on the PR's page on GitHub. Follow the instructions here:
http://www.azerothcore.org/wiki/How-to-test-a-PR
REMEMBER: when testing a PR that changes something generic (i.e. a part of code that handles more than one specific thing), the tester should not only check that the PR does its job (e.g. fixing spell XXX) but especially check that the PR does not cause any regression (i.e. introducing new bugs).
For example: if a PR fixes spell X by changing a part of code that handles spells X, Y, and Z, we should not only test X, but we should test Y and Z as well.