diff options
-rw-r--r-- | src/cgame/cg_consolecmds.c | 14 | ||||
-rw-r--r-- | src/cgame/cg_draw.c | 4 | ||||
-rw-r--r-- | src/cgame/cg_ents.c | 25 | ||||
-rw-r--r-- | src/cgame/cg_local.h | 1 | ||||
-rw-r--r-- | src/cgame/cg_main.c | 8 | ||||
-rw-r--r-- | src/cgame/cg_players.c | 14 | ||||
-rw-r--r-- | src/cgame/cg_playerstate.c | 2 | ||||
-rw-r--r-- | src/cgame/cg_syscalls.asm | 1 | ||||
-rw-r--r-- | src/cgame/cg_view.c | 5 | ||||
-rw-r--r-- | src/cgame/cg_weapons.c | 2 | ||||
-rw-r--r-- | src/game/bg_misc.c | 420 | ||||
-rw-r--r-- | src/game/bg_pmove.c | 11 | ||||
-rw-r--r-- | src/game/bg_public.h | 26 | ||||
-rw-r--r-- | src/game/g_active.c | 6 | ||||
-rw-r--r-- | src/game/g_client.c | 18 | ||||
-rw-r--r-- | src/game/g_local.h | 2 | ||||
-rw-r--r-- | src/game/g_weapon.c | 36 |
17 files changed, 525 insertions, 70 deletions
diff --git a/src/cgame/cg_consolecmds.c b/src/cgame/cg_consolecmds.c index 8d88c0a8..d0529c62 100644 --- a/src/cgame/cg_consolecmds.c +++ b/src/cgame/cg_consolecmds.c @@ -197,7 +197,7 @@ CG_ClientMenu static void CG_ClientMenu( const char *menuname ) { char menuDef[ MAX_STRING_CHARS ]; - int i; + int i, j = 0; if( !Q_stricmp( menuname, "dinfest" ) ) { @@ -205,13 +205,19 @@ static void CG_ClientMenu( const char *menuname ) for( i = PCL_NONE + 1; i < PCL_NUM_CLASSES; i++ ) { if( BG_ClassCanEvolveFromTo( cg.snap->ps.stats[ STAT_PCLASS ], i ) ) + { strcat( menuDef, va( "%s, class %s|", BG_FindNameForClassNum( i ), BG_FindNameForClassNum( i ) ) ); + j++; + } } strcat( menuDef, "|Choose a class|to evolve to" ); - trap_SendConsoleCommand( va( "defmenu infest \"%s\"\n", menuDef ) ); - trap_SendConsoleCommand( "menu infest\n" ); - trap_SendConsoleCommand( "undefmenu infest\n" ); + if( j ) + { + trap_SendConsoleCommand( va( "defmenu infest \"%s\"\n", menuDef ) ); + trap_SendConsoleCommand( "menu infest\n" ); + trap_SendConsoleCommand( "undefmenu infest\n" ); + } } else if( !Q_stricmp( menuname, "hmcusell" ) ) { diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index 90518a71..813a2c50 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -357,7 +357,7 @@ static void CG_DrawLighting( void ) case PCL_D_B_BASE: case PCL_D_O_BASE: case PCL_D_D_BASE: - if( lum < 10 ) +/* if( lum < 10 ) CG_DrawPic( -4, -4, 648, 488, cgs.media.droidNav9 ); else if( lum >= 10 && lum < 16 ) CG_DrawPic( -4, -4, 648, 488, cgs.media.droidNav8 ); @@ -374,7 +374,7 @@ static void CG_DrawLighting( void ) else if( lum >= 46 && lum < 53 ) CG_DrawPic( -4, -4, 648, 488, cgs.media.droidNav2 ); else if( lum >= 53 ) - CG_DrawPic( -4, -4, 648, 488, cgs.media.droidNav1 ); + CG_DrawPic( -4, -4, 648, 488, cgs.media.droidNav1 );*/ break; diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c index 5f87e2d0..3b66aad6 100644 --- a/src/cgame/cg_ents.c +++ b/src/cgame/cg_ents.c @@ -430,7 +430,7 @@ static void CG_Missile( centity_t *cent ) { if( cent->currentState.weapon == WP_FLAMER ) { ent.reType = RT_SPRITE; - ent.radius = ( ( cg.time - s1->pos.trTime ) * ( cg.time - s1->pos.trTime ) ) / 6000; + ent.radius = ( ( cg.time - s1->pos.trTime ) * ( cg.time - s1->pos.trTime ) ) / 9000; ent.rotation = 0; ent.customShader = cgs.media.flameShader; trap_R_AddRefEntityToScene( &ent ); @@ -611,6 +611,9 @@ static void CG_Portal( centity_t *cent ) { #define MAX_MARK_FRAGMENTS 128 #define MAX_MARK_POINTS 384 +#define TORCH_R 0.4f +#define TORCH_G 0.4f +#define TORCH_B 0.5f /* =============== @@ -652,9 +655,7 @@ static void CG_TorchLight( centity_t *cent ) VectorSubtract( tr.endpos, from, length ); veclength = VectorLength( length ); - trap_R_AddLightToScene( tr.endpos, 200, 1.0, 1.0, 1.0 ); - -/* size = veclength / 2.0f; + size = veclength / 2.0f; if( size > 255 ) size = 255; if( size < 0 ) size = 0; @@ -663,7 +664,15 @@ static void CG_TorchLight( centity_t *cent ) //slightly above surface VectorMA( origin, 1, normal, origin ); - + +#if 1 + trap_R_AddAdditiveLightToScene( origin, size * 2, ( ( 512 - size ) / 512 ) * TORCH_R, + ( ( 512 - size ) / 512 ) * TORCH_G, + ( ( 512 - size ) / 512 ) * TORCH_B ); + trap_R_AddLightToScene( origin, size * 2, ( ( 512 - size ) / 512 ) * TORCH_R, + ( ( 512 - size ) / 512 ) * TORCH_G, + ( ( 512 - size ) / 512 ) * TORCH_B ); +#else texCoordScale = 0.5f / size; //decide where the corners of the poly go @@ -671,7 +680,8 @@ static void CG_TorchLight( centity_t *cent ) PerpendicularVector( axis[1], axis[0] ); CrossProduct( axis[0], axis[1], axis[2] ); - for ( i = 0 ; i < 3 ; i++ ) { + for ( i = 0 ; i < 3 ; i++ ) + { square[0][i] = origin[i] - size * axis[1][i] - size * axis[2][i]; square[1][i] = origin[i] - size * axis[1][i] + size * axis[2][i]; square[2][i] = origin[i] + size * axis[1][i] + size * axis[2][i]; @@ -743,7 +753,8 @@ static void CG_TorchLight( centity_t *cent ) else if( lum >= 46 ) trap_R_AddPolyToScene( cgs.media.humanTorch1, mf->numPoints, verts ); } - }*/ + } +#endif } /* diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index d7c6c560..5c015ab3 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -1571,6 +1571,7 @@ void trap_R_AddRefEntityToScene( const refEntity_t *re ); // significant construction void trap_R_AddPolyToScene( qhandle_t hShader , int numVerts, const polyVert_t *verts ); void trap_R_AddLightToScene( const vec3_t org, float intensity, float r, float g, float b ); +void trap_R_AddAdditiveLightToScene( const vec3_t org, float intensity, float r, float g, float b ); int trap_R_LightForPoint( vec3_t point, vec3_t ambientLight, vec3_t directedLight, vec3_t lightDir ); void trap_R_RenderScene( const refdef_t *fd ); void trap_R_SetColor( const float *rgba ); // NULL = 1,1,1,1 diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index 91129958..82b11aee 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -941,9 +941,9 @@ static void CG_RegisterClients( void ) { for (i=MAX_CLIENTS+MAX_PRECACHES+1; i>=0; i--) { const char *clientInfo; - if (cg.clientNum == i) { +/* if (cg.clientNum == i) { continue; - } + }*/ clientInfo = CG_ConfigString( CS_PLAYERS+i ); if ( !clientInfo[0] ) { @@ -952,8 +952,8 @@ static void CG_RegisterClients( void ) { if( i < MAX_CLIENTS ) { - CG_LoadingClient( i ); - CG_NewClientInfo( i ); +/* CG_LoadingClient( i ); + CG_NewClientInfo( i );*/ } else { diff --git a/src/cgame/cg_players.c b/src/cgame/cg_players.c index 68fd1d71..27e93d85 100644 --- a/src/cgame/cg_players.c +++ b/src/cgame/cg_players.c @@ -501,14 +501,16 @@ static int CG_GetCorpseNum( int pclass ) { modelName = BG_FindModelNameForClass( pclass ); - for ( i = 0 ; i < cgs.maxclients ; i++ ) { + for ( i = 0 ; i < MAX_CLIENTS; i++ ) + { match = &cgs.corpseinfo[ i ]; - if ( !match->infoValid ) { + Com_Printf( "%d: %s %s\n", i, modelName, match->modelName ); + if ( !match->infoValid ) continue; - } - if ( match->deferred ) { + + if ( match->deferred ) continue; - } + if ( !Q_stricmp( modelName, match->modelName ) /*&& !Q_stricmp( modelName, match->skinName )*/ ) { // this clientinfo is identical, so use it's handles @@ -620,7 +622,7 @@ void CG_PrecacheClientInfo( int clientNum ) { const char *v; char *slash; - ci = &cgs.corpseinfo[ clientNum - MAX_CLIENTS ]; + ci = &cgs.corpseinfo[ clientNum - MAX_CLIENTS - 1 ]; //CG_Printf( "%d %d\n", clientNum, (clientNum - MAX_CLIENTS ) ); diff --git a/src/cgame/cg_playerstate.c b/src/cgame/cg_playerstate.c index 05c8805f..032a1841 100644 --- a/src/cgame/cg_playerstate.c +++ b/src/cgame/cg_playerstate.c @@ -489,7 +489,7 @@ void CG_TransitionPlayerState( playerState_t *ps, playerState_t *ops ) { } // check for going low on ammo - CG_CheckAmmo(); + //CG_CheckAmmo(); //TA: don't display ammo warnings // run events CG_CheckPlayerstateEvents( ps, ops ); diff --git a/src/cgame/cg_syscalls.asm b/src/cgame/cg_syscalls.asm index 3298ef73..51cfa6ad 100644 --- a/src/cgame/cg_syscalls.asm +++ b/src/cgame/cg_syscalls.asm @@ -82,6 +82,7 @@ equ trap_CIN_SetExtents -79 equ trap_R_RemapShader -80 equ trap_S_AddRealLoopingSound -81 equ trap_S_StopLoopingSound -82 +equ trap_R_AddAdditiveLightToScene -86 equ memset -101 diff --git a/src/cgame/cg_view.c b/src/cgame/cg_view.c index 393ac480..3442f09b 100644 --- a/src/cgame/cg_view.c +++ b/src/cgame/cg_view.c @@ -980,6 +980,11 @@ void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demo } } + if( cg.predictedPlayerState.stats[ STAT_PTEAM ] == PTE_DROIDS ) + { + trap_R_AddAdditiveLightToScene( cg.predictedPlayerState.origin, 300, 0.4, 0.2, 0.0 ); + } + // actually issue the rendering calls CG_DrawActive( stereoView ); diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index a6997290..cc1f835e 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -1612,7 +1612,7 @@ void CG_MissileHitWall( int weapon, int clientNum, vec3_t origin, vec3_t dir, im shader = cgs.media.flameExplShader; sfx = cgs.media.sfx_lghit2; mark = cgs.media.burnMarkShader; - radius = 48; + radius = 32; isSprite = qtrue; break; case WP_PLASMAGUN: diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index 61ac0e23..0ecf96db 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -1438,7 +1438,99 @@ classAttributes_t bg_classList[ ] = 350, 0.5f, 1.0f, - { PCL_D_D_BASE, PCL_D_O_BASE, PCL_NONE }, + { PCL_D_B_LEV1, PCL_NONE, PCL_NONE }, + 2000, + 100 + }, + { + PCL_D_B_LEV1, + "BuilderLevel1", + "lucy", + "default", + { -15, -15, -20 }, + { 15, 15, 20 }, + { 15, 15, 20 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 12, 12, + 75, + 75, + SCA_CANJUMP|SCA_FOVWARPS, + 110, + 0.005f, + 200, + 1.0f, + 1.0f, + { PCL_D_B_LEV21, PCL_D_B_LEV22, PCL_D_B_LEV23 }, + 2000, + 100 + }, + { + PCL_D_B_LEV21, + "BuilderLevel2-1", + "lucy", + "default", + { -15, -15, -20 }, + { 15, 15, 20 }, + { 15, 15, 20 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 12, 12, + 100, + 200, + SCA_TAKESFALLDAMAGE|SCA_FOVWARPS, + 90, + 0.015f, + 350, + 1.2f, + 1.0f, + { PCL_NONE, PCL_NONE, PCL_NONE }, + 2000, + 100 + }, + { + PCL_D_B_LEV22, + "BuilderLevel2-2", + "lucy", + "default", + { -15, -15, -20 }, + { 15, 15, 20 }, + { 15, 15, 20 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 12, 12, + 120, + 100, + SCA_CANJUMP|SCA_FOVWARPS, + 120, + 0.002f, + 350, + 1.5f, + 1.0f, + { PCL_NONE, PCL_NONE, PCL_NONE }, + 2000, + 100 + }, + { + PCL_D_B_LEV23, + "BuilderLevel2-3", + "lucy", + "default", + { -15, -15, -20 }, + { 15, 15, 20 }, + { 15, 15, 20 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 12, 12, + 100, + 100, + SCA_CANJUMP|SCA_FOVWARPS, + 100, + 0.015f, + 350, + 1.7f, + 1.0f, + { PCL_NONE, PCL_NONE, PCL_NONE }, 2000, 100 }, @@ -1461,7 +1553,168 @@ classAttributes_t bg_classList[ ] = 25, 2.0f, 5.0f, - { PCL_D_D_BASE, PCL_D_B_BASE, PCL_NONE }, + { PCL_D_O_LEV11, PCL_D_O_LEV12, PCL_NONE }, + 3000, + 100 + }, + { + PCL_D_O_LEV11, + "OffensiveLevel1-1", + "klesk", + "default", + { -15, -15, -15 }, + { 15, 15, 15 }, + { 15, 15, 15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 50, + 50, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 130, + 0.0f, + 25, + 1.6f, + 5.0f, + { PCL_D_O_LEV21, PCL_D_O_LEV22, PCL_NONE }, + 3000, + 100 + }, + { + PCL_D_O_LEV12, + "OffensiveLevel1-2", + "klesk", + "default", + { -15, -15, -15 }, + { 15, 15, 15 }, + { 15, 15, 15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 50, + 50, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 130, + 0.0f, + 25, + 1.6f, + 5.0f, + { PCL_D_O_LEV21, PCL_D_O_LEV22, PCL_NONE }, + 3000, + 100 + }, + { + PCL_D_O_LEV21, + "OffensiveLevel2-1", + "klesk", + "default", + { -15, -15, -15 }, + { 15, 15, 15 }, + { 15, 15, 15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 100, + 100, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 130, + 0.0f, + 60, + 1.3f, + 5.0f, + { PCL_D_O_LEV31, PCL_D_O_LEV32, PCL_NONE }, + 3000, + 100 + }, + { + PCL_D_O_LEV22, + "OffensiveLevel2-2", + "klesk", + "default", + { -15, -15, -15 }, + { 15, 15, 15 }, + { 15, 15, 15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 100, + 100, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 130, + 0.0f, + 60, + 1.3f, + 5.0f, + { PCL_D_O_LEV32, PCL_D_O_LEV33, PCL_NONE }, + 3000, + 100 + }, + { + PCL_D_O_LEV31, + "OffensiveLevel3-1", + "klesk", + "default", + { -15, -15, -15 }, + { 15, 15, 15 }, + { 15, 15, 15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 200, + 200, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 120, + 0.0f, + 200, + 1.0f, + 5.0f, + { PCL_NONE, PCL_NONE, PCL_NONE }, + 3000, + 100 + }, + { + PCL_D_O_LEV32, + "OffensiveLevel3-2", + "klesk", + "default", + { -15, -15, -15 }, + { 15, 15, 15 }, + { 15, 15, 15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 200, + 200, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 120, + 0.0f, + 200, + 1.0f, + 5.0f, + { PCL_NONE, PCL_NONE, PCL_NONE }, + 3000, + 100 + }, + { + PCL_D_O_LEV33, + "OffensiveLevel3-3", + "klesk", + "default", + { -15, -15, -15 }, + { 15, 15, 15 }, + { 15, 15, 15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 200, + 200, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 120, + 0.0f, + 200, + 1.0f, + 5.0f, + { PCL_NONE, PCL_NONE, PCL_NONE }, 3000, 100 }, @@ -1484,7 +1737,168 @@ classAttributes_t bg_classList[ ] = 25, 1.5f, 3.0f, - { PCL_D_O_BASE, PCL_D_B_BASE, PCL_NONE }, + { PCL_D_D_LEV11, PCL_D_D_LEV12, PCL_NONE }, + 1000, + 100 + }, + { + PCL_D_D_LEV11, + "DefensiveLevel1-1", + "orbb", + "default", + { -15, -15, -15 }, + { 15, 15 ,15 }, + { 15, 15 ,15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 50, + 50, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 100, + 0.0f, + 25, + 1.4f, + 3.0f, + { PCL_D_D_LEV21, PCL_D_D_LEV22, PCL_NONE }, + 1000, + 100 + }, + { + PCL_D_D_LEV12, + "DefensiveLevel1-2", + "orbb", + "default", + { -15, -15, -15 }, + { 15, 15 ,15 }, + { 15, 15 ,15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 50, + 50, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 100, + 0.0f, + 25, + 1.4f, + 3.0f, + { PCL_D_D_LEV21, PCL_D_D_LEV22, PCL_NONE }, + 1000, + 100 + }, + { + PCL_D_D_LEV21, + "DefensiveLevel2-1", + "orbb", + "default", + { -15, -15, -15 }, + { 15, 15 ,15 }, + { 15, 15 ,15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 150, + 150, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 110, + 0.0f, + 25, + 1.3f, + 3.0f, + { PCL_D_D_LEV31, PCL_D_D_LEV32, PCL_NONE }, + 1000, + 100 + }, + { + PCL_D_D_LEV22, + "DefensiveLevel2-2", + "orbb", + "default", + { -15, -15, -15 }, + { 15, 15 ,15 }, + { 15, 15 ,15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 150, + 150, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 110, + 0.0f, + 25, + 1.3f, + 3.0f, + { PCL_D_D_LEV32, PCL_D_D_LEV33, PCL_NONE }, + 1000, + 100 + }, + { + PCL_D_D_LEV31, + "DefensiveLevel3-1", + "orbb", + "default", + { -15, -15, -15 }, + { 15, 15 ,15 }, + { 15, 15 ,15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 250, + 250, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 130, + 0.0f, + 25, + 1.2f, + 3.0f, + { PCL_NONE, PCL_NONE, PCL_NONE }, + 1000, + 100 + }, + { + PCL_D_D_LEV32, + "DefensiveLevel3-2", + "orbb", + "default", + { -15, -15, -15 }, + { 15, 15 ,15 }, + { 15, 15 ,15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 250, + 250, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 130, + 0.0f, + 25, + 1.2f, + 3.0f, + { PCL_NONE, PCL_NONE, PCL_NONE }, + 1000, + 100 + }, + { + PCL_D_D_LEV33, + "DefensiveLevel3-3", + "orbb", + "default", + { -15, -15, -15 }, + { 15, 15 ,15 }, + { 15, 15 ,15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 250, + 250, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 130, + 0.0f, + 25, + 1.2f, + 3.0f, + { PCL_NONE, PCL_NONE, PCL_NONE }, 1000, 100 }, diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index 440d4030..91bade11 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -2111,9 +2111,8 @@ Generates weapon events and modifes the weapon counter ============== */ static void PM_Weapon( void ) { - int addTime; - int ammo, clips, maxclips; - static int chainGunAddTime; + int addTime; + int ammo, clips, maxclips; // don't allow attack until all buttons are up if ( pm->ps->pm_flags & PMF_RESPAWNED ) { @@ -2229,7 +2228,6 @@ static void PM_Weapon( void ) { if ( ! (pm->cmd.buttons & BUTTON_ATTACK) ) { pm->ps->weaponTime = 0; pm->ps->weaponstate = WEAPON_READY; - chainGunAddTime = 120; return; } @@ -2317,8 +2315,7 @@ static void PM_Weapon( void ) { addTime = 100; break; case WP_CHAINGUN: - if( chainGunAddTime > 30 ) chainGunAddTime -= 2; - addTime = chainGunAddTime; + addTime = 50; break; case WP_GRENADE_LAUNCHER: addTime = 800; @@ -2327,7 +2324,7 @@ static void PM_Weapon( void ) { addTime = 800; break; case WP_FLAMER: - addTime = 150; + addTime = 75; break; case WP_RAILGUN: addTime = 1500; diff --git a/src/game/bg_public.h b/src/game/bg_public.h index f0d7398c..1e9ab8b5 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -654,9 +654,35 @@ typedef enum { //TA: player classes typedef enum { PCL_NONE, + + //builder classes PCL_D_B_BASE, + PCL_D_B_LEV1, + PCL_D_B_LEV21, + PCL_D_B_LEV22, + PCL_D_B_LEV23, + + //offensive classes PCL_D_O_BASE, + PCL_D_O_LEV11, + PCL_D_O_LEV12, + PCL_D_O_LEV21, + PCL_D_O_LEV22, + PCL_D_O_LEV31, + PCL_D_O_LEV32, + PCL_D_O_LEV33, + + //defensive classes PCL_D_D_BASE, + PCL_D_D_LEV11, + PCL_D_D_LEV12, + PCL_D_D_LEV21, + PCL_D_D_LEV22, + PCL_D_D_LEV31, + PCL_D_D_LEV32, + PCL_D_D_LEV33, + + //human class PCL_H_BASE, PCL_NUM_CLASSES diff --git a/src/game/g_active.c b/src/game/g_active.c index e0a3654a..cc504339 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -827,18 +827,18 @@ void ClientThink_real( gentity_t *ent ) { if( ( client->ps.stats[ STAT_STATE ] & SS_SPEEDBOOST ) && ucmd->upmove >= 0 ) { //subtract stamina - client->ps.stats[ STAT_STAMINA ] -= dTime/6.0f; + client->ps.stats[ STAT_STAMINA ] -= dTime/9.0f; } if( ( aForward <= 64 && aForward > 5 ) || ( aRight <= 64 && aRight > 5 ) ) { //restore stamina - client->ps.stats[ STAT_STAMINA ] += dTime/4.0f; + client->ps.stats[ STAT_STAMINA ] += dTime/6.0f; } else if( aForward <= 5 && aRight <= 5 ) { //restore stamina faster - client->ps.stats[ STAT_STAMINA ] += dTime/6.0f; + client->ps.stats[ STAT_STAMINA ] += dTime/9.0f; } // set up for pmove diff --git a/src/game/g_client.c b/src/game/g_client.c index 47d145d0..42e1f9b4 100644 --- a/src/game/g_client.c +++ b/src/game/g_client.c @@ -1374,16 +1374,34 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn ) { switch( ent->client->pers.pclass ) { case PCL_D_B_BASE: + case PCL_D_B_LEV1: + case PCL_D_B_LEV21: + case PCL_D_B_LEV22: + case PCL_D_B_LEV23: BG_packWeapon( WP_ABUILD, client->ps.stats ); BG_packAmmoArray( WP_ABUILD, client->ps.ammo, client->ps.powerups, 0, 0, 0 ); break; case PCL_D_O_BASE: + case PCL_D_O_LEV11: + case PCL_D_O_LEV12: + case PCL_D_O_LEV21: + case PCL_D_O_LEV22: + case PCL_D_O_LEV31: + case PCL_D_O_LEV32: + case PCL_D_O_LEV33: BG_packWeapon( WP_VENOM, client->ps.stats ); BG_packAmmoArray( WP_VENOM, client->ps.ammo, client->ps.powerups, 0, 0, 0 ); break; case PCL_D_D_BASE: + case PCL_D_D_LEV11: + case PCL_D_D_LEV12: + case PCL_D_D_LEV21: + case PCL_D_D_LEV22: + case PCL_D_D_LEV31: + case PCL_D_D_LEV32: + case PCL_D_D_LEV33: BG_packWeapon( WP_VENOM, client->ps.stats ); BG_packAmmoArray( WP_VENOM, client->ps.ammo, client->ps.powerups, 0, 0, 0 ); break; diff --git a/src/game/g_local.h b/src/game/g_local.h index a84c7c49..a8170dff 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -602,7 +602,7 @@ void ShineTorch( gentity_t *self ); // g_weapon.c // qboolean LogAccuracyHit( gentity_t *target, gentity_t *attacker ); -void CalcMuzzlePoint ( gentity_t *ent, vec3_t forward, vec3_t right, vec3_t up, vec3_t muzzlePoint ); +void CalcMuzzlePoint( gentity_t *ent, vec3_t forward, vec3_t right, vec3_t up, vec3_t muzzlePoint ); void SnapVectorTowards( vec3_t v, vec3_t to ); qboolean CheckGauntletAttack( gentity_t *ent ); void Weapon_HookFree (gentity_t *ent); diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index fb2a85ee..ad637897 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -33,9 +33,6 @@ static float s_quadFactor; static vec3_t forward, right, up; static vec3_t muzzle; -//TA: for horizontal changes in muzzle point -static int hmuzzle = 10; - #define NUM_NAILSHOTS 10 /* @@ -82,7 +79,7 @@ qboolean CheckGauntletAttack( gentity_t *ent ) { // set aiming directions AngleVectors (ent->client->ps.viewangles, forward, right, up); - CalcMuzzlePoint ( ent, forward, right, up, muzzle ); + CalcMuzzlePoint( ent, forward, right, up, muzzle ); VectorMA (muzzle, 32, forward, end); @@ -621,7 +618,7 @@ void Weapon_Venom_Fire( gentity_t *ent ) { // set aiming directions AngleVectors (ent->client->ps.viewangles, forward, right, up); - CalcMuzzlePoint ( ent, forward, right, up, muzzle ); + CalcMuzzlePoint( ent, forward, right, up, muzzle ); VectorMA (muzzle, 32, forward, end); @@ -693,33 +690,10 @@ CalcMuzzlePoint set muzzle location relative to pivoting eye =============== */ -void CalcMuzzlePoint ( gentity_t *ent, vec3_t forward, vec3_t right, vec3_t up, vec3_t muzzlePoint ) { - VectorCopy( ent->s.pos.trBase, muzzlePoint ); - muzzlePoint[2] += ent->client->ps.viewheight; - VectorMA( muzzlePoint, 8, forward, muzzlePoint ); - - //TA: move the muzzle a bit with BFG - if( ent->s.weapon == WP_BFG ) - { - VectorMA( muzzlePoint, hmuzzle, right, muzzlePoint ); - hmuzzle = -hmuzzle; - } - - // snap to integer coordinates for more efficient network bandwidth usage - SnapVector( muzzlePoint ); -} - -/* -=============== -CalcMuzzlePointOrigin - -set muzzle location relative to pivoting eye -=============== -*/ -void CalcMuzzlePointOrigin ( gentity_t *ent, vec3_t origin, vec3_t forward, vec3_t right, vec3_t up, vec3_t muzzlePoint ) { +void CalcMuzzlePoint( gentity_t *ent, vec3_t forward, vec3_t right, vec3_t up, vec3_t muzzlePoint ) { VectorCopy( ent->s.pos.trBase, muzzlePoint ); muzzlePoint[2] += ent->client->ps.viewheight; - VectorMA( muzzlePoint, 14, forward, muzzlePoint ); + VectorMA( muzzlePoint, 1, forward, muzzlePoint ); // snap to integer coordinates for more efficient network bandwidth usage SnapVector( muzzlePoint ); } @@ -745,7 +719,7 @@ void FireWeapon( gentity_t *ent ) { // set aiming directions AngleVectors (ent->client->ps.viewangles, forward, right, up); - CalcMuzzlePointOrigin ( ent, ent->client->oldOrigin, forward, right, up, muzzle ); + CalcMuzzlePoint( ent, forward, right, up, muzzle ); // fire the specific weapon switch( ent->s.weapon ) { |