MCPcopy Create free account
hub / github.com/assaultcube/AC / clearents

Function clearents

source/src/world.cpp:444–465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442COMMAND(entset, "sfffffff");
443
444void clearents(char *name)
445{
446 int type = findtype(name);
447 EDITMP("clearents");
448 bool found = false;
449 loopv(ents)
450 {
451 entity &e = ents[i];
452 if(e.type == type)
453 {
454 if(type == SOUND) deletesoundentity(e);
455 deleted_ents.add(e);
456 e.type = NOTUSED;
457 found = true;
458 }
459 }
460 switch(type)
461 {
462 case LIGHT: calclight(); break;
463 }
464 if(found) unsavededits++;
465}
466
467COMMAND(clearents, "s");
468

Callers

nothing calls this directly

Calls 2

findtypeFunction · 0.85
calclightFunction · 0.85

Tested by

no test coverage detected