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:
@@ -1078,11 +1078,10 @@ COMMAND(deletetextureslot, "iss");
|
||||
void edittextureslot(int *n, char *scale, char *name) // edit slot parameters != ""
|
||||
{
|
||||
string res = "";
|
||||
EDIT("edittextureslot");
|
||||
if(slots.inrange(*n))
|
||||
{
|
||||
Slot &s = slots[*n];
|
||||
if((*scale || *name) && !multiplayer("edittextureslot"))
|
||||
if((*scale || *name) && !noteditmode("edittextureslot") && !multiplayer("edittextureslot"))
|
||||
{ // change attributes
|
||||
float newscale = atof(scale);
|
||||
_texture(s, *scale ? &newscale : NULL, *name ? name : NULL);
|
||||
@@ -1097,6 +1096,7 @@ COMMAND(edittextureslot, "iss");
|
||||
|
||||
void gettextureorigin(char *fname)
|
||||
{
|
||||
if(!*fname) return;
|
||||
defformatstring(s)("packages/textures/%s", fname);
|
||||
findfile(path(s), "r");
|
||||
const char *res = s;
|
||||
|
||||
Reference in New Issue
Block a user