Renames "OnSecondaryUse" to "OnAim" for more sense
adds new "OnHudUse" to separate normal and self use
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user