Update to Reveal attacker for NEW_FOW
This commit is contained in:
parent
39eb6e1aa8
commit
bc92dfe572
1 changed files with 11 additions and 3 deletions
|
@ -600,9 +600,17 @@ global void FireMissile(Unit* unit)
|
|||
|
||||
if( goal && RevealAttacker ) { // attacking units are seen
|
||||
#ifdef NEW_FOW
|
||||
// FIXME: Need a way to temporarily mark this tile, place a TTL
|
||||
// FIXME: Unit is the best solution, but need other fixes first.
|
||||
MapMarkSight(goal->Player,unit->X,unit->Y,1);
|
||||
Unit* target;
|
||||
// FIXME: Don't use UnitTypeByIdent during runtime.
|
||||
target = MakeUnit(UnitTypeByIdent("unit-reveal-attacker"), unit->Player);
|
||||
target->Orders[0].Action = UnitActionStill;
|
||||
target->HP = 0;
|
||||
target->X = unit->X;
|
||||
target->Y = unit->Y;
|
||||
target->TTL=GameCycle+CYCLES_PER_SECOND+CYCLES_PER_SECOND/2;
|
||||
target->CurrentSightRange=target->Stats->SightRange;
|
||||
MapMarkSight(target->Player,unit->X,unit->Y,target->CurrentSightRange);
|
||||
CheckUnitToBeDrawn(target);
|
||||
#else
|
||||
if( goal->Player==ThisPlayer || IsSharedVision(ThisPlayer,goal) ) {
|
||||
MapMarkSight(unit->X,unit->Y,1);
|
||||
|
|
Loading…
Add table
Reference in a new issue