Skip to content

Fix remove agents simulation #15 #16

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alhazmy13
Copy link

No description provided.

@@ -961,6 +964,8 @@ void CombatMock::DisplayAgents()
ImGui::TableNextColumn();
if (ImGui::SmallButton("remove") == true)
{
iter->removed = true;
Execute();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you misunderstand the interface or that you're trying to use it for something it wasn't designed for

If you look at the "Add" button in the "Add agent" window, it doesn't send an agent registration immediately, it just adds it to the list. Similarly, "remove" doesn't send an agent deregistration immediately, it just removes it from the list. So the call to Execute here is really not following the design of the rest of the program - the idea is that you build up the event sequence you want to send and can press one button to send it all, rather than "real time" sending all the events you want.

With that being said, agent deregistration is indeed not supported. Perhaps there should be a new event type in "Add event" which is "deregister agent"?

Or if your use case is just to reset the state in your addon, I'm not sure if the mock should have a button to dynamically reload the addon? It can get a bit tricky though with making sure the dll actually gets unloaded and so on, as well as anything the dll might have done in the process that's persistent (like mutexes and stuff like that)

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.

2 participants