forked from github/server
miniature is_mage get_mage optimization
This commit is contained in:
parent
6265abac74
commit
86e265c7c4
|
@ -1429,13 +1429,14 @@ int movement_speed(const unit * u)
|
|||
|
||||
/* Im Astralraum sind Tyb und Ill-Magier doppelt so schnell.
|
||||
* Nicht kumulativ mit anderen Beschleunigungen! */
|
||||
if (mp * dk <= BP_WALKING * u_race(u)->speed && is_astral(u->region)
|
||||
&& is_mage(u)) {
|
||||
sc_mage *mage = get_mage_depr(u);
|
||||
if (mage->magietyp == M_TYBIED || mage->magietyp == M_ILLAUN) {
|
||||
if (mp * dk <= BP_WALKING * u_race(u)->speed && is_astral(u->region)) {
|
||||
sc_mage *mage = get_mage(u);
|
||||
if (mage && (mage->magietyp == M_TYBIED || mage->magietyp == M_ILLAUN)) {
|
||||
if (has_skill(u, SK_MAGIC)) {
|
||||
mp *= 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (int)(dk * mp);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue