add undelete for entities
BACKSPACE in combination with editmeta (LCTRL) now undeletes the last deleted entity. BACKSPACE in combination with editmeta2 (LSHIFT) brings up the menu "deleted entities". The edit menu now has a submenu "deleted entities" which lists all deleted entities and undeletes the selected one. undelent [<index>] If no index is specified, the last deleted entity is restored. If an index is given, the specified entity from the list of deleted entities is restored. getdeletedentities Returns a list of deleted entities. Each line contains the entity type, the position and all seven attributes. unlistdeletedentity [<which>] If <which> is a number, the specified entry from the list of deleted entities gets removed. If <which> is "all", the whole list of deleted entities gets deleted. If <which> is "last" the last deleted entity is removed from the list of deleted entities. Returns the number of entities on the list of deleted entities (even if the parameter <which> was unknown or not specified). DOCREF undelent getdeletedentities unlistdeletedentity
This commit is contained in:
@@ -166,6 +166,7 @@ void deletemapmodelslot(int *n, char *opt) // delete mapmodel slot - only if unu
|
||||
entity &e = ents[i];
|
||||
if(e.attr2 == *n)
|
||||
{ // delete entity
|
||||
deleted_ents.add(e);
|
||||
memset(&e, 0, sizeof(persistent_entity));
|
||||
e.type = NOTUSED;
|
||||
deld++;
|
||||
|
||||
Reference in New Issue
Block a user