Fixed StatusEffects being multiplied by deltatime when a client uses an item with the "use on self" buttons (even though the effect should be instantaneous). Caused effects with no duration to do almost nothing, making calyxanide and other meds with instantaneous effects basically useless. Closes #587
This commit is contained in:
@@ -402,7 +402,8 @@ namespace Barotrauma
|
||||
ushort targetID = msg.ReadUInt16();
|
||||
|
||||
Character target = FindEntityByID(targetID) as Character;
|
||||
ApplyStatusEffects(actionType, (float)Timing.Step, target, true);
|
||||
//ignore deltatime - using an item with the useOnSelf buttons is instantaneous
|
||||
ApplyStatusEffects(actionType, 1.0f, target, true);
|
||||
break;
|
||||
case NetEntityEvent.Type.ChangeProperty:
|
||||
ReadPropertyChange(msg);
|
||||
|
||||
@@ -1457,7 +1457,7 @@ namespace Barotrauma
|
||||
case NetEntityEvent.Type.ApplyStatusEffect:
|
||||
if (c.Character == null || !c.Character.CanInteractWith(this)) return;
|
||||
|
||||
ApplyStatusEffects(ActionType.OnUse, (float)Timing.Step, c.Character);
|
||||
ApplyStatusEffects(ActionType.OnUse, 1.0f, c.Character);
|
||||
|
||||
if (ContainedItems == null || ContainedItems.All(i => i == null))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user