fix itemThink
This commit is contained in:
@@ -404,18 +404,12 @@ namespace Barotrauma.Items.Components
|
||||
//called when isActive is true and condition > 0.0f
|
||||
public virtual void Update(float deltaTime, Camera cam)
|
||||
{
|
||||
#if SERVER
|
||||
GameMain.Lua.hook.Call("itemThink." + item.prefab.Identifier, new object[]{item});
|
||||
#endif
|
||||
ApplyStatusEffects(ActionType.OnActive, deltaTime);
|
||||
}
|
||||
|
||||
//called when isActive is true and condition == 0.0f
|
||||
public virtual void UpdateBroken(float deltaTime, Camera cam)
|
||||
{
|
||||
#if SERVER
|
||||
GameMain.Lua.hook.Call("itemThink." + item.prefab.Identifier, new object[]{item});
|
||||
#endif
|
||||
#if CLIENT
|
||||
StopSounds(ActionType.OnActive);
|
||||
#endif
|
||||
|
||||
@@ -1564,6 +1564,8 @@ namespace Barotrauma
|
||||
|
||||
aiTarget?.Update(deltaTime);
|
||||
|
||||
GameMain.Lua.hook.Call("itemThink." + prefab.Identifier, new object[] { this });
|
||||
|
||||
if (!isActive) { return; }
|
||||
|
||||
ApplyStatusEffects(ActionType.Always, deltaTime, character: (parentInventory as CharacterInventory)?.Owner as Character);
|
||||
|
||||
Reference in New Issue
Block a user