Code review comment for lp:~widelands-dev/widelands/bug-1687100-reveal_fields

Revision history for this message
SirVer (sirver) wrote :

I starting looking through the code and there is a lot to digest here. I have a few questions:

- Why do we require the player command? It seems that we only want to mess with the normal rules of vision through scripting which has to run in parallel on each machine anyways, i.e. should not require a player command. Using a player command will be more fragile, as for example the scripting code has no guarantee when the see/unsee actually happens (can be seconds if the network connection is bad).
- The semantis of hidden_fields_ is unclear to me. What happens in this case: Field f is seen by two buildings and a worker, i.e. f.vision = 4 (1 (has been seen before) + 3 viewers). It is now hidden through scripting. The worker will walk away eventually, so 'f.vision = 3'. What happens if the field is now 'revealed'?

« Back to merge proposal