| 880 | } |
| 881 | |
| 882 | void Terrain::OnDisable() |
| 883 | { |
| 884 | GetScene()->Navigation.Actors.Remove(this); |
| 885 | GetSceneRendering()->RemoveActor(this, _sceneRenderingKey); |
| 886 | #if TERRAIN_USE_PHYSICS_DEBUG |
| 887 | GetSceneRendering()->RemovePhysicsDebug(this); |
| 888 | #endif |
| 889 | void* scene = GetPhysicsScene()->GetPhysicsScene(); |
| 890 | for (int32 i = 0; i < _patches.Count(); i++) |
| 891 | { |
| 892 | auto patch = _patches[i]; |
| 893 | if (patch->_physicsActor) |
| 894 | PhysicsBackend::RemoveSceneActor(scene, patch->_physicsActor); |
| 895 | } |
| 896 | |
| 897 | // Base |
| 898 | Actor::OnDisable(); |
| 899 | } |
| 900 | |
| 901 | void Terrain::OnTransformChanged() |
| 902 | { |
nothing calls this directly
no test coverage detected