If you set your start point at the edge of the ally start box you might get moved to the middle of the start box.
Why? init_game_spawn.lua, the gadget that spawns the commanders snaps the start positions to 16x16 grid. This might move the commander out of the box and will be corrected by placing them in the middle of the box (unit_fix_dropped_startpos.lua).
Bug: start point at edge of ally box
Moderator: Content Developer
Re: Bug: start point at edge of ally box
I messaged TheFatController with what this bug is, exactly what causes it, and instructions on how to fix it over two months ago.
Re: Bug: start point at edge of ally box
nice find sir! 
how would you suggest to fix it? within the spawn widget, or restricting the start boxes to 16x16 grid? i guess the first would be easier and more appropriate. is the required info (start box limits) available to lua?

how would you suggest to fix it? within the spawn widget, or restricting the start boxes to 16x16 grid? i guess the first would be easier and more appropriate. is the required info (start box limits) available to lua?
Re: Bug: start point at edge of ally box
While it isn't necessary for start positions to be rounded onto a grid, as the starting units in BA aren't buildings, the real solution is to remove fix_dropped_startpos (The other solution being removal of rounding). The gadget was designed to fix commanders spawning outside their box when the owner had dropped or hadn't placed, but now that start unit spawning is handled by gadgets there is no longer a chance of this happening, so the fixer gadget is unnecessary.hoijui wrote:nice find sir!
how would you suggest to fix it? within the spawn widget, or restricting the start boxes to 16x16 grid? i guess the first would be easier and more appropriate. is the required info (start box limits) available to lua?
TheFatController works in mysterious ways however, so his fix was to keep the fix_dropped_startpos gadget, and modify it to accept positions that are up to 16 units out of bounds. He then put this fix in his sideproject eternal annihilation, and left BA alone.
-
- Posts: 834
- Joined: 19 May 2009, 21:10
Re: Bug: start point at edge of ally box
Would have suggested that, too.Niobium wrote:While it isn't necessary for start positions to be rounded onto a grid, as the starting units in BA aren't buildings,
Still necessary. Unless you move the check to the spawn gadget.the real solution is to remove fix_dropped_startpos (The other solution being removal of rounding). The gadget was designed to fix commanders spawning outside their box when the owner had dropped or hadn't placed, but now that start unit spawning is handled by gadgets there is no longer a chance of this happening, so the fixer gadget is unnecessary.