[Freeciv-Dev] (PR#11185) ugliness in is_my_zoc
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=11185 >
is_my_zoc is very problematic.
My attention was first drawn here because this function uses is_server.
But fixing this isn't easy, and is_server is really the least of the
problems in this function.
The function is omniscient in the server but works in the client as
well. Hence the is_server check.
However the function should not always be omniscient in the server! It
should respect AI capabilities and shouldn't cheat unless it's supposed
to. This can only be done in the server. Moving it into server/ might
makes sense (with the client having a separate, almost completely
different function). But the function is called in several places
(including PF) in common which is hard to fix.
One possible solution is to make the AI handicaps into tangible things.
Rather than allow the AI to see unknown tiles when the handicap is
set, instead mark those tiles as known. Then the common code would work
with it without having to know any more. This would also allow
client-side AIs to work with handicaps. However there are several
problems with this idea as well. If a human were to /take an AI player
they would get all of the knowledge of the map from the AI player. Also
AI handicaps are a little more fine-grained than just revealing the map
(although this could be fixed). For the plan of changing handicaps into
*player* effects - or simply of allowing human players to have handicaps
- this is the only solution however.
-jason
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#11185) ugliness in is_my_zoc,
Jason Short <=
|
|