Support SLOW item stat (percentage, ideally 1.0 - 100.0%). If enough slow stacks then it will immobilize the entity completely (could not find any classic limit).
This commit is contained in:
parent
fd2a9566fe
commit
c5e9adc069
@ -2539,7 +2539,18 @@ float Entity::GetSpeed() {
|
|||||||
ret += stats[ITEM_STAT_OFFENSIVESPEED];
|
ret += stats[ITEM_STAT_OFFENSIVESPEED];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (stats.count(ITEM_STAT_SLOW)) {
|
||||||
|
float slowPct = stats[ITEM_STAT_SLOW];
|
||||||
|
if(slowPct > 99.9f) {
|
||||||
|
ret = 0.0f;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
float slow_multiplier = 1.0f - (slowPct / 100.0f);
|
||||||
|
ret = ret * slow_multiplier;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MStats.unlock();
|
MStats.unlock();
|
||||||
ret *= speed_multiplier;
|
ret *= speed_multiplier;
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user