From 2a93a38bfa8feab7e7f9be7332f75f2d2b0036e7 Mon Sep 17 00:00:00 2001 From: enneract Date: Wed, 19 Nov 2014 11:31:42 +0100 Subject: Merge WP_ABUILD and WP_ABUILD2 to free a weapon slot. --- src/cgame/cg_buildable.c | 3 +-- src/cgame/cg_draw.c | 15 +++++---------- src/cgame/cg_event.c | 2 +- src/cgame/cg_main.c | 1 - src/cgame/cg_tutorial.c | 12 +----------- 5 files changed, 8 insertions(+), 25 deletions(-) (limited to 'src/cgame') diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c index aaeaf11..909615f 100644 --- a/src/cgame/cg_buildable.c +++ b/src/cgame/cg_buildable.c @@ -436,7 +436,7 @@ void CG_InitBuildables( void ) } cgs.media.teslaZapTS = CG_RegisterTrailSystem( "models/buildables/tesla/zap" ); - //für slime + //f\FCr slime cgs.media.slimeTS = CG_RegisterTrailSystem( "models/buildables/infestationslime" ); } @@ -1229,7 +1229,6 @@ static qboolean CG_PlayerIsBuilder( buildable_t buildable ) switch( cg.predictedPlayerState.weapon ) { case WP_ABUILD: - case WP_ABUILD2: case WP_HBUILD: return BG_Buildable( buildable )->team == BG_Weapon( cg.predictedPlayerState.weapon )->team; diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index 6af1375..95ced55 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -315,8 +315,7 @@ static void CG_DrawPlayerCreditsValue( rectDef_t *rect, vec4_t color, qboolean p ps = &cg.snap->ps; //if the build timer pie is showing don't show this - if( ( cent->currentState.weapon == WP_ABUILD || - cent->currentState.weapon == WP_ABUILD2 ) && ps->stats[ STAT_MISC ] ) + if( ( cent->currentState.weapon == WP_ABUILD ) && ps->stats[ STAT_MISC ] ) return; value = ps->persistant[ PERS_CREDIT ]; @@ -467,7 +466,6 @@ static void CG_DrawPlayerClipsRing( rectDef_t *rect, vec4_t backColor, switch( weapon ) { case WP_ABUILD: - case WP_ABUILD2: case WP_HBUILD: if( buildTime > MAXIMUM_BUILD_TIME ) buildTime = MAXIMUM_BUILD_TIME; @@ -868,7 +866,6 @@ static void CG_DrawPlayerAmmoValue( rectDef_t *rect, vec4_t color ) return; case WP_ABUILD: - case WP_ABUILD2: case WP_HBUILD: value = cg.snap->ps.persistant[ PERS_BP ]; valueMarked = cg.snap->ps.persistant[ PERS_MARKEDBP ]; @@ -1036,7 +1033,6 @@ static void CG_DrawPlayerBuildTimer( rectDef_t *rect, vec4_t color ) switch( BG_PrimaryWeapon( ps->stats ) ) { case WP_ABUILD: - case WP_ABUILD2: case WP_HBUILD: break; @@ -1074,7 +1070,6 @@ static void CG_DrawPlayerClipsValue( rectDef_t *rect, vec4_t color ) case WP_NONE: case WP_BLASTER: case WP_ABUILD: - case WP_ABUILD2: case WP_HBUILD: return; @@ -1210,7 +1205,7 @@ static float CG_ChargeProgress( void ) max = LEVEL4_TRAMPLE_CHARGE_MAX; } } - else if( cg.snap->ps.weapon == WP_LUCIFER_CANNON || cg.snap->ps.weapon == WP_FLAMER ) + else if( cg.snap->ps.weapon == WP_FLAMER ) { min = LCANNON_CHARGE_TIME_MIN; @@ -1290,7 +1285,7 @@ static void CG_DrawPlayerChargeBar( rectDef_t *rect, vec4_t ref_color, color[ 3 ] = ref_color[ 3 ] * cg.chargeMeterAlpha; // Flash red for Lucifer Cannon warning - if( (cg.snap->ps.weapon == WP_LUCIFER_CANNON || cg.snap->ps.weapon == WP_FLAMER ) && + if( (cg.snap->ps.weapon == WP_FLAMER ) && cg.snap->ps.stats[ STAT_MISC ] >= LCANNON_CHARGE_TIME_WARN && ( cg.time & 128 ) ) @@ -2167,8 +2162,8 @@ static void CG_DrawTeamOverlay( rectDef_t *rect, float scale, vec4_t color ) } else { - if( curWeapon == WP_ABUILD2 || curWeapon == WP_ALEVEL1_UPG || - curWeapon == WP_ALEVEL2_UPG || curWeapon == WP_ALEVEL3_UPG ) + if( curWeapon == WP_ALEVEL1_UPG || curWeapon == WP_ALEVEL2_UPG || + curWeapon == WP_ALEVEL3_UPG ) { CG_DrawPic( x + iconSize + leftMargin, y, iconSize, iconSize, cgs.media.upgradeClassIconShader ); diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c index 49dec3f..2bd3251 100644 --- a/src/cgame/cg_event.c +++ b/src/cgame/cg_event.c @@ -1009,7 +1009,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) CG_AlienSPITEFUL_ABCESSExplosion( position, dir ); break; -//Scleim greifer schwanz für slime +//Scleim greifer schwanz f\FCr slime case EV_SLIMETRAIL: cent->currentState.weapon = WP_NONE; { diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index c7b470c..b7885ec 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -1550,7 +1550,6 @@ static const char *CG_FeederItemText( int feederID, int index, int column, qhand { switch( sp->weapon ) { - case WP_ABUILD2: case WP_ALEVEL0_UPG: case WP_ALEVEL1_UPG: case WP_ALEVEL2_UPG: diff --git a/src/cgame/cg_tutorial.c b/src/cgame/cg_tutorial.c index 6839c3a..d36ecac 100644 --- a/src/cgame/cg_tutorial.c +++ b/src/cgame/cg_tutorial.c @@ -455,6 +455,7 @@ static void CG_HumanText( char *text, playerState_t *ps ) case WP_CHAINGUN: case WP_PULSE_RIFLE: case WP_FLAMER: + case WP_LUCIFER_CANNON: Q_strcat( text, MAX_TUTORIAL_TEXT, va( "Press %s to fire the %s\n", CG_KeyNameForCommand( "+attack" ), @@ -479,17 +480,6 @@ static void CG_HumanText( char *text, playerState_t *ps ) BG_Weapon( ps->weapon )->humanName ) ); break; - case WP_LUCIFER_CANNON: - Q_strcat( text, MAX_TUTORIAL_TEXT, - va( "Hold and release %s to fire a charged shot\n", - CG_KeyNameForCommand( "+attack" ) ) ); - - Q_strcat( text, MAX_TUTORIAL_TEXT, - va( "Press %s to fire the %s\n", - CG_KeyNameForCommand( "+button5" ), - BG_Weapon( ps->weapon )->humanName ) ); - break; - case WP_HBUILD: CG_HumanCkitText( text, ps ); break; -- cgit From 9e0e1eeeb964f1eaf94622399695e4b4a2d0f1db Mon Sep 17 00:00:00 2001 From: enneract Date: Wed, 19 Nov 2014 19:57:31 +0100 Subject: Implement the Rocket Launcher. --- src/cgame/cg_event.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/cgame') diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c index 2bd3251..794b8a4 100644 --- a/src/cgame/cg_event.c +++ b/src/cgame/cg_event.c @@ -162,6 +162,16 @@ static void CG_Obituary( entityState_t *ent ) message = "^5irradiated himself"; break; + + case MOD_ROCKETL_SPLASH: + if( gender == GENDER_FEMALE ) + message = "^5blew herself up"; + else if( gender == GENDER_NEUTER ) + message = "^5blew itself up"; + else + message = "^5blew himself up"; + break; + case MOD_PSAWBLADE: if( gender == GENDER_FEMALE ) message = "^5sliced herself up"; @@ -320,6 +330,14 @@ static void CG_Obituary( entityState_t *ent ) message = "^5was caught in the fallout of^7"; message2 = "^5's ^5lucifer cannon"; break; + case MOD_ROCKETL: + message = "^5ate^7"; + message2 = "^5's ^5rocket"; + break; + case MOD_ROCKETL_SPLASH: + message = "^5almost dodged^7"; + message2 = "^5's ^5rocket"; + break; case MOD_GRENADE: message = "^5couldn't escape^7"; message2 = "^5's ^5grenade"; -- cgit From 65486f97313f6d5c6bb771abe47b7caf7689852a Mon Sep 17 00:00:00 2001 From: enneract Date: Sat, 22 Nov 2014 21:15:27 +0100 Subject: Revert removal of Lucifer Cannon's charge meter. --- src/cgame/cg_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cgame') diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index 95ced55..11bc242 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -1205,8 +1205,8 @@ static float CG_ChargeProgress( void ) max = LEVEL4_TRAMPLE_CHARGE_MAX; } } - else if( cg.snap->ps.weapon == WP_FLAMER ) + else if( cg.snap->ps.weapon == WP_LUCIFER_CANNON || cg.snap->ps.weapon == WP_FLAMER ) { min = LCANNON_CHARGE_TIME_MIN; max = LCANNON_CHARGE_TIME_MAX; -- cgit