fix some of the things that baker didn't like. sorry it took so long.
try to appease msvc6, just because. update the downloads menu. now even betterer!... fix proquake server angle snapping precision issue. also accept _glow textures as an alternative to the more standard _luma. compat for dp_water shader terms. tcgen stuff is still fscked up. menu tooltip code can now properly deal with variable width etc stuff. add missing te_flamejet builtin. r_dynamic -1 can now cope with q3bsp for a small speedup. added -watch commandline arg, to make it easier to figure out where cvar changes are coming from. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5015 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
8d2af6ff7b
commit
c08a0aa139
104 changed files with 3629 additions and 2828 deletions
|
@ -169,6 +169,7 @@ queryrequest_t *SQL_PullRequest(sqlserver_t *server, qboolean lock)
|
|||
sqlserver_t **sqlservers;
|
||||
int sqlservercount;
|
||||
int sqlavailable;
|
||||
int sqlinited;
|
||||
|
||||
#ifdef USE_SQLITE
|
||||
//this is to try to sandbox sqlite so it can only edit the file its originally opened with.
|
||||
|
@ -821,6 +822,9 @@ int SQL_NewServer(const char *driver, const char **paramstr)
|
|||
else // invalid driver choice so we bomb out
|
||||
return -1;
|
||||
|
||||
if (!SQL_Available()) //also makes sure the drivers are actually loaded.
|
||||
return -1;
|
||||
|
||||
if (!(sqlavailable & (1u<<drvchoice)))
|
||||
return -1;
|
||||
|
||||
|
@ -1020,6 +1024,25 @@ const char *SQL_Info(sqlserver_t *server)
|
|||
|
||||
qboolean SQL_Available(void)
|
||||
{
|
||||
if (!sqlinited)
|
||||
{
|
||||
sqlinited = true;
|
||||
#ifdef USE_MYSQL
|
||||
//mysql pokes network etc. there's no sandbox. people can use quake clients to pry upon private databases.
|
||||
if (COM_CheckParm("-mysql"))
|
||||
if (SQL_MYSQLInit())
|
||||
sqlavailable |= 1u<<SQLDRV_MYSQL;
|
||||
#endif
|
||||
#ifdef USE_SQLITE
|
||||
//our sqlite implementation is sandboxed. we block database attachments, and restrict the master database name.
|
||||
sqlitehandle = Sys_LoadLibrary("sqlite3", sqlitefuncs);
|
||||
if (sqlitehandle)
|
||||
{
|
||||
sqlavailable |= 1u<<SQLDRV_SQLITE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return !!sqlavailable;
|
||||
}
|
||||
|
||||
|
@ -1029,10 +1052,22 @@ void SQL_Status_f(void)
|
|||
int i;
|
||||
char *stat;
|
||||
|
||||
if (!SQL_Available())
|
||||
Con_Printf("No SQL library available.\n");
|
||||
SQL_Available(); //also ensures any drivers are loaded.
|
||||
#ifdef USE_MYSQL
|
||||
if (!COM_CheckParm("-mysql"))
|
||||
Con_Printf("mysql: %s\n", "requires -mysql cmdline argument");
|
||||
else
|
||||
Con_Printf("%i connections\n", sqlservercount);
|
||||
Con_Printf("mysql: %s\n", (sqlavailable&(1u<<SQLDRV_MYSQL))?"loaded":"unavailable");
|
||||
#else
|
||||
Con_Printf("mysql: %s\n", "disabled at compile time");
|
||||
#endif
|
||||
#ifdef USE_SQLITE
|
||||
Con_Printf("sqlite: %s\n", (sqlavailable&(1u<<SQLDRV_SQLITE))?"loaded":"unavailable");
|
||||
#else
|
||||
Con_Printf("sqlite: %s\n", "disabled at compile time");
|
||||
#endif
|
||||
|
||||
Con_Printf("%i connections\n", sqlservercount);
|
||||
for (i = 0; i < sqlservercount; i++)
|
||||
{
|
||||
int reqnum = 0;
|
||||
|
@ -1243,20 +1278,6 @@ qboolean SQL_MYSQLInit(void)
|
|||
void SQL_Init(void)
|
||||
{
|
||||
sqlavailable = 0;
|
||||
#ifdef USE_MYSQL
|
||||
//mysql pokes network etc. there's no sandbox. people can use quake clients to pry upon private databases.
|
||||
if (COM_CheckParm("-mysql"))
|
||||
if (SQL_MYSQLInit())
|
||||
sqlavailable |= 1u<<SQLDRV_MYSQL;
|
||||
#endif
|
||||
#ifdef USE_SQLITE
|
||||
//our sqlite implementation is sandboxed. we block database attachments, and restrict the master database name.
|
||||
sqlitehandle = Sys_LoadLibrary("sqlite3", sqlitefuncs);
|
||||
if (sqlitehandle)
|
||||
{
|
||||
sqlavailable |= 1u<<SQLDRV_SQLITE;
|
||||
}
|
||||
#endif
|
||||
|
||||
Cmd_AddCommand ("sqlstatus", SQL_Status_f);
|
||||
Cmd_AddCommand ("sqlkill", SQL_Kill_f);
|
||||
|
@ -1291,6 +1312,7 @@ void SQL_DeInit(void)
|
|||
sqlavailable = 0;
|
||||
|
||||
SQL_KillServers();
|
||||
sqlinited = false;
|
||||
|
||||
#ifdef USE_MYSQL
|
||||
if (qmysql_library_end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue