mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-24 05:01:40 +00:00
First batch of bug fixes reported and patched by Zack "ZTurtleMan" Middleton:
#4736 #4730 #4731 #4732 #4733 #4735 #4736 #4737 #4738 #4739
This commit is contained in:
parent
392b246ee9
commit
83a3e2ae1b
6 changed files with 25 additions and 14 deletions
|
@ -2510,7 +2510,7 @@ int BotWantsToCamp(bot_state_t *bs) {
|
|||
//if the bot isn't healthy anough
|
||||
if (BotAggression(bs) < 50) return qfalse;
|
||||
//the bot should have at least have the rocket launcher, the railgun or the bfg10k with some ammo
|
||||
if ((bs->inventory[INVENTORY_ROCKETLAUNCHER] <= 0 || bs->inventory[INVENTORY_ROCKETS < 10]) &&
|
||||
if ((bs->inventory[INVENTORY_ROCKETLAUNCHER] <= 0 || bs->inventory[INVENTORY_ROCKETS] < 10) &&
|
||||
(bs->inventory[INVENTORY_RAILGUN] <= 0 || bs->inventory[INVENTORY_SLUGS] < 10) &&
|
||||
(bs->inventory[INVENTORY_BFG10K] <= 0 || bs->inventory[INVENTORY_BFGAMMO] < 10)) {
|
||||
return qfalse;
|
||||
|
|
|
@ -534,7 +534,7 @@ static void ArenaServers_UpdateMenu( void ) {
|
|||
pingColor = S_COLOR_RED;
|
||||
}
|
||||
|
||||
Com_sprintf( buff, MAX_LISTBOXWIDTH, "%-20.20s %-12.12s %2d/%2d %-8.8s %3s %s%3d " S_COLOR_YELLOW "%s",
|
||||
Com_sprintf( buff, MAX_LISTBOXWIDTH, "%-20.20s %-12.12s %2d/%2d %-8.8s %4s%s%3d " S_COLOR_YELLOW "%s",
|
||||
servernodeptr->hostname, servernodeptr->mapname, servernodeptr->numclients,
|
||||
servernodeptr->maxclients, servernodeptr->gamename,
|
||||
netnames[servernodeptr->nettype], pingColor, servernodeptr->pingtime, servernodeptr->bPB ? "Yes" : "No" );
|
||||
|
@ -672,6 +672,9 @@ static void ArenaServers_Insert( char* adrstr, char* info, int pingtime )
|
|||
}
|
||||
*/
|
||||
servernodeptr->nettype = atoi(Info_ValueForKey(info, "nettype"));
|
||||
if (servernodeptr->nettype < 0 || servernodeptr->nettype >= ARRAY_LEN(netnames)) {
|
||||
servernodeptr->nettype = 0;
|
||||
}
|
||||
|
||||
s = Info_ValueForKey( info, "game");
|
||||
i = atoi( Info_ValueForKey( info, "gametype") );
|
||||
|
|
|
@ -766,13 +766,13 @@ static void ServerOptions_Start( void ) {
|
|||
case GT_TEAM:
|
||||
trap_Cvar_SetValue( "ui_team_fraglimit", fraglimit );
|
||||
trap_Cvar_SetValue( "ui_team_timelimit", timelimit );
|
||||
trap_Cvar_SetValue( "ui_team_friendlt", friendlyfire );
|
||||
trap_Cvar_SetValue( "ui_team_friendly", friendlyfire );
|
||||
break;
|
||||
|
||||
case GT_CTF:
|
||||
trap_Cvar_SetValue( "ui_ctf_fraglimit", fraglimit );
|
||||
trap_Cvar_SetValue( "ui_ctf_capturelimit", flaglimit );
|
||||
trap_Cvar_SetValue( "ui_ctf_timelimit", timelimit );
|
||||
trap_Cvar_SetValue( "ui_ctf_friendlt", friendlyfire );
|
||||
trap_Cvar_SetValue( "ui_ctf_friendly", friendlyfire );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1239,7 +1239,7 @@ static void ServerOptions_MenuInit( qboolean multiplayer ) {
|
|||
|
||||
memset( &s_serveroptions, 0 ,sizeof(serveroptions_t) );
|
||||
s_serveroptions.multiplayer = multiplayer;
|
||||
s_serveroptions.gametype = (int)Com_Clamp( 0, 5, trap_Cvar_VariableValue( "g_gameType" ) );
|
||||
s_serveroptions.gametype = (int)Com_Clamp( 0, GT_MAX_GAME_TYPE - 1, trap_Cvar_VariableValue( "g_gameType" ) );
|
||||
s_serveroptions.punkbuster.curvalue = Com_Clamp( 0, 1, trap_Cvar_VariableValue( "sv_punkbuster" ) );
|
||||
|
||||
ServerOptions_Cache();
|
||||
|
|
|
@ -191,6 +191,8 @@ typedef int clipHandle_t;
|
|||
#define MAX_QINT 0x7fffffff
|
||||
#define MIN_QINT (-MAX_QINT-1)
|
||||
|
||||
#define ARRAY_LEN(x) (sizeof(x) / sizeof(*x))
|
||||
|
||||
|
||||
// angle indexes
|
||||
#define PITCH 0 // up / down
|
||||
|
|
|
@ -359,10 +359,10 @@ static void AutospriteDeform( void ) {
|
|||
vec3_t leftDir, upDir;
|
||||
|
||||
if ( tess.numVertexes & 3 ) {
|
||||
ri.Printf( PRINT_WARNING, "Autosprite shader %s had odd vertex count", tess.shader->name );
|
||||
ri.Printf( PRINT_WARNING, "Autosprite shader %s had odd vertex count\n", tess.shader->name );
|
||||
}
|
||||
if ( tess.numIndexes != ( tess.numVertexes >> 2 ) * 6 ) {
|
||||
ri.Printf( PRINT_WARNING, "Autosprite shader %s had odd index count", tess.shader->name );
|
||||
ri.Printf( PRINT_WARNING, "Autosprite shader %s had odd index count\n", tess.shader->name );
|
||||
}
|
||||
|
||||
oldVerts = tess.numVertexes;
|
||||
|
|
|
@ -116,7 +116,7 @@ static const int numSortKeys = sizeof(sortKeys) / sizeof(const char*);
|
|||
static char* netnames[] = {
|
||||
"???",
|
||||
"UDP",
|
||||
NULL
|
||||
"UDP6"
|
||||
};
|
||||
|
||||
#ifndef MISSIONPACK
|
||||
|
@ -941,7 +941,7 @@ void UI_LoadMenus(const char *menuFile, qboolean reset) {
|
|||
|
||||
handle = trap_PC_LoadSource( menuFile );
|
||||
if (!handle) {
|
||||
trap_Error( va( S_COLOR_YELLOW "menu file not found: %s, using default\n", menuFile ) );
|
||||
Com_Printf( S_COLOR_YELLOW "menu file not found: %s, using default\n", menuFile );
|
||||
handle = trap_PC_LoadSource( "ui/menus.txt" );
|
||||
if (!handle) {
|
||||
trap_Error( va( S_COLOR_RED "default menu file not found: ui/menus.txt, unable to continue!\n") );
|
||||
|
@ -2265,7 +2265,7 @@ static qboolean UI_Handicap_HandleKey(int flags, float *special, int key) {
|
|||
}
|
||||
if (h > 100) {
|
||||
h = 5;
|
||||
} else if (h < 0) {
|
||||
} else if (h < 5) {
|
||||
h = 100;
|
||||
}
|
||||
trap_Cvar_Set( "handicap", va( "%i", h) );
|
||||
|
@ -4307,9 +4307,15 @@ static const char *UI_FeederItemText(float feederID, int index, int column, qhan
|
|||
return Info_ValueForKey(info, "addr");
|
||||
} else {
|
||||
if ( ui_netSource.integer == AS_LOCAL ) {
|
||||
int nettype = atoi(Info_ValueForKey(info, "nettype"));
|
||||
|
||||
if (nettype < 0 || nettype >= ARRAY_LEN(netnames)) {
|
||||
nettype = 0;
|
||||
}
|
||||
|
||||
Com_sprintf( hostname, sizeof(hostname), "%s [%s]",
|
||||
Info_ValueForKey(info, "hostname"),
|
||||
netnames[atoi(Info_ValueForKey(info, "nettype"))] );
|
||||
netnames[nettype] );
|
||||
return hostname;
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue