summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2005-07-28 15:23:13 +0000
committerTim Angus <tim@ngus.net>2005-07-28 15:23:13 +0000
commit34ef13ee1769a3ec5fd6f93394f8903c9f5570ea (patch)
tree49aa021f596113b1a5e2e92aa12c86d07efea67d
parent3b81f6766f4042b5ec01379d92badf0a0e094405 (diff)
* Extended the chat period at the end of games
* Disabled the anticamp trigger when you buy a weapon * Fixed bug where the "Ready" text would render over the icons on the final scoreboard * Changed the testmodel code to render gun barrels
-rw-r--r--src/cgame/cg_local.h2
-rw-r--r--src/cgame/cg_main.c6
-rw-r--r--src/cgame/cg_view.c27
-rw-r--r--src/game/g_cmds.c4
-rw-r--r--src/game/g_main.c6
5 files changed, 35 insertions, 10 deletions
diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h
index 143403e1..101aa8ed 100644
--- a/src/cgame/cg_local.h
+++ b/src/cgame/cg_local.h
@@ -1004,7 +1004,9 @@ typedef struct
// development tool
refEntity_t testModelEntity;
+ refEntity_t testModelBarrelEntity;
char testModelName[MAX_QPATH];
+ char testModelBarrelName[MAX_QPATH];
qboolean testGun;
int spawnTime; //TA: fovwarp
diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c
index 839e6b17..2510fc17 100644
--- a/src/cgame/cg_main.c
+++ b/src/cgame/cg_main.c
@@ -1492,6 +1492,9 @@ static const char *CG_FeederItemText( float feederID, int index, int column, qha
else if( feederID == FEEDER_HUMANTEAM_LIST )
team = PTE_HUMANS;
+ info = CG_InfoFromScoreIndex( index, team, &scoreIndex );
+ sp = &cg.scores[ scoreIndex ];
+
if( ( atoi( CG_ConfigString( CS_CLIENTS_READY ) ) & ( 1 << sp->client ) ) &&
cg.intermissionStarted )
showIcons = qfalse;
@@ -1499,9 +1502,6 @@ static const char *CG_FeederItemText( float feederID, int index, int column, qha
team == cg.snap->ps.stats[ STAT_PTEAM ] || cg.intermissionStarted )
showIcons = qtrue;
- info = CG_InfoFromScoreIndex( index, team, &scoreIndex );
- sp = &cg.scores[ scoreIndex ];
-
if( info && info->infoValid )
{
switch( column )
diff --git a/src/cgame/cg_view.c b/src/cgame/cg_view.c
index 12772a3d..454582db 100644
--- a/src/cgame/cg_view.c
+++ b/src/cgame/cg_view.c
@@ -67,12 +67,18 @@ void CG_TestModel_f( void )
vec3_t angles;
memset( &cg.testModelEntity, 0, sizeof( cg.testModelEntity ) );
+ memset( &cg.testModelBarrelEntity, 0, sizeof( cg.testModelBarrelEntity ) );
if( trap_Argc( ) < 2 )
return;
Q_strncpyz( cg.testModelName, CG_Argv( 1 ), MAX_QPATH );
cg.testModelEntity.hModel = trap_R_RegisterModel( cg.testModelName );
+
+ Q_strncpyz( cg.testModelBarrelName, CG_Argv( 1 ), MAX_QPATH );
+ cg.testModelBarrelName[ strlen( cg.testModelBarrelName ) - 4 ] = '\0';
+ Q_strcat( cg.testModelBarrelName, MAX_QPATH, "_barrel.md3" );
+ cg.testModelBarrelEntity.hModel = trap_R_RegisterModel( cg.testModelBarrelName );
if( trap_Argc( ) == 3 )
{
@@ -95,6 +101,14 @@ void CG_TestModel_f( void )
AnglesToAxis( angles, cg.testModelEntity.axis );
cg.testGun = qfalse;
+
+ if( cg.testModelBarrelEntity.hModel )
+ {
+ angles[ YAW ] = 0;
+ angles[ PITCH ] = 0;
+ angles[ ROLL ] = 0;
+ AnglesToAxis( angles, cg.testModelBarrelEntity.axis );
+ }
}
/*
@@ -150,10 +164,11 @@ static void CG_AddTestModel( void )
// re-register the model, because the level may have changed
cg.testModelEntity.hModel = trap_R_RegisterModel( cg.testModelName );
+ cg.testModelBarrelEntity.hModel = trap_R_RegisterModel( cg.testModelBarrelName );
- if( ! cg.testModelEntity.hModel )
+ if( !cg.testModelEntity.hModel )
{
- CG_Printf ("Can't register model\n");
+ CG_Printf( "Can't register model\n" );
return;
}
@@ -175,6 +190,14 @@ static void CG_AddTestModel( void )
}
trap_R_AddRefEntityToScene( &cg.testModelEntity );
+
+ if( cg.testModelBarrelEntity.hModel )
+ {
+ CG_PositionEntityOnTag( &cg.testModelBarrelEntity, &cg.testModelEntity,
+ cg.testModelEntity.hModel, "tag_barrel" );
+
+ trap_R_AddRefEntityToScene( &cg.testModelBarrelEntity );
+ }
}
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index 3cfee5c0..3a826333 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -1665,8 +1665,8 @@ void Cmd_Buy_f( gentity_t *ent )
ent->client->ps.stats[ STAT_MISC ] = 0;
//prevent filling up ammo again soon
- ent->client->lastBoughtAmmoTime = level.time;
- ent->client->campingAtTheArmoury = qtrue;
+ //ent->client->lastBoughtAmmoTime = level.time;
+ //ent->client->campingAtTheArmoury = qtrue;
//subtract from funds
G_AddCreditToClient( ent->client, -(short)BG_FindPriceForWeapon( weapon ), qfalse );
diff --git a/src/game/g_main.c b/src/game/g_main.c
index 14ec7d58..dc4a3064 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -1529,16 +1529,16 @@ void CheckIntermissionExit( void )
return;
}
- // the first person to ready starts the ten second timeout
+ // the first person to ready starts the thirty second timeout
if( !level.readyToExit )
{
level.readyToExit = qtrue;
level.exitTime = level.time;
}
- // if we have waited ten seconds since at least one player
+ // if we have waited thirty seconds since at least one player
// wanted to exit, go ahead
- if( level.time < level.exitTime + 10000 )
+ if( level.time < level.exitTime + 30000 )
return;
ExitLevel( );