mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-26 13:50:53 +00:00
Some minor fixes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5375 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
9069013dc5
commit
f416201c66
5 changed files with 60 additions and 62 deletions
|
@ -614,6 +614,27 @@ ELSE()
|
|||
)
|
||||
SET_TARGET_PROPERTIES(iqmtool PROPERTIES COMPILE_DEFINITIONS "${FTE_REVISON}")
|
||||
|
||||
IF(1)
|
||||
ADD_EXECUTABLE(ftemaster
|
||||
${FTESV_ARCH_FILES}
|
||||
engine/server/sv_master.c
|
||||
engine/common/net_wins.c
|
||||
engine/common/cvar.c
|
||||
engine/common/cmd.c
|
||||
engine/common/sha1.c #for websockets
|
||||
engine/http/httpclient.c #for the pipe stuff
|
||||
engine/common/log.c
|
||||
engine/common/fs.c
|
||||
engine/common/fs_stdio.c
|
||||
engine/common/common.c
|
||||
engine/common/translate.c
|
||||
engine/common/zone.c
|
||||
engine/qclib/hash.c
|
||||
)
|
||||
SET_TARGET_PROPERTIES(ftemaster PROPERTIES COMPILE_DEFINITIONS "MASTERONLY;${FTE_LIB_DEFINES};${FTESV_DEFINES};${FTE_REVISON}")
|
||||
TARGET_LINK_LIBRARIES(ftemaster ${FTESV_LIBS})
|
||||
ENDIF()
|
||||
|
||||
ADD_EXECUTABLE(httpserver
|
||||
engine/common/fs_stdio.c
|
||||
engine/http/httpserver.c
|
||||
|
|
|
@ -2421,18 +2421,19 @@ void Key_Bind_f (void)
|
|||
int i, c, b, modifier;
|
||||
char cmd[1024];
|
||||
int bindmap = 0;
|
||||
|
||||
int level = Cmd_ExecLevel;
|
||||
qboolean isbindlevel = !strcmp("bindlevel", Cmd_Argv(0));
|
||||
if (!strcmp("in_bind", Cmd_Argv(0)))
|
||||
{
|
||||
bindmap = atoi(Cmd_Argv(1));
|
||||
Cmd_ShiftArgs(1, Cmd_ExecLevel==RESTRICT_LOCAL);
|
||||
Cmd_ShiftArgs(1, level==RESTRICT_LOCAL);
|
||||
}
|
||||
|
||||
c = Cmd_Argc();
|
||||
|
||||
if (c < 2)
|
||||
if (c < 2+isbindlevel)
|
||||
{
|
||||
Con_Printf ("bind <key> [command] : attach a command to a key\n");
|
||||
Con_Printf ("%s <key> %s[command] : attach a command to a key\n", Cmd_Argv(0), isbindlevel?"<level> ":"");
|
||||
return;
|
||||
}
|
||||
b = Key_StringToKeynum (Cmd_Argv(1), &modifier);
|
||||
|
@ -2442,6 +2443,25 @@ void Key_Bind_f (void)
|
|||
Con_Printf ("\"%s\" isn't a valid key\n", Cmd_Argv(1));
|
||||
return;
|
||||
}
|
||||
if (isbindlevel)
|
||||
{
|
||||
level = atoi(Cmd_Argv(2));
|
||||
if (Cmd_IsInsecure())
|
||||
level = Cmd_ExecLevel;
|
||||
else
|
||||
{
|
||||
if (level > RESTRICT_MAX)
|
||||
level = RESTRICT_INSECURE;
|
||||
else
|
||||
{
|
||||
if (level < RESTRICT_MIN)
|
||||
level = RESTRICT_MIN;
|
||||
if (level > Cmd_ExecLevel)
|
||||
level = Cmd_ExecLevel; //clamp exec levels, so we don't get more rights than we should.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bindmap)
|
||||
{
|
||||
if (bindmap <= 0 || bindmap > KEY_MODIFIER_ALTBINDMAP)
|
||||
|
@ -2459,7 +2479,7 @@ void Key_Bind_f (void)
|
|||
modifier = (bindmap-1) | KEY_MODIFIER_ALTBINDMAP;
|
||||
}
|
||||
|
||||
if (c == 2)
|
||||
if (c == 2+isbindlevel)
|
||||
{
|
||||
if (modifier == ~0) //modifier unspecified. default to no modifier
|
||||
modifier = 0;
|
||||
|
@ -2482,73 +2502,23 @@ void Key_Bind_f (void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (c > 3)
|
||||
if (c > 3+isbindlevel)
|
||||
{
|
||||
Cmd_ShiftArgs(1, Cmd_ExecLevel==RESTRICT_LOCAL);
|
||||
Key_SetBinding (b, modifier, Cmd_Args(), Cmd_ExecLevel);
|
||||
Cmd_ShiftArgs(1+isbindlevel, level==RESTRICT_LOCAL);
|
||||
Key_SetBinding (b, modifier, Cmd_Args(), level);
|
||||
return;
|
||||
}
|
||||
|
||||
// copy the rest of the command line
|
||||
cmd[0] = 0; // start out with a null string
|
||||
for (i=2 ; i< c ; i++)
|
||||
for (i=2+isbindlevel ; i< c ; i++)
|
||||
{
|
||||
Q_strncatz (cmd, Cmd_Argv(i), sizeof(cmd));
|
||||
if (i != (c-1))
|
||||
Q_strncatz (cmd, " ", sizeof(cmd));
|
||||
}
|
||||
|
||||
Key_SetBinding (b, modifier, cmd, Cmd_ExecLevel);
|
||||
}
|
||||
|
||||
void Key_BindLevel_f (void)
|
||||
{
|
||||
int i, c, b, modifier;
|
||||
char cmd[1024];
|
||||
|
||||
c = Cmd_Argc();
|
||||
|
||||
if (c != 2 && c != 4)
|
||||
{
|
||||
Con_Printf ("%s <key> [<level> <command>] : attach a command to a key for a specific level of access\n", Cmd_Argv(0));
|
||||
return;
|
||||
}
|
||||
b = Key_StringToKeynum (Cmd_Argv(1), &modifier);
|
||||
if (b==-1)
|
||||
{
|
||||
if (cl_warncmd.ival)
|
||||
Con_Printf ("\"%s\" isn't a valid key\n", Cmd_Argv(1));
|
||||
return;
|
||||
}
|
||||
|
||||
if (modifier == ~0) //modifier unspecified. default to no modifier
|
||||
modifier = 0;
|
||||
|
||||
if (c == 2)
|
||||
{
|
||||
if (keybindings[b][modifier])
|
||||
Con_Printf ("\"%s\" (%i)= \"%s\"\n", Cmd_Argv(1), bindcmdlevel[b][modifier], keybindings[b][modifier] );
|
||||
else
|
||||
Con_Printf ("\"%s\" is not bound\n", Cmd_Argv(1) );
|
||||
return;
|
||||
}
|
||||
|
||||
if (Cmd_IsInsecure())
|
||||
{
|
||||
Con_Printf("Server attempted usage of %s\n", Cmd_Argv(0));
|
||||
return;
|
||||
}
|
||||
|
||||
// copy the rest of the command line
|
||||
cmd[0] = 0; // start out with a null string
|
||||
for (i=3 ; i< c ; i++)
|
||||
{
|
||||
Q_strncatz (cmd, Cmd_Argv(i), sizeof(cmd));
|
||||
if (i != (c-1))
|
||||
Q_strncatz (cmd, " ", sizeof(cmd));
|
||||
}
|
||||
|
||||
Key_SetBinding (b, modifier, cmd, atoi(Cmd_Argv(2)));
|
||||
Key_SetBinding (b, modifier, cmd, level);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2713,7 +2683,7 @@ void Key_Init (void)
|
|||
//
|
||||
Cmd_AddCommandAD ("bind",Key_Bind_f, Key_Bind_c, NULL);
|
||||
Cmd_AddCommand ("in_bind",Key_Bind_f);
|
||||
Cmd_AddCommand ("bindlevel",Key_BindLevel_f);
|
||||
Cmd_AddCommand ("bindlevel",Key_Bind_f);
|
||||
Cmd_AddCommandAD ("unbind",Key_Unbind_f, Key_Bind_c, NULL);
|
||||
Cmd_AddCommand ("unbindall",Key_Unbindall_f);
|
||||
|
||||
|
|
|
@ -3986,7 +3986,7 @@ static void Cmd_WriteConfig_f(void)
|
|||
MasterInfo_WriteServers();
|
||||
#endif
|
||||
|
||||
f = FS_OpenWithFriends(fname, sysname, sizeof(sysname), 3, "quake.rc", "hexen.rc", "*.cfg", "configs/*.cfg");
|
||||
f = FS_OpenWithFriends(fname, sysname, sizeof(sysname), 4, "quake.rc", "hexen.rc", "*.cfg", "configs/*.cfg");
|
||||
|
||||
all = cfg_save_all.ival;
|
||||
}
|
||||
|
|
|
@ -159,6 +159,7 @@ void Cmd_ExecuteString (const char *text, int restrictionlevel);
|
|||
|
||||
void Cmd_Args_Set(const char *newargs, size_t len);
|
||||
|
||||
//higher levels have greater access, BUT BE SURE TO CHECK Cmd_IsInsecure()
|
||||
#define RESTRICT_MAX_TOTAL 31
|
||||
#define RESTRICT_MAX_USER 29
|
||||
#define RESTRICT_DEFAULT 20
|
||||
|
|
|
@ -36,6 +36,12 @@ extern qlpMTex2FUNC qglMultiTexCoord2fARB;
|
|||
#define GL_CLAMP_TO_EDGE 0x812F
|
||||
//#endif
|
||||
|
||||
|
||||
#ifndef GL_MAX_ARRAY_TEXTURE_LAYERS
|
||||
#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF /*opengl 3.0*/
|
||||
#endif
|
||||
|
||||
|
||||
// Added to make morphos and mingw32 crosscompilers to work
|
||||
/*
|
||||
./gl/gl_draw.c: In function `GL_Upload32_BGRA':
|
||||
|
|
Loading…
Reference in a new issue