Renames "OnSecondaryUse" to "OnAim" for more sense

adds new "OnHudUse" to separate normal and self use
This commit is contained in:
Alex Noir
2017-12-10 13:39:00 +03:00
parent db7d5539e0
commit 00653c5aa4
12 changed files with 62 additions and 17 deletions
@@ -36,6 +36,7 @@ namespace Barotrauma
{
if (Items[slotIndex] == null) return false;
//Isn't this useless? Client isn't handling status effects. Plus, this doesn't send the ActionType so it can be wrong even.
#if CLIENT
if (GameMain.Client != null)
{
@@ -46,10 +47,10 @@ namespace Barotrauma
if (GameMain.Server != null)
{
GameMain.Server.CreateEntityEvent(Items[slotIndex], new object[] { NetEntityEvent.Type.ApplyStatusEffect, ActionType.OnUse, character.ID });
GameMain.Server.CreateEntityEvent(Items[slotIndex], new object[] { NetEntityEvent.Type.ApplyStatusEffect, ActionType.OnHudUse, character.ID });
}
Items[slotIndex].ApplyStatusEffects(ActionType.OnUse, 1.0f, character);
Items[slotIndex].ApplyStatusEffects(ActionType.OnHudUse, 1.0f, character);
return true;
}