From looking at rts\sim\units\unit.cpp it does not look like that.A unit that fires 50 times a second and does a grand total of 1 dps to a larger unit, will have experience in the millions in just a few seconds.
Hopefully this illustrates the point.
That's why the pyro accumulates experience like crazy. Same for flashtanks and other rapid fire units.
Normal damage dealing:
Code: Select all
if (damage > 0.0f) {
recentDamage += damage;
if ((attacker != NULL) && !teamHandler->Ally(allyteam, attacker->allyteam)) {
attacker->AddExperience(0.1f * experienceMod
* (power / attacker->power)
* (damage + std::min(0.0f, health)) / maxHealth);
This looks like the unit who gets the actual kill gets a "bonus":
Code: Select all
if (health <= 0.0f) {
KillUnit(false, false, attacker);
if (isDead && (attacker != 0) &&
!teamHandler->Ally(allyteam, attacker->allyteam) && !beingBuilt) {
attacker->AddExperience(expMultiplier * 0.1f * (power / attacker->power));
teamHandler->Team(attacker->team)->currentStats->unitsKilled++;
Now I didnt look at this in detail but imo
