mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-21 05:43:42 -07:00
Split damage multiplication into its own PR (#656)
* Split damage multiplication into its own PR * Found a more elegant implementation of the powers char*[]
This commit is contained in:
parent
cff73cccf0
commit
4d65a5ff73
2 changed files with 45 additions and 9 deletions
|
@ -3603,7 +3603,7 @@ s32 func_80837B18_modified(GlobalContext* globalCtx, Player* this, s32 damage, u
|
|||
s32 modifiedDamage = damage;
|
||||
if (modified)
|
||||
{
|
||||
modifiedDamage *= CVar_GetS32("gDamageMul", 1);
|
||||
modifiedDamage *= (1 << CVar_GetS32("gDamageMul", 0));
|
||||
}
|
||||
|
||||
return Health_ChangeBy(globalCtx, modifiedDamage);
|
||||
|
@ -3836,7 +3836,7 @@ s32 func_808382DC(Player* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->unk_A86 != 0) {
|
||||
if (!Player_InBlockingCsMode(globalCtx, this)) {
|
||||
Player_InflictDamageModified(globalCtx, -16 * CVar_GetS32("gVoidDamageMul", 1), false);
|
||||
Player_InflictDamageModified(globalCtx, -16 * (1 << CVar_GetS32("gVoidDamageMul", 0)), false);
|
||||
this->unk_A86 = 0;
|
||||
}
|
||||
}
|
||||
|
@ -8407,7 +8407,7 @@ s32 func_80843E64(GlobalContext* globalCtx, Player* this) {
|
|||
|
||||
impactInfo = &D_80854600[impactIndex];
|
||||
|
||||
if (Player_InflictDamageModified(globalCtx, impactInfo->damage * CVar_GetS32("gFallDamageMul", 1), false)) {
|
||||
if (Player_InflictDamageModified(globalCtx, impactInfo->damage * (1 << CVar_GetS32("gFallDamageMul", 0)), false)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue