German supply depot resupply range

The german supply depot resupply range doesn’t coincide with what the supply radius widget indicates, i.e., a unit parked just inside of the circle drawn by the widget won’t actually resupply, you’d have to move the unit closer to the depot for it to get its ammo replenished.

To reproduce, just get any unit that uses ammo outside the range of a supply depot and have it fire at the ground to deplete its ammo. Afterward, move it just within range of the circle drawn by the supply radius widget.

I’m using svn rev 819. I haven’t checked if this happens with all the supply depots or just the german ones.

to what extent? some of it is just an angle thing, and the fact that the supply area is a sphere while the visible radius is just a circle (so differences in elevation can cause problems)

The supply area is a cylinder (you did set the 2D flag to true). The angle is an issue, though; the circle is drawn at the same level as the supplier. I could make it track the ground, at the cost of a little performance (probably not much though).

The widget now has the dots follow terrain (it still only updates on supply creation/destruction, though, to save performance).

Hmm, I noticed this on a map with relatively flat ground (Red Comet). I built the depot close to the north-west corner on the flat, level ground just north of the crater. I then moved the unit in need of resupply along the north edge of the map which is also flat, level ground.

The difference between the actual resupply range and the range indicated by the widget is not negligible, i.e., the actual range is about 75% of the widget range.

interesting. i’ve never noticed this but then again I haven’t paid too much attention. i usually make sure my units are a good deal inside just to be sure.

shuold be easy to figure this out.

I think I’ve found the problem: The gadget looks for the closest supplier, but just because the closest supplier isn’t in range doesn’t necessarily mean that no suppliers are in range (e.g. being just outside of the range of a small supply pile, but with a supply depot sitting right behind it). I’ll think up a solution.

Hopefully it’s fixed now; try it out.

Seems to work wonderfully Zerg. Supply range circles seem accurate, vehicles will get supplies if in range even if not in range of closest supply building, etc. Couldn’t find any problems.

Also I’m guessing under-construction structures shouldn’t be able to supply…

correct :wink:

Alright, that part’s done, hopefully it isn’t buggy.