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