I thought it was odd this function did not go through and implement the entity spawner (Making it a none networked item removal), but Chiko tried to use this to remove a single use item that should leave nothing behind from the hand.
The item did not vanish/be deleted immediately, instead it stayed in his hand (While this code directly calls the remove() code).
The first time he removed it (Hand - > Inventory), a console error occurred.
The second time removed his game crashed on the physics step:
Exception: Referencia a objeto no establecida como instancia de un objeto.
Target site: Void ProcessRemovedBodies()
Stack trace:
en FarseerPhysics.Dynamics.World.ProcessRemovedBodies() en E:\Barotrauma\Libraries\Farseer Physics Engine 3.5\Dynamics\World.cs:línea 370
en FarseerPhysics.Dynamics.World.ProcessChanges() en E:\Barotrauma\Libraries\Farseer Physics Engine 3.5\Dynamics\World.cs:línea 1190
en FarseerPhysics.Dynamics.World.Step(Single dt) en E:\Barotrauma\Libraries\Farseer Physics Engine 3.5\Dynamics\World.cs:línea 1213
en Barotrauma.GameScreen.Update(Double deltaTime) en E:\Barotrauma\Barotrauma\BarotraumaShared\Source\Screens\GameScreen.cs:línea 132
en Barotrauma.GameMain.Update(GameTime gameTime) en E:\Barotrauma\Barotrauma\BarotraumaClient\Source\GameMain.cs:línea 414
en Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime)
en Microsoft.Xna.Framework.Game.Tick()
en MonoGame.Framework.WinFormsGameWindow.RunLoop()
en MonoGame.Framework.WinFormsGamePlatform.RunLoop()
en Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
en Barotrauma.Program.Main() en E:\Barotrauma\Barotrauma\BarotraumaClient\Source\Program.cs:línea 41
I just noticed and figure I would add it as a note to this issue, but Item.cs SecondaryUse 's check for DeleteOnUse does not remove using the entity spawner still.
Version 0.8.0.4
I thought it was odd this function did not go through and implement the entity spawner (Making it a none networked item removal), but Chiko tried to use this to remove a single use item that should leave nothing behind from the hand.
The item did not vanish/be deleted immediately, instead it stayed in his hand (While this code directly calls the remove() code).
The first time he removed it (Hand - > Inventory), a console error occurred.
The second time removed his game crashed on the physics step: