Menu

#4068 In double-blind, units detected by sensors only should not be aware

stable 0.38
closed
None
fixed
1
2014-04-10
2014-03-09
Steve Gore
No

If a unit is detected by an opponent's unit using sensors (as opposed to visual sighting), you are made aware that the unit is spotted (the semi-transparent unit name becomes opaque). I believe this is incorrectly implemented.

Per TW, pg 221: If the unit is visible, place it on the spotting player's* map. Note that while it may be visible, it may not be able to see the unit that spotted it; if so, the moved unit does not know it has been spotted.

*Text in parenthesis added for clarity.

Posting bug per This Forum Thread

Related

Bugs: #4093
Bugs: #4099
Bugs: #4129

Discussion

  • Nicholas Walczak

    Fixed in [r10669].

    Right now, we've got two state variables in Entity related to this: isEverSeenByEnemy and isVisibleToEnemy. The former keeps track of if the Entity has ever been seen by an enemy and the latter keeps track of whether the Entity is currently visible to an enemy unit.

    Entity.isVisibleToEnemy is what is used by BoardView1 to do the translucence. Server.updateVisibilityIndicator() is called during every turn and phase change and is responsible for computing if there is any updates to isVisibleToEnemy and isEverSeenByEnemy. It ends up using Compute.whoCanSee to compute what Players have units that can see the Entity.

    The issue was that Compute.whoCanSee includes visual spotting and sensor detection, and Entity.isVisibleToEnemy is set true even if the unit is only detected by Sensors.

    I added a new state to Entity, isDetectedByEnemy to denote whether the Entity is detected by sensors. I then made it so Compute.whoCanSee takes a third parameter, a flag that determines whether sensors should be considered.

    I then updated Server.updateVisibility to not use sensors for visibility and then also do a separate check for sensor detection that will set Entity.isDetectedByEnemy.

    Finally, I updated BoardView1 so that it draws sensor detected units and doesn't remove the translucence for a unit that's only detected by sensors.

     

    Related

    Commit: [r10669]

  • Nicholas Walczak

    • Resolution: none --> fixed
    • Milestone: undetermined --> stable 0.38
     
  • Nicholas Walczak

    • Status: open --> closed
     

Log in to post a comment.