allow more edit commands in multiplayer

(editentity, edittextureslot, editmapmodelslot, editmapsoundslot)

the commands are still not allowed to change anything in coop, but
information retrieval is ok
This commit is contained in:
ac-stef
2017-06-09 21:52:55 +02:00
parent fcb3481e23
commit b2890a3334
4 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -485,13 +485,13 @@ void editentity(char **args, int numargs) // index x y z a1 a2 a3 a4 ...
if(numargs > 0)
{
int n = ATOI(args[0]);
EDITMP("editentity");
EDIT("editentity");
if(!*args[0] || !ents.inrange(n)) return;
entity &e = ents[n];
bool edit = false;
for(int i = 1; i < numargs; i++) if(*args[i]) edit = true; // only arguments other than empty strings can edit anything - otherwise we're just browsing
int t = e.type < MAXENTTYPES ? e.type : NOTUSED;
if(edit)
if((edit) && !multiplayer("editentity"))
{
if(e.type == SOUND)
{ // disable sound /before/ changing it