MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / RemovePatch

Method RemovePatch

Source/Engine/Terrain/Terrain.cpp:507–525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

505}
506
507void Terrain::RemovePatch(const Int2& patchCoord)
508{
509 const auto patch = GetPatch(patchCoord);
510 if (patch == nullptr)
511 {
512 LOG(Warning, "Cannot remove patch at {0}x{1}. It does not exist.", patchCoord.X, patchCoord.Y);
513 return;
514 }
515
516 ::Delete(patch);
517 _patches.Remove(patch);
518
519 CacheNeighbors();
520
521 if (IsDuringPlay())
522 {
523 UpdateBounds();
524 }
525}
526
527#endif
528

Callers 2

UndoMethod · 0.80
DoMethod · 0.80

Calls 3

DeleteFunction · 0.85
GetPatchFunction · 0.70
RemoveMethod · 0.45

Tested by

no test coverage detected