From 7f86ae8d9f7d45849bf0ff6c2e18ebc07b65faea Mon Sep 17 00:00:00 2001 From: ac-stef Date: Mon, 5 Oct 2015 14:22:59 +0200 Subject: [PATCH] new command getclosestent getclosestent Returns the entity index number of the closest entity (or of the pinned entity, if one exists). Returns -1, if no entities are on the map. Returns always exactly the entity, that edit commands like delent will use next. DOCREF getclosestent --- source/src/world.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/src/world.cpp b/source/src/world.cpp index 4c16a2d3..8f1bc8ea 100644 --- a/source/src/world.cpp +++ b/source/src/world.cpp @@ -174,6 +174,7 @@ int closestent() // used for delent and edit mode ent display } return best; } +COMMANDF(getclosestent, "", () { intret(closestent()); }); void entproperty(int *prop, float *famount, int *unscaled) {