Native AI drawer.

Native AI drawer.

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
lamer
Posts: 153
Joined: 08 Mar 2014, 23:13

Native AI drawer.

Post by lamer »

Made some research on how to make real fix from https://github.com/spring/spring/pull/121 workaround.
Its ok for testing purposes but it will not work if AI was added to enemy team.
So i went futher and wrote patch that works for enemy too, draws lines and points with own team color. But it still appears to be only a workaround because callback->GetMap()->GetDrawer()->AddPoint will use current player's name to make ping. And the code is more messy.

Therefore i think that engine should treat AIs as regular players (in most cases). That should eliminate 2 separate lists of players and skirmishAIs with identical IDs. And for special cases "isAI" flag could be used.
Don't know how hard to refactor this or if such changes are somewhere in the roadmap. Wrote this just to share my opinion and findings.
ai_drawer.diff
(17.94 KiB) Downloaded 4 times
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Native AI drawer.

Post by abma »

i guess that
lamer wrote:Therefore i think that engine should treat AIs as regular players (in most cases). That should eliminate 2 separate lists of players and skirmishAIs with identical IDs. And for special cases "isAI" flag could be used.
imo thats how a real fix should solve that. not sure if there are some bad side effects as i didn't write the current code. imo this could simplify some stuff, for example bandwith limits would be per player and not per client. no clue about how much work it is...
Post Reply

Return to “Engine”