Reply To cazfi
Is this behavior correct?
It just exists... An effect may give regeneration to helicopters in airbases. Surely it's strange but hardly qualifies as a bug. There is a suggestion to rewrite hp_gain_coord totally on effects.
Reply To ihnatus
There is a suggestion to rewrite hp_gain_coord totally on effects.
That's what I were implementing when I came across this weirdness. Have ported equivalent functionality in the current versions of those patches.
I don't know if this is as it should be, but it's certainly what I've expected:
hp_gain_coord() has the basic unit healing as:
if (!unit_class_get(punit)->hp_loss_pct) {
hp += (base + 9) / 10;
}
That is; basic unit healing never applies to Helicopters (or other hp_loss_pct units), even when the HP loss is not happening to them at their current location (i.e. when they are in a city, airbase, or carrier).
Is this behavior correct?