diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2015-06-22 01:24:58 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2015-06-22 01:24:58 +0200 |
commit | 451f2ca7c8d832d2691dde2510e613373c312cd1 (patch) | |
tree | 936a5222f7b6ac947561542b48f86c264a6f72d7 /src/cgame | |
parent | dc87cba52101aa4c6ad94c652460bff8520231bd (diff) |
Remove Basilisk and Advanced Basilisk.
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_draw.c | 118 | ||||
-rw-r--r-- | src/cgame/cg_event.c | 24 | ||||
-rw-r--r-- | src/cgame/cg_local.h | 2 | ||||
-rw-r--r-- | src/cgame/cg_main.c | 1 | ||||
-rw-r--r-- | src/cgame/cg_players.c | 60 | ||||
-rw-r--r-- | src/cgame/cg_servercmds.c | 18 | ||||
-rw-r--r-- | src/cgame/cg_tutorial.c | 31 | ||||
-rw-r--r-- | src/cgame/cg_view.c | 36 |
8 files changed, 6 insertions, 284 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index fb5741d..a20be8b 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -561,39 +561,6 @@ static void CG_DrawPlayerBoosterBolt( rectDef_t *rect, vec4_t backColor, } - -/* -============== -CG_DrawInvisbleStatus -============== -*/ -static void CG_DrawInvisbleStatus( rectDef_t *rect, vec4_t color, qhandle_t shader ) -{ - qhandle_t detail1; - if( cg.snap->ps.stats[ STAT_STATE ] & SS_INVI && cg.snap->ps.weapon == WP_ALEVEL1_UPG) - { - - detail1 = trap_R_RegisterShader( "icons/advbasiinvi.tga" ); - CG_DrawPic( rect->x, rect->y, rect->w, rect->h, detail1 ); - } -} - -/* -============== -CG_DrawInvisbleOverlay -============== -*/ -static void CG_DrawInvisbleOverlay( rectDef_t *rect, vec4_t color, qhandle_t shader ) -{ - qhandle_t detail2; - if( cg.snap->ps.stats[ STAT_STATE ] & SS_INVI && cg.snap->ps.weapon == WP_ALEVEL1_UPG) - { - detail2 = trap_R_RegisterShader( "gfx/edge/basi_invisble_overlay" ); - CG_DrawPic( rect->x, rect->y, rect->w, rect->h, detail2 ); - } -} - - /* ============== CG_DrawPlayerPrickles (ammo) @@ -609,9 +576,9 @@ static void CG_DrawPlayerPrickles( rectDef_t *rect, vec4_t color, qhandle_t shad maxBarbs = BG_Weapon( cg.snap->ps.weapon )->maxAmmo; numBarbs = cg.snap->ps.ammo; - -if( cg.snap->ps.weapon == WP_ALEVEL2_UPG || cg.snap->ps.weapon == WP_ALEVEL3 || cg.snap->ps.weapon == WP_ALEVEL3_UPG || cg.snap->ps.weapon == WP_ALEVEL1 || cg.snap->ps.weapon == WP_ALEVEL1_UPG || cg.snap->ps.weapon == WP_ALEVEL4 ) - return; + + if( cg.snap->ps.weapon != WP_ALEVEL5 ) + return; if( maxBarbs <= 0 || numBarbs <= 0 ) return; @@ -670,69 +637,8 @@ static void CG_DrawPlayerFbreath( rectDef_t *rect, vec4_t color, qhandle_t shade maxBarbs = BG_Weapon( cg.snap->ps.weapon )->maxAmmo; numBarbs = cg.snap->ps.ammo; - if( cg.snap->ps.weapon == WP_ALEVEL2_UPG || cg.snap->ps.weapon == WP_ALEVEL3 || cg.snap->ps.weapon == WP_ALEVEL3_UPG || cg.snap->ps.weapon == WP_ALEVEL1 || cg.snap->ps.weapon == WP_ALEVEL1_UPG || cg.snap->ps.weapon == WP_ALEVEL5 ) - return; - - if( maxBarbs <= 0 || numBarbs <= 0 ) + if( cg.snap->ps.weapon != WP_ALEVEL4 ) return; - - // adjust these first to ensure the aspect ratio of the barb image is - // preserved - CG_AdjustFrom640( &x, &y, &width, &height ); - - if( height > width ) - { - vertical = qtrue; - iconsize = width; - if( maxBarbs != 1 ) // avoid division by zero - diff = ( height - iconsize ) / (float)( maxBarbs - 1 ); - else - diff = 0; // doesn't matter, won't be used - } - else - { - vertical = qfalse; - iconsize = height; - if( maxBarbs != 1 ) - diff = ( width - iconsize ) / (float)( maxBarbs - 1 ); - else - diff = 0; - } - - //trap_R_SetColor( color ); - - for( ; numBarbs > 0; numBarbs-- ) - { - trap_R_DrawStretchPic( x, y, iconsize, iconsize, 0, 0, 1, 1, shader ); - if( vertical ) - y += diff; - else - x += diff; - } - - - trap_R_SetColor( NULL ); -} - - -/* -============== -CG_DrawPlayerBombs -============== -*/ -static void CG_DrawPlayerBombs( rectDef_t *rect, vec4_t color, qhandle_t shader ) -{ - qboolean vertical; - float x = rect->x, y = rect->y; - float width = rect->w, height = rect->h; - float diff; - int iconsize, numBarbs, maxBarbs; - - maxBarbs = BG_Weapon( cg.snap->ps.weapon )->maxAmmo; - numBarbs = cg.snap->ps.ammo; - - if( !(cg.snap->ps.weapon == WP_ALEVEL1 || cg.snap->ps.weapon == WP_ALEVEL1_UPG) ) - return; if( maxBarbs <= 0 || numBarbs <= 0 ) return; @@ -760,7 +666,7 @@ static void CG_DrawPlayerBombs( rectDef_t *rect, vec4_t color, qhandle_t shader diff = 0; } - + //trap_R_SetColor( color ); for( ; numBarbs > 0; numBarbs-- ) { @@ -776,7 +682,6 @@ static void CG_DrawPlayerBombs( rectDef_t *rect, vec4_t color, qhandle_t shader } - /* ============== CG_DrawPlayerPoisonBarbs @@ -2137,8 +2042,6 @@ static void CG_DrawTeamOverlay( rectDef_t *rect, float scale, vec4_t color ) { if( ci->curWeaponClass == PCL_ALIEN_BUILDER0 || ci->curWeaponClass == PCL_ALIEN_BUILDER0_UPG || - ci->curWeaponClass == PCL_ALIEN_LEVEL1 || - ci->curWeaponClass == PCL_ALIEN_LEVEL1_UPG || ci->curWeaponClass == WP_HBUILD ) { displayClients[ maxDisplayCount++ ] = i; @@ -2234,7 +2137,7 @@ static void CG_DrawTeamOverlay( rectDef_t *rect, float scale, vec4_t color ) } else { - if( curWeapon == WP_ALEVEL1_UPG || curWeapon == WP_ALEVEL2_UPG || + if( curWeapon == WP_ALEVEL2_UPG || curWeapon == WP_ALEVEL3_UPG ) { CG_DrawPic( x + iconSize + leftMargin, y, iconSize, @@ -3163,18 +3066,9 @@ void CG_OwnerDraw( float x, float y, float w, float h, float text_x, case CG_PLAYER_PRICKLES: CG_DrawPlayerPrickles( &rect, foreColor, shader ); break; - case CG_PLAYER_BOMBS: - CG_DrawPlayerBombs( &rect, foreColor, shader ); - break; case CG_PLAYER_POISON_BARBS: CG_DrawPlayerPoisonBarbs( &rect, foreColor, shader ); break; - case CG_DRAW_INVI_STAT: - CG_DrawInvisbleStatus( &rect, foreColor, shader ); - break; - case CG_DRAW_INVI_OVERLAY: - CG_DrawInvisbleOverlay( &rect, foreColor, shader ); - break; case CG_PLAYER_ALIEN_SENSE: CG_DrawAlienSense( &rect ); break; diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c index 5b159a6..7e20cc5 100644 --- a/src/cgame/cg_event.c +++ b/src/cgame/cg_event.c @@ -246,10 +246,6 @@ static void CG_Obituary( entityState_t *ent ) message = "^5was terminated by own flames"; break; - case MOD_ABOMB: - message = "^5bombed himself up"; - break; - default: if( gender == GENDER_FEMALE ) message = "^5killed herself"; @@ -365,12 +361,6 @@ static void CG_Obituary( entityState_t *ent ) case MOD_LEVEL0_BITE: message = "^5was bitten by^7"; break; - case MOD_LEVEL1_CLAW: - message = "^5was swiped by^7"; - Com_sprintf( className, 64, "^5's %s", - BG_ClassConfig( PCL_ALIEN_LEVEL1 )->humanName ); - message2 = className; - break; case MOD_LEVEL2_CLAW: case MOD_LEVEL2_CLAW_UPG: message = "^5was clawed by^7"; @@ -462,26 +452,12 @@ static void CG_Obituary( entityState_t *ent ) message = "^5should have used a medkit against^7"; message2 = "^5's poison"; break; - case MOD_LEVEL1_PCLOUD: - message = "^5was gassed by^7"; - Com_sprintf( className, 64, "^5's %s", - BG_ClassConfig( PCL_ALIEN_LEVEL1 )->humanName ); - message2 = className; - break; - case MOD_TELEFRAG: message = "^5tried to invade^7"; message2 = "^5's personal space"; break; - case MOD_ABOMB: - message = "^5was bombed by^7"; - Com_sprintf( className, 64, "^5's %s", - BG_ClassConfig( PCL_ALIEN_LEVEL1 )->humanName ); - message2 = className; - break; - default: message = "^5was killed by^7"; break; diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index 9f8de96..2233414 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -669,8 +669,6 @@ typedef struct centity_s particleSystem_t *jetPackPS; jetPackState_t jetPackState; - particleSystem_t *poisonCloudedPS; - particleSystem_t *entityPS; qboolean entityPSMissing; diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index bd758e6..c3f45dd 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -1614,7 +1614,6 @@ static const char *CG_FeederItemText( int feederID, int index, int column, qhand { switch( sp->weapon ) { - case WP_ALEVEL1_UPG: case WP_ALEVEL2_UPG: case WP_ALEVEL3_UPG: *handle = cgs.media.upgradeClassIconShader; diff --git a/src/cgame/cg_players.c b/src/cgame/cg_players.c index 29f6992..c8183e8 100644 --- a/src/cgame/cg_players.c +++ b/src/cgame/cg_players.c @@ -2019,50 +2019,6 @@ void CG_Player( centity_t *cent ) legs.hModel = ci->nonSegModel; legs.customSkin = ci->nonSegSkin; - // we can't hit what we can't see :P - if( es->weapon == WP_ALEVEL1_UPG ) - { - if( es->eFlags & EF_MOVER_STOP ) - { - if( !cent->invisible ) - { - cent->invisibleTime = cg.time; - cent->invisible = qtrue; - } - } - else - { - if( cent->invisible ) - { - cent->invisibleTime = cg.time; - cent->invisible = qfalse; - } - } - - if( cent->invisible ) - { - legs.shaderTime = cent->invisibleTime/1000.0f; - - if( cg.time - cent->invisibleTime < 1000.0f ) - legs.customShader = cgs.media.invisibleFadeShader; - - else{ - if( ci->team != cg.snap->ps.stats[ STAT_TEAM ] ) - legs.customShader = cgs.media.invisibleShader; - else - legs.customShader = cgs.media.invisibleShaderTeam; - } - } - else - { - if( cg.time - cent->invisibleTime < 500.0f ) - { - legs.shaderTime = (cent->invisibleTime+500.0f)/1000.0f; - legs.customShader = cgs.media.invisibleFadeShader; - } - } - } - if( ( cent->currentState.legsAnim & ~ANIM_TOGGLEBIT ) == NSPA_SWIM && es->weapon == WP_ALEVEL5) { trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, cgs.media.hummelSound ); @@ -2190,22 +2146,6 @@ void CG_Player( centity_t *cent ) head.renderfx = renderfx; trap_R_AddRefEntityToScene( &head ); - - - // if this player has been hit with poison cloud, add an effect PS - if( ( es->eFlags & EF_POISONCLOUDED ) && - ( es->number != cg.snap->ps.clientNum || cg.renderingThirdPerson ) ) - { - if( !CG_IsParticleSystemValid( ¢->poisonCloudedPS ) ) - cent->poisonCloudedPS = CG_SpawnNewParticleSystem( cgs.media.poisonCloudedPS ); - - CG_SetAttachmentTag( ¢->poisonCloudedPS->attachment, - head, head.hModel, "tag_head" ); - CG_SetAttachmentCent( ¢->poisonCloudedPS->attachment, cent ); - CG_AttachToTag( ¢->poisonCloudedPS->attachment ); - } - else if( CG_IsParticleSystemValid( ¢->poisonCloudedPS ) ) - CG_DestroyParticleSystem( ¢->poisonCloudedPS ); } // diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c index 7326ba8..c2be336 100644 --- a/src/cgame/cg_servercmds.c +++ b/src/cgame/cg_servercmds.c @@ -1291,23 +1291,6 @@ static void CG_ServerCloseMenus_f( void ) trap_SendConsoleCommand( "closemenus\n" ); } -/* -================= -CG_PoisonCloud_f -================= -*/ -static void CG_PoisonCloud_f( void ) -{ - cg.poisonedTime = cg.time; - - if( CG_IsParticleSystemValid( &cg.poisonCloudPS ) ) - { - cg.poisonCloudPS = CG_SpawnNewParticleSystem( cgs.media.poisonCloudPS ); - CG_SetAttachmentCent( &cg.poisonCloudPS->attachment, &cg.predictedPlayerEntity ); - CG_AttachToCent( &cg.poisonCloudPS->attachment ); - } -} - static void CG_GameCmds_f( void ) { int i; @@ -1349,7 +1332,6 @@ static consoleCommand_t svcommands[ ] = { "cs", CG_ConfigStringModified }, { "di", CG_DamageIndicator_f }, { "map_restart", CG_MapRestart }, - { "poisoncloud", CG_PoisonCloud_f }, { "print", CG_Print_f }, { "scores", CG_ParseScores }, { "serverclosemenus", CG_ServerCloseMenus_f }, diff --git a/src/cgame/cg_tutorial.c b/src/cgame/cg_tutorial.c index d36ecac..0819892 100644 --- a/src/cgame/cg_tutorial.c +++ b/src/cgame/cg_tutorial.c @@ -258,32 +258,6 @@ static void CG_AlienLevel0Text( char *text, playerState_t *ps ) /* =============== -CG_AlienLevel1Text -=============== -*/ -static void CG_AlienLevel1Text( char *text, playerState_t *ps ) -{ - Q_strcat( text, MAX_TUTORIAL_TEXT, - "Touch humans to grab them\n" ); - - Q_strcat( text, MAX_TUTORIAL_TEXT, - va( "Press %s to swipe\n", - CG_KeyNameForCommand( "+attack" ) ) ); - - if( ps->stats[ STAT_CLASS ] == PCL_ALIEN_LEVEL1_UPG ) - { - Q_strcat( text, MAX_TUTORIAL_TEXT, - va( "Press %s to spray poisonous gas\n", - CG_KeyNameForCommand( "+button5" ) ) ); - } - - Q_strcat( text, MAX_TUTORIAL_TEXT, - va( "Press %s to walk on walls\n", - CG_KeyNameForCommand( "+movedown" ) ) ); -} - -/* -=============== CG_AlienLevel2Text =============== */ @@ -657,11 +631,6 @@ const char *CG_TutorialText( void ) CG_AlienLevel0Text( text, ps ); break; - case PCL_ALIEN_LEVEL1: - case PCL_ALIEN_LEVEL1_UPG: - CG_AlienLevel1Text( text, ps ); - break; - case PCL_ALIEN_LEVEL2: case PCL_ALIEN_LEVEL2_UPG: CG_AlienLevel2Text( text, ps ); diff --git a/src/cgame/cg_view.c b/src/cgame/cg_view.c index 1221fe9..9145b32 100644 --- a/src/cgame/cg_view.c +++ b/src/cgame/cg_view.c @@ -782,27 +782,6 @@ void CG_OffsetFirstPersonView( void ) cg.upMoveTime = cg.time; } - if( ( cg.predictedPlayerEntity.currentState.eFlags & EF_POISONCLOUDED ) && - ( cg.time - cg.poisonedTime < PCLOUD_DISORIENT_DURATION) && - !( cg.snap->ps.pm_flags & PMF_FOLLOW ) ) - { - float scale, fraction, pitchFraction; - - scale = 1.0f - (float)( cg.time - cg.poisonedTime ) / - BG_PlayerPoisonCloudTime( &cg.predictedPlayerState ); - if( scale < 0.0f ) - scale = 0.0f; - - fraction = sin( ( cg.time - cg.poisonedTime ) / 500.0f * M_PI * PCLOUD_ROLL_FREQUENCY ) * - scale; - pitchFraction = sin( ( cg.time - cg.poisonedTime ) / 200.0f * M_PI * PCLOUD_ROLL_FREQUENCY ) * - scale; - - angles[ ROLL ] += fraction * PCLOUD_ROLL_AMPLITUDE; - angles[ YAW ] += fraction * PCLOUD_ROLL_AMPLITUDE; - angles[ PITCH ] += pitchFraction * PCLOUD_ROLL_AMPLITUDE / 2.0f; - } - // this *feels* more realisitic for humans if( cg.predictedPlayerState.stats[ STAT_TEAM ] == TEAM_HUMANS && ( cg.predictedPlayerState.pm_type == PM_NORMAL || @@ -1022,21 +1001,6 @@ static int CG_CalcFov( void ) else inwater = qfalse; - if( ( cg.predictedPlayerEntity.currentState.eFlags & EF_POISONCLOUDED ) && - ( cg.time - cg.poisonedTime < PCLOUD_DISORIENT_DURATION) && - cg.predictedPlayerState.stats[ STAT_HEALTH ] > 0 && - !( cg.snap->ps.pm_flags & PMF_FOLLOW ) ) - { - float scale = 1.0f - (float)( cg.time - cg.poisonedTime ) / - BG_PlayerPoisonCloudTime( &cg.predictedPlayerState ); - - phase = ( cg.time - cg.poisonedTime ) / 1000.0f * PCLOUD_ZOOM_FREQUENCY * M_PI * 2.0f; - v = PCLOUD_ZOOM_AMPLITUDE * sin( phase ) * scale; - fov_x += v; - fov_y += v; - } - - // set it cg.refdef.fov_x = fov_x; cg.refdef.fov_y = fov_y; |