Replace the bitshift optimizations for multiplication (#7590)

* These were originally bitshifts because it was 'faster', but now with modern compilers and hardware, the only thing it does now is confuse developers who have to read the code
This commit is contained in:
Vincent Stumpf
2023-02-08 16:00:11 -08:00
committed by GitHub
parent 7313495185
commit 6938722f02
7 changed files with 71 additions and 69 deletions

View File

@@ -2618,7 +2618,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
//TODO: Determine if this should go before calculating the MVP player instead of after.
if (UINT_MAX - md->dmglog[0].dmg > md->tdmg) {
md->tdmg += md->dmglog[0].dmg;
md->dmglog[0].dmg<<=1;
md->dmglog[0].dmg *= 2;
} else {
md->dmglog[0].dmg+= UINT_MAX - md->tdmg;
md->tdmg = UINT_MAX;