mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 06:50:43 -05:00
Fixed issue with water bottles having no upd
object in rare cases killing client
This commit is contained in:
parent
ddd5d69eda
commit
b9973e609f
@ -127,6 +127,11 @@ export class HealthController
|
||||
const consumedItemMaxResource = this.itemHelper.getItem(itemToConsume._tpl)[1]._props.MaxResource;
|
||||
if (consumedItemMaxResource > 1)
|
||||
{
|
||||
if (!itemToConsume.upd)
|
||||
{
|
||||
itemToConsume.upd = {};
|
||||
}
|
||||
|
||||
if (itemToConsume.upd.FoodDrink === undefined)
|
||||
{
|
||||
itemToConsume.upd.FoodDrink = { HpPercent: consumedItemMaxResource - request.count };
|
||||
|
Loading…
x
Reference in New Issue
Block a user