MCPcopy Create free account
hub / github.com/crownengine/crown / unit_destroyed_callback

Method unit_destroyed_callback

src/world/render_world.cpp:1889–1918  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1887}
1888
1889void RenderWorld::unit_destroyed_callback(UnitId unit)
1890{
1891 {
1892 LodGroupId first = lod_group_instance(unit);
1893
1894 if (is_valid(first))
1895 _lod_group_manager.destroy(first);
1896 }
1897
1898 {
1899 MeshId first = mesh_instance(unit);
1900
1901 if (is_valid(first))
1902 mesh_destroy(first);
1903 }
1904
1905 {
1906 SpriteId first = sprite_instance(unit);
1907
1908 if (is_valid(first))
1909 sprite_destroy(first);
1910 }
1911
1912 {
1913 LightId first = light_instance(unit);
1914
1915 if (is_valid(first))
1916 light_destroy(first);
1917 }
1918}
1919
1920void RenderWorld::reload_materials(const MaterialResource *old_resource, const MaterialResource *new_resource)
1921{

Callers 1

Calls 1

destroyMethod · 0.45

Tested by

no test coverage detected