Fix for damage system, and log

This commit is contained in:
Vortrex
2022-01-17 07:43:35 -06:00
parent 2706f2967e
commit 4068cb528e

View File

@@ -708,7 +708,9 @@ function playerDamagedByPlayer(client, damagerEntityName, weaponId, pedPiece, he
break;
case VRR_WEAPON_DAMAGE_EVENT_NORMAL:
getPlayerData(client).health = getPlayerData(client).health-(healthLoss*getPlayerData(client).incomingDamageMultiplier);
let reducedDamage = healthLoss*getPlayerData(client).incomingDamageMultiplier;
logToConsole(LOG_DEBUG, `[VRR.Client] ${getPlayerDisplayForConsole(client)}'s damager ${getPlayerDisplayForConsole(damagerEntity)} caused ${healthLoss} damage (damage reduction makes it ${reducedDamage})`);
getPlayerData(client).health = getPlayerData(client).health-reducedDamage;
setPlayerHealth(client, getPlayerData(client).health);
break;