I'm having a issue with a plugin I am working on. When a door is destroyed OnEntityDeath is called, but if the wall next to it is destroyed (so the door is automatically destroyed) it doesn't get called. Does anyone know if there any way around it as I need to remove the door from data once the wall is destroyed
Edit: I have worked around it, for future reference of others I did this
Code:List<BaseEntity> list = Pool.GetList<BaseEntity>(); Vis.Entities(entity.transform.position, 1f, list, layerMasks); foreach (var entry in list) { if (entry.name.ToLower().Contains("door.hinged")) { } }
Solved Hook to catch door death when doorway is destroyed?
Discussion in 'Rust Development' started by k1lly0u, Jan 10, 2016.