Now missiles spawn in the center of unit, not in the center of top-left tile. Offset (if needed) must be set in the units declaration lua-files by MissileOffsets = {}
This commit is contained in:
parent
9685d575bc
commit
50596ed6c5
1 changed files with 1 additions and 1 deletions
|
@ -396,7 +396,7 @@ void FireMissile(CUnit &unit, CUnit *goal, const Vec2i &goalPos)
|
|||
// If Firing from inside a Bunker
|
||||
CUnit *from = GetFirstContainer(unit);
|
||||
const int dir = ((unit.Direction + NextDirection / 2) & 0xFF) / NextDirection;
|
||||
const PixelPos startPixelPos = Map.TilePosToMapPixelPos_Center(from->tilePos)
|
||||
const PixelPos startPixelPos = from->GetMapPixelPosCenter()
|
||||
+ unit.Type->MissileOffsets[dir][0];
|
||||
|
||||
Vec2i dpos;
|
||||
|
|
Loading…
Add table
Reference in a new issue