A unit created by the captured vehicle factory is invisible for enemy forces. #237

Open
SergeYunev opened this Issue Sep 12, 2013 · 1 comment

Comments

Projects
None yet
1 participant

And again about seenByHouses.
When an enemy unit enters a structure and captures it the structure does not inherit unit's seenByHouses. It means that a unit created on such factory gets the factory's seenByHouses and becomes invisible for enemies.
I think in this case when a unit captures a structure the unit is more meaningful that is why the structure must inherit some unit's properties.
It means in the block (Unit_EnterStructure)

if (s->o.hitpoints < si->o.hitpoints / 4) {

the structure should inherit unit's seenByHouses value being previously reserved because of

Unit_Hide(unit);

which clears the seenByHouses value.

I think the problem is actual not on every map, because it depends on initial value of the structure's seenByHouses. I observed it on the last level when playing for the atreides and when capturing the harconnen's vehicle factory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment