* Merge unified-sdl to trunk
* Bump Q3_VERSION to 1.35
This commit is contained in:
parent
39abffeb3b
commit
672cfbf16f
188 changed files with 5071 additions and 41739 deletions
|
@ -1439,7 +1439,7 @@ int StringsMatch(bot_matchpiece_t *pieces, bot_match_t *match)
|
|||
//if the last piece was a variable string
|
||||
if (lastvariable >= 0)
|
||||
{
|
||||
assert( match->variables[lastvariable].offset >= 0 ); // bk001204
|
||||
assert( match->variables[lastvariable].offset >= 0 );
|
||||
match->variables[lastvariable].length =
|
||||
strlen(&match->string[ (int) match->variables[lastvariable].offset]);
|
||||
} //end if
|
||||
|
@ -1500,7 +1500,7 @@ void BotMatchVariable(bot_match_t *match, int variable, char *buf, int size)
|
|||
{
|
||||
if (match->variables[variable].length < size)
|
||||
size = match->variables[variable].length+1;
|
||||
assert( match->variables[variable].offset >= 0 ); // bk001204
|
||||
assert( match->variables[variable].offset >= 0 );
|
||||
strncpy(buf, &match->string[ (int) match->variables[variable].offset], size-1);
|
||||
buf[size-1] = '\0';
|
||||
} //end if
|
||||
|
@ -2316,7 +2316,7 @@ int BotExpandChatMessage(char *outmessage, char *message, unsigned long mcontext
|
|||
} //end if
|
||||
if (match->variables[num].offset >= 0)
|
||||
{
|
||||
assert( match->variables[num].offset >= 0 ); // bk001204
|
||||
assert( match->variables[num].offset >= 0 );
|
||||
ptr = &match->string[ (int) match->variables[num].offset];
|
||||
for (i = 0; i < match->variables[num].length; i++)
|
||||
{
|
||||
|
|
|
@ -176,22 +176,22 @@ typedef struct bot_goalstate_s
|
|||
float avoidgoaltimes[MAX_AVOIDGOALS]; //times to avoid the goals
|
||||
} bot_goalstate_t;
|
||||
|
||||
bot_goalstate_t *botgoalstates[MAX_CLIENTS + 1]; // bk001206 - FIXME: init?
|
||||
bot_goalstate_t *botgoalstates[MAX_CLIENTS + 1]; // FIXME: init?
|
||||
//item configuration
|
||||
itemconfig_t *itemconfig = NULL; // bk001206 - init
|
||||
itemconfig_t *itemconfig = NULL;
|
||||
//level items
|
||||
levelitem_t *levelitemheap = NULL; // bk001206 - init
|
||||
levelitem_t *freelevelitems = NULL; // bk001206 - init
|
||||
levelitem_t *levelitems = NULL; // bk001206 - init
|
||||
levelitem_t *levelitemheap = NULL;
|
||||
levelitem_t *freelevelitems = NULL;
|
||||
levelitem_t *levelitems = NULL;
|
||||
int numlevelitems = 0;
|
||||
//map locations
|
||||
maplocation_t *maplocations = NULL; // bk001206 - init
|
||||
maplocation_t *maplocations = NULL;
|
||||
//camp spots
|
||||
campspot_t *campspots = NULL; // bk001206 - init
|
||||
campspot_t *campspots = NULL;
|
||||
//the game type
|
||||
int g_gametype = 0; // bk001206 - init
|
||||
int g_gametype = 0;
|
||||
//additional dropped item weight
|
||||
libvar_t *droppedweight = NULL; // bk001206 - init
|
||||
libvar_t *droppedweight = NULL;
|
||||
|
||||
//========================================================================
|
||||
//
|
||||
|
|
|
@ -51,8 +51,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
//#define DEBUG_ELEVATOR
|
||||
//#define DEBUG_GRAPPLE
|
||||
|
||||
// bk001204 - redundant bot_avoidspot_t, see be_ai_move.h
|
||||
|
||||
//movement state
|
||||
//NOTE: the moveflags MFL_ONGROUND, MFL_TELEPORTED, MFL_WATERJUMP and
|
||||
// MFL_GRAPPLEPULL must be set outside the movement code
|
||||
|
|
|
@ -102,8 +102,6 @@ typedef struct bot_moveresult_s
|
|||
|
||||
#define bot_moveresult_t_cleared(x) bot_moveresult_t (x) = {0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, {0, 0, 0}}
|
||||
|
||||
// bk001204: from code/botlib/be_ai_move.c
|
||||
// TTimo 04/12/2001 was moved here to avoid dup defines
|
||||
typedef struct bot_avoidspot_s
|
||||
{
|
||||
vec3_t origin;
|
||||
|
|
|
@ -51,7 +51,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#define WEAPON_OFS(x) (size_t)&(((weaponinfo_t *)0)->x)
|
||||
#define PROJECTILE_OFS(x) (size_t)&(((projectileinfo_t *)0)->x)
|
||||
|
||||
//weapon definition // bk001212 - static
|
||||
//weapon definition
|
||||
static fielddef_t weaponinfo_fields[] =
|
||||
{
|
||||
{"number", WEAPON_OFS(number), FT_INT}, //weapon number
|
||||
|
|
|
@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
* name: be_interface.c // bk010221 - FIXME - DEAD code elimination
|
||||
* name: be_interface.c
|
||||
*
|
||||
* desc: bot library interface
|
||||
*
|
||||
|
@ -140,7 +140,7 @@ int Export_BotLibSetup(void)
|
|||
char *homedir, *gamedir;
|
||||
|
||||
bot_developer = LibVarGetValue("bot_developer");
|
||||
memset( &botlibglobals, 0, sizeof(botlibglobals) ); // bk001207 - init
|
||||
memset( &botlibglobals, 0, sizeof(botlibglobals) );
|
||||
//initialize byte swapping (litte endian etc.)
|
||||
// Swap_Init();
|
||||
homedir = LibVarGetString("homedir");
|
||||
|
@ -860,9 +860,9 @@ GetBotLibAPI
|
|||
============
|
||||
*/
|
||||
botlib_export_t *GetBotLibAPI(int apiVersion, botlib_import_t *import) {
|
||||
assert(import); // bk001129 - this wasn't set for baseq3/
|
||||
botimport = *import;
|
||||
assert(botimport.Print); // bk001129 - pars pro toto
|
||||
assert(import);
|
||||
botimport = *import;
|
||||
assert(botimport.Print);
|
||||
|
||||
Com_Memset( &be_botlib_export, 0, sizeof( be_botlib_export ) );
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ void *GetMemory(unsigned long size)
|
|||
{
|
||||
void *ptr;
|
||||
memoryblock_t *block;
|
||||
assert(botimport.GetMemory); // bk001129 - was NULL'ed
|
||||
assert(botimport.GetMemory);
|
||||
ptr = botimport.GetMemory(size + sizeof(memoryblock_t));
|
||||
block = (memoryblock_t *) ptr;
|
||||
block->id = MEM_ID;
|
||||
|
|
|
@ -669,7 +669,7 @@ void PC_AddBuiltinDefines(source_t *source)
|
|||
{
|
||||
char *string;
|
||||
int builtin;
|
||||
} builtin[] = { // bk001204 - brackets
|
||||
} builtin[] = {
|
||||
{ "__LINE__", BUILTIN_LINE },
|
||||
{ "__FILE__", BUILTIN_FILE },
|
||||
{ "__DATE__", BUILTIN_DATE },
|
||||
|
|
|
@ -706,14 +706,14 @@ int PS_ReadNumber(script_t *script, token_t *token)
|
|||
{
|
||||
c = *script->script_p;
|
||||
//check for a LONG number
|
||||
if ( (c == 'l' || c == 'L') // bk001204 - brackets
|
||||
if ( (c == 'l' || c == 'L')
|
||||
&& !(token->subtype & TT_LONG))
|
||||
{
|
||||
script->script_p++;
|
||||
token->subtype |= TT_LONG;
|
||||
} //end if
|
||||
//check for an UNSIGNED number
|
||||
else if ( (c == 'u' || c == 'U') // bk001204 - brackets
|
||||
else if ( (c == 'u' || c == 'U')
|
||||
&& !(token->subtype & (TT_UNSIGNED | TT_FLOAT)))
|
||||
{
|
||||
script->script_p++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue