fix permissions for some edit commands

- always allow read-only edittextureslot, editmapmodelslot and
  editmapsoundslot
- allow setvantagepoint when editing offline or spectating offline
- new var editing_sp: 1 during edit mode in singleplayer (offline)
- additional menus for read-only access to map config slots
- new bonus edit scripts: selectmiddle and unclipentclippedmodels

DOCREF edittextureslot editmapmodelslot editmapsoundslot setvantagepoint
DOCREF editing_sp
This commit is contained in:
ac-stef
2017-06-14 16:33:58 +02:00
parent 9bb9cc280b
commit d7277c1aa4
8 changed files with 227 additions and 65 deletions
+2
View File
@@ -24,6 +24,7 @@ int lasttype = 0, lasttex = 0;
sqr rtex;
VAR(editing, 1, 0, 0);
VAR(editing_sp, 1, 0, 0);
VAR(unsavededits, 1, 0, 0);
VAR(editmetakeydown, 1, 0, 0);
@@ -55,6 +56,7 @@ void toggleedit(bool force)
}
keyrepeat(editmode);
editing = editmode ? 1 : 0;
editing_sp = editmode && !multiplayer(NULL) ? 1 : 0;
player1->state = editing ? CS_EDITING : (watchingdemo ? CS_SPECTATE : CS_ALIVE);
if(editing && player1->onladder) player1->onladder = false;
if(editing && (player1->weaponsel->type == GUN_SNIPER && ((sniperrifle *)player1->weaponsel)->scoped)) ((sniperrifle *)player1->weaponsel)->onownerdies(); // or ondeselecting()