Ahli / sc2xml

11 stars 1 forks source link

6x6 Rocks have a footprint issue causing inability to attack move #148

Open Joshua-Leibold opened 6 months ago

Joshua-Leibold commented 6 months ago

The footprint of 6x6 rocks AKA "Footprint 4x4 (Destructible Rock Diagonal)" has the outside edges flagged with "no vision". It appears that if a unit is in vision range of the no vision squares as shown in blue BUT NOT in vision of the regular building squares as shown in purple, the unit is considered to not have vision of the rock but also the rock is no longer "snapshot" and therefore the unit cannot attack move it. However, if the unit can either see a purple square (and therefore can see a visible rock) OR is far enough away that the "no vision" blue squares cannot be seen (the rock is considered in snapshot mode) then the rock can be attack moved again

cab1bc6d944582b648acbf04b67e054f

<CFootprint id="Footprint4x4DestructibleRockDiagonal">
    <Layers index="Place">
        <Sets index="1" removed="1"/>
    </Layers>
</CFootprint>

Removing the flag from the blue squares that designates them as "No Vision" is probably the least number of lines required to fix it.

The following test file can be used as a demonstration of the problem. Player 1 has a Battlecruiser placed in a position that makes attack moving the rocks to its south-west impossible

rock bug.zip

Joshua-Leibold commented 5 months ago

This is also affecting diagonal rocks

<CFootprint id="Footprint10x10DestructibleRockDiagonalBLUR">
    <Layers index="Place">
        <Sets index="1" removed="1"/>
    </Layers>
</CFootprint>
<CFootprint id="Footprint10x10DestructibleRockDiagonalULBR">
    <Layers index="Place">
        <Sets index="1" removed="1"/>
    </Layers>
</CFootprint>