summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/g_buildable.c6
-rw-r--r--src/game/g_cmds.c68
-rw-r--r--src/game/tremulous.h2
-rw-r--r--src/ui/ui_main.c12
4 files changed, 17 insertions, 71 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index a33a209e..6245e7ac 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -1296,17 +1296,19 @@ void ADef_FireOnEnemy( gentity_t *self, int firespeed )
VectorScale( self->enemy->jerk, 1.0f / 3.0f, thirdJerk );
//O( time ) - worst case O( time ) = 250 iterations
- for( i = 0; ( i * LOCKBLOB_SPEED ) / 1000.0f < distanceToTarget; i++ )
+ for( i = 0; (float)( i * LOCKBLOB_SPEED ) / 1000.0f < distanceToTarget; i++ )
{
float time = (float)i / 1000.0f;
if( i > 250 )
{
- G_Printf( "ADef_FireOnEnemy failed.\n"
+ G_LogPrintf( "ADef_FireOnEnemy failed.\n"
+ " %dth iteration\n"
" enemy location: %v\n"
" enemy accleration: %v\n"
" enemy jerk: %v\n"
" base location: %v\n",
+ i,
self->enemy->s.pos.trBase,
self->enemy->acceleration,
self->enemy->jerk,
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index 42273bc0..3cfee5c0 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -2324,72 +2324,6 @@ void Cmd_Test_f( gentity_t *ent )
ent->client->lastPoisonClient = ent;
}
-/*
-=================
-Cmd_Evolve_Debug_f
-=================
-*/
-void Cmd_Evolve_Debug_f( gentity_t *ent )
-{
-#define USE_OBJECT_RANGE 64
-
- int entityList[ MAX_GENTITIES ];
- vec3_t range = { USE_OBJECT_RANGE, USE_OBJECT_RANGE, USE_OBJECT_RANGE };
- vec3_t mins, maxs;
- int i, num;
- int j;
- qboolean upgrade = qfalse;
- gclient_t *client = ent->client;
- trace_t trace;
- gentity_t *traceEnt;
- vec3_t point, view;
-
- //TA: look for object infront of player
- AngleVectors( client->ps.viewangles, view, NULL, NULL );
- VectorMA( client->ps.origin, USE_OBJECT_RANGE, view, point );
- trap_Trace( &trace, client->ps.origin, NULL, NULL, point, ent->s.number, MASK_SHOT );
-
- traceEnt = &g_entities[ trace.entityNum ];
-
- if( traceEnt && traceEnt->biteam == client->ps.stats[ STAT_PTEAM ] && traceEnt->use )
- trap_SendServerCommand( ent - g_entities,
- va( "print \"Trying to use entity \"%s\"\n\"", traceEnt->classname ) );
- else
- {
- //no entity in front of player - do a small area search
-
- VectorAdd( client->ps.origin, range, maxs );
- VectorSubtract( client->ps.origin, range, mins );
-
- num = trap_EntitiesInBox( mins, maxs, entityList, MAX_GENTITIES );
- for( i = 0; i < num; i++ )
- {
- traceEnt = &g_entities[ entityList[ i ] ];
-
- if( traceEnt && traceEnt->biteam == client->ps.stats[ STAT_PTEAM ] && traceEnt->use )
- {
- trap_SendServerCommand( ent - g_entities,
- va( "print \"Trying to use entity \"%s\"\n\"", traceEnt->classname ) );
- break;
- }
- }
-
- if( i == num && client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
- {
- for( j = PCL_NONE + 1; j < PCL_NUM_CLASSES; j++ )
- {
- if( BG_ClassCanEvolveFromTo( client->ps.stats[ STAT_PCLASS ], j,
- client->ps.persistant[ PERS_CREDIT ], 0 ) >= 0 &&
- BG_FindStagesForClass( j, g_alienStage.integer ) )
- {
- upgrade = qtrue;
- break;
- }
- }
- }
- }
-}
-
/*
=================
@@ -2501,8 +2435,6 @@ void ClientCommand( int clientNum )
Cmd_PTRCRestore_f( ent );
else if( Q_stricmp( cmd, "test" ) == 0 )
Cmd_Test_f( ent );
- else if( Q_stricmp( cmd, "evolvebug" ) == 0 )
- Cmd_Evolve_Debug_f( ent );
else
trap_SendServerCommand( clientNum, va( "print \"unknown cmd %s\n\"", cmd ) );
}
diff --git a/src/game/tremulous.h b/src/game/tremulous.h
index 741525c7..0adb4595 100644
--- a/src/game/tremulous.h
+++ b/src/game/tremulous.h
@@ -256,7 +256,7 @@
#define TRAPPER_CREEPSIZE 30
#define TRAPPER_RANGE 400
#define TRAPPER_REPEAT 1000
-#define LOCKBLOB_SPEED 500
+#define LOCKBLOB_SPEED 500.0f
#define LOCKBLOB_DOT 0.85f // max angle = acos( LOCKBLOB_DOT )
#define OVERMIND_BP 0
diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c
index 09bb0e3d..200b8b8a 100644
--- a/src/ui/ui_main.c
+++ b/src/ui/ui_main.c
@@ -5823,6 +5823,18 @@ void _UI_SetActiveMenu( uiMenuCommand_t menu ) {
trap_Cvar_Set("com_errorMessage", "");
}
}
+
+#define MIN_HUNKMEGS 100
+
+ trap_Cvar_VariableStringBuffer( "com_hunkMegs", buf, sizeof( buf ) );
+ if( strlen( buf ) && atoi( buf ) < MIN_HUNKMEGS )
+ {
+ trap_Cvar_Set( "com_hunkMegs", va( "%d", MIN_HUNKMEGS ) );
+ trap_Cvar_Set( "com_errorMessage", "Your com_hunkMegs setting was too low. "
+ "It has been changed to a suitable value, but you must restart Quake 3 "
+ "for it to take effect." );
+ Menus_ActivateByName( "error_popmenu" );
+ }
return;
case UIMENU_TEAM:
trap_Key_SetCatcher( KEYCATCH_UI );