mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 13:47:58 +03:00
Add HTTP support and update checking
This commit is contained in:
parent
2c72908f76
commit
01381ed084
104 changed files with 111355 additions and 25 deletions
|
@ -127,6 +127,7 @@ cvar_t *precache;
|
|||
cvar_t *com_target_game;
|
||||
cvar_t *com_target_version;
|
||||
cvar_t *com_target_demo;
|
||||
cvar_t *com_updateCheckInterval;
|
||||
|
||||
int protocol_version_demo;
|
||||
int protocol_version_full;
|
||||
|
@ -1918,6 +1919,9 @@ void Com_Init( char *commandLine ) {
|
|||
#ifdef LEGACY_PROTOCOL
|
||||
com_legacyprotocol = Cvar_Get("com_legacyprotocol", va("%i", PROTOCOL_LEGACY_VERSION), CVAR_INIT);
|
||||
|
||||
com_updateCheckInterval = Cvar_Get("com_updateCheckInterval", "15", 0);
|
||||
Cvar_CheckRange(com_updateCheckInterval, 5, 240, qtrue);
|
||||
|
||||
// Keep for compatibility with old mods / mods that haven't updated yet.
|
||||
if(com_legacyprotocol->integer > 0)
|
||||
Cvar_Get("protocol", com_legacyprotocol->string, CVAR_SERVERINFO | CVAR_ROM);
|
||||
|
@ -2455,6 +2459,8 @@ void Com_Frame( void ) {
|
|||
|
||||
Com_ReadFromPipe();
|
||||
|
||||
Sys_ProcessBackgroundTasks();
|
||||
|
||||
com_frameNumber++;
|
||||
}
|
||||
|
||||
|
@ -3103,8 +3109,6 @@ int QDECL Com_strCompare( const void *a, const void *b )
|
|||
|
||||
void Com_InitTargetGameWithType(target_game_e target_game, qboolean bIsDemo)
|
||||
{
|
||||
const char* protocol;
|
||||
|
||||
switch (target_game)
|
||||
{
|
||||
case TG_MOH:
|
||||
|
|
22875
code/qcommon/json.hpp
Normal file
22875
code/qcommon/json.hpp
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1060,6 +1060,7 @@ extern cvar_t* con_autochat;
|
|||
extern cvar_t* com_target_version;
|
||||
extern cvar_t* com_target_game;
|
||||
extern cvar_t* com_target_demo;
|
||||
extern cvar_t* com_updateCheckInterval;
|
||||
|
||||
extern int protocol_version_demo;
|
||||
extern int protocol_version_full;
|
||||
|
@ -1463,6 +1464,8 @@ dialogResult_t Sys_Dialog( dialogType_t type, const char *message, const char *t
|
|||
void Sys_RemovePIDFile( const char *gamedir );
|
||||
void Sys_InitPIDFile( const char *gamedir );
|
||||
|
||||
void Sys_ProcessBackgroundTasks();
|
||||
|
||||
/* This is based on the Adaptive Huffman algorithm described in Sayood's Data
|
||||
* Compression book. The ranks are not actually stored, but implicitly defined
|
||||
* by the location of a node within a doubly-linked list */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue