anegostudios / VintageStory-Issues

Vintage Story's public issue tracker for reporting bugs, crashes and the like
46 stars 16 forks source link

Bell entity crashes game when spawning disabled entities #768

Closed mintyogi closed 1 month ago

mintyogi commented 3 years ago

Game Version: 1.14.7 Platform: Windows Modded: Yes - NoMonsters

Description

With game version 1.14.7 and my mod, No Monsters 1.0.0 (which patches out drifters and locusts, but does not disable bells), the game crashes when a bell attempts to spawn disabled monsters.

How to reproduce

  1. Install and enable NoMonsters
  2. Spawn a bell
  3. Game crashes with this in the log:

Expected behavior

Bells should not try to spawn disabled entities

Logs

24.1.2021 12:22:33 [Fatal] System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Vintagestory.GameContent.AiTaskBellAlarm.trySpawnCreatures(Int32 maxquantity, Int32 range)
   at Vintagestory.GameContent.AiTaskBellAlarm.ContinueExecute(Single dt)
   at Vintagestory.GameContent.AiTaskManager.OnGameTick(Single dt)
   at Vintagestory.GameContent.EntityBehaviorTaskAI.OnGameTick(Single deltaTime)
   at Vintagestory.API.Common.Entities.Entity.OnGameTick(Single dt)
   at Vintagestory.API.Common.EntityAgent.OnGameTick(Single dt)
   at Vintagestory.GameContent.EntityBell.OnGameTick(Single dt)
   at Vintagestory.Server.ServerSystemEntitySimulation.TickEntities(Single dt)
   at Vintagestory.Server.ServerSystemEntitySimulation.OnServerTick(Single dt)
   at Vintagestory.Server.ServerMain.Process()
Craluminum2413 commented 1 month ago

Can't reproduce, I assume it was fixed