diff options
Diffstat (limited to 'src/cgame')
| -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 | 
10 files changed, 51 insertions, 25 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:  | 
