Lone Wolf triggers at incorrect distance to big units

Post Reply
Soldier9
Posts: 6
Joined: Sat Feb 25, 2017 4:07 pm

Lone Wolf triggers at incorrect distance to big units

Post by Soldier9 »

If you're in control of a unit that occupies more that one tile, like a Sectopod or Gatekeeper, the Lone Wolf ability will trigger 1 tile too soon in 2 directions relative to it because the size of units are not taken into account in the TileDistanceBetween() between method used in the ability.

See http://imgur.com/a/c2ho0 for screenshots demonstrating the issue (only shows the issue along one axis).
TheCiroth
Posts: 79
Joined: Fri Jan 27, 2017 6:53 pm

Re: Lone Wolf triggers at incorrect distance to big units

Post by TheCiroth »

Make sure you read the format for reporting bugs
bountygiver
Posts: 74
Joined: Mon Feb 27, 2017 3:33 am

Re: Lone Wolf triggers at incorrect distance to big units

Post by bountygiver »

this is due to each unit has a position property and even with big units, only 1 out of 4 tiles is their actual position, and these abilities only consider the distance of such property between 2 units.
Soldier9
Posts: 6
Joined: Sat Feb 25, 2017 4:07 pm

Re: Lone Wolf triggers at incorrect distance to big units

Post by Soldier9 »

bountygiver wrote:this is due to each unit has a position property and even with big units, only 1 out of 4 tiles is their actual position, and these abilities only consider the distance of such property between 2 units.
Their size is taken into account for stuff like LOS though. But because of this oversight in the vanilla TileDistanceBetween() method of the XComGameState_Unit class it is not taken into account for abilities like this.
I would argue that it is a bug that ought to be fixed, but it will probably affect a lot of other stuff as well since this method is used a lot of places (I assume).
bountygiver
Posts: 74
Joined: Mon Feb 27, 2017 3:33 am

Re: Lone Wolf triggers at incorrect distance to big units

Post by bountygiver »

Soldier9 wrote:
bountygiver wrote:this is due to each unit has a position property and even with big units, only 1 out of 4 tiles is their actual position, and these abilities only consider the distance of such property between 2 units.
Their size is taken into account for stuff like LOS though. But because of this oversight in the vanilla TileDistanceBetween() method of the XComGameState_Unit class it is not taken into account for abilities like this.
I would argue that it is a bug that ought to be fixed, but it will probably affect a lot of other stuff as well since this method is used a lot of places (I assume).
yup just LOS, even weapon range bonus is affected by this. But then fixing it would mean changing the rules to edge to edge instead of "center" to "center". Not sure if fixing it is better or clarifying how distance between units work is better.
tracktwo
Long War Dev
Posts: 241
Joined: Sat Jan 07, 2017 7:43 pm

Re: Lone Wolf triggers at incorrect distance to big units

Post by tracktwo »

Yeah, there are several bugs with large units. I also think but haven't been able to confirm that they are more liable to wander into hazards or step on explosive things than single-tile units because the pathing doesn't seem to consider the unit size (although it's all native so it's hard to say for certain).
Post Reply