From ea872a63017c987cb836296c3193703c75241857 Mon Sep 17 00:00:00 2001 From: Mikko Tiusanen Date: Sun, 2 Nov 2014 16:28:33 +0200 Subject: Fixed the means of death for hot dog non defensive buildings and armageddon. --- src/game/g_main.c | 2 +- src/game/g_svcmds.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/g_main.c b/src/game/g_main.c index 7011827..54b7c32 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -2614,7 +2614,7 @@ void G_ArmageddonStep( void ) if (thresholdOther > 0.0f) if (random() < thresholdOther) { ent->health = -999; ent->enemy = &g_entities[ ENTITYNUM_WORLD ]; - ent->die( ent, ent->enemy, ent->enemy, 999, MOD_UNKNOWN ); + ent->die( ent, ent->enemy, ent->enemy, 999, MOD_HDOG ); } break; } diff --git a/src/game/g_svcmds.c b/src/game/g_svcmds.c index 775b4ed..a54a9ad 100644 --- a/src/game/g_svcmds.c +++ b/src/game/g_svcmds.c @@ -610,7 +610,7 @@ static void Svcmd_Armageddon_f( void ) { ent->health = -999; ent->enemy = &g_entities[ ENTITYNUM_WORLD ]; - ent->die( ent, ent->enemy, ent->enemy, 999, MOD_UNKNOWN ); + ent->die( ent, ent->enemy, ent->enemy, 999, MOD_HDOG ); } } -- cgit 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. --- assets/models/weapons/abuild/flash0.wav | Bin 0 -> 6188 bytes assets/models/weapons/abuild/impactflesh0.wav | Bin 0 -> 40492 bytes assets/models/weapons/abuild/weapon.cfg | 12 +++- assets/models/weapons/abuildupg/flash0.wav | Bin 6188 -> 0 bytes assets/models/weapons/abuildupg/impactflesh0.wav | Bin 40492 -> 0 bytes assets/models/weapons/abuildupg/weapon.cfg | 19 ------ 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 +--- src/game/bg_misc.c | 79 ++++++++--------------- src/game/bg_public.h | 1 - src/game/g_active.c | 6 +- src/game/g_combat.c | 3 +- src/game/g_missile.c | 5 +- src/game/g_weapon.c | 7 +- 17 files changed, 52 insertions(+), 113 deletions(-) create mode 100644 assets/models/weapons/abuild/flash0.wav create mode 100644 assets/models/weapons/abuild/impactflesh0.wav delete mode 100644 assets/models/weapons/abuildupg/flash0.wav delete mode 100644 assets/models/weapons/abuildupg/impactflesh0.wav delete mode 100644 assets/models/weapons/abuildupg/weapon.cfg diff --git a/assets/models/weapons/abuild/flash0.wav b/assets/models/weapons/abuild/flash0.wav new file mode 100644 index 0000000..97e12c9 Binary files /dev/null and b/assets/models/weapons/abuild/flash0.wav differ diff --git a/assets/models/weapons/abuild/impactflesh0.wav b/assets/models/weapons/abuild/impactflesh0.wav new file mode 100644 index 0000000..53476e8 Binary files /dev/null and b/assets/models/weapons/abuild/impactflesh0.wav differ diff --git a/assets/models/weapons/abuild/weapon.cfg b/assets/models/weapons/abuild/weapon.cfg index 46cfdaa..a359c2e 100644 --- a/assets/models/weapons/abuild/weapon.cfg +++ b/assets/models/weapons/abuild/weapon.cfg @@ -5,7 +5,15 @@ icon icons/icona_builder secondary { - flashSound 0 models/weapons/abuildupg/flash0.wav - impactFleshSound 0 models/weapons/abuildupg/impactflesh0.wav + flashSound 0 models/weapons/abuild/flash0.wav + impactFleshSound 0 models/weapons/abuild/impactflesh0.wav alwaysImpact } + +tertiary +{ + missileModel models/weapons/level3upg/missile.md3 + + impactMark 64 granger_spit + impactSound 0 sound/misc/organic_bounce.wav +} diff --git a/assets/models/weapons/abuildupg/flash0.wav b/assets/models/weapons/abuildupg/flash0.wav deleted file mode 100644 index 97e12c9..0000000 Binary files a/assets/models/weapons/abuildupg/flash0.wav and /dev/null differ diff --git a/assets/models/weapons/abuildupg/impactflesh0.wav b/assets/models/weapons/abuildupg/impactflesh0.wav deleted file mode 100644 index 53476e8..0000000 Binary files a/assets/models/weapons/abuildupg/impactflesh0.wav and /dev/null differ diff --git a/assets/models/weapons/abuildupg/weapon.cfg b/assets/models/weapons/abuildupg/weapon.cfg deleted file mode 100644 index 45d154c..0000000 --- a/assets/models/weapons/abuildupg/weapon.cfg +++ /dev/null @@ -1,19 +0,0 @@ -disableIn3rdPerson -crosshair 15 gfx/2d/crosshair-alien_s - -icon icons/icona_builder - -secondary -{ - flashSound 0 models/weapons/abuildupg/flash0.wav - impactFleshSound 0 models/weapons/abuildupg/impactflesh0.wav - alwaysImpact -} - -tertiary -{ - missileModel models/weapons/level3upg/missile.md3 - - impactMark 64 granger_spit - impactSound 0 sound/misc/organic_bounce.wav -} 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; diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index 1597194..3c19b15 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -64,7 +64,7 @@ static const buildableAttributes_t bg_buildableList[ ] = ASPAWN_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 100, //int nextthink; ASPAWN_BT, //int buildTime; @@ -99,7 +99,7 @@ static const buildableAttributes_t bg_buildableList[ ] = OVERMIND_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; OVERMIND_ATTACK_REPEAT,//int nextthink; OVERMIND_BT, //int buildTime; @@ -134,7 +134,7 @@ static const buildableAttributes_t bg_buildableList[ ] = BARRICADE_SPLASHRADIUS,//int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ),//weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 100, //int nextthink; BARRICADE_BT, //int buildTime; @@ -169,7 +169,7 @@ static const buildableAttributes_t bg_buildableList[ ] = ACIDTUBE_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 200, //int nextthink; ACIDTUBE_BT, //int buildTime; @@ -204,7 +204,7 @@ static const buildableAttributes_t bg_buildableList[ ] = TRAPPER_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 100, //int nextthink; TRAPPER_BT, //int buildTime; @@ -240,7 +240,7 @@ static const buildableAttributes_t bg_buildableList[ ] = BOOSTER_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 100, //int nextthink; BOOSTER_BT, //int buildTime; @@ -274,7 +274,7 @@ static const buildableAttributes_t bg_buildableList[ ] = HIVE_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 500, //int nextthink; HIVE_BT, //int buildTime; @@ -308,7 +308,7 @@ static const buildableAttributes_t bg_buildableList[ ] = PANZER_SMALL_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 1000, //int nextthink; PANZER_SMALL_BT, //int buildTime; @@ -342,7 +342,7 @@ static const buildableAttributes_t bg_buildableList[ ] = PANZER_MEDIUM_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 1000, //int nextthink; PANZER_MEDIUM_BT, //int buildTime; @@ -376,7 +376,7 @@ static const buildableAttributes_t bg_buildableList[ ] = PANZER_LARGE_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 1000, //int nextthink; PANZER_LARGE_BT, //int buildTime; @@ -410,7 +410,7 @@ static const buildableAttributes_t bg_buildableList[ ] = TENDON_SMALL_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 1000, //int nextthink; TENDON_SMALL_BT, //int buildTime; @@ -445,7 +445,7 @@ static const buildableAttributes_t bg_buildableList[ ] = TENDON_MEDIUM_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 1000, //int nextthink; TENDON_MEDIUM_BT, //int buildTime; @@ -480,7 +480,7 @@ static const buildableAttributes_t bg_buildableList[ ] = TENDON_LARGE_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 1000, //int nextthink; TENDON_LARGE_BT, //int buildTime; @@ -516,7 +516,7 @@ static const buildableAttributes_t bg_buildableList[ ] = NET_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 1000, //int nextthink; NET_BT, //int buildTime; @@ -552,7 +552,7 @@ static const buildableAttributes_t bg_buildableList[ ] = NET_SPIKE_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 1000, //int nextthink; NET_SPIKE_BT, //int buildTime; @@ -589,7 +589,7 @@ static const buildableAttributes_t bg_buildableList[ ] = INFESTATION_SLIME_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 200, //int nextthink; INFESTATION_SLIME_BT, //int buildTime; @@ -624,7 +624,7 @@ static const buildableAttributes_t bg_buildableList[ ] = INFESTATION_THICKET_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ),//weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 1000, //int nextthink; INFESTATION_THICKET_BT, //int buildTime; @@ -660,7 +660,7 @@ static const buildableAttributes_t bg_buildableList[ ] = INFESTATION_BLISTER_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 1000, //int nextthink; INFESTATION_BLISTER_BT, //int buildTime; @@ -697,7 +697,7 @@ static const buildableAttributes_t bg_buildableList[ ] = REFLECTOR_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 1000, //int nextthink; REFLECTOR_BT, //int buildTime; @@ -731,7 +731,7 @@ static const buildableAttributes_t bg_buildableList[ ] = MUSCLE_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 500, //int nextthink; MUSCLE_BT, //int buildTime; @@ -766,7 +766,7 @@ static const buildableAttributes_t bg_buildableList[ ] = SPITEFUL_ABCESS_SPLASHRADIUS, //int splashRadius; MOD_SPITEFUL_ABCESS, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 200, //int nextthink; SPITEFUL_ABCESS_BT, //int buildTime; @@ -802,7 +802,7 @@ static const buildableAttributes_t bg_buildableList[ ] = COCOON_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 1000, //int nextthink; COCOON_BT, //int buildTime; @@ -836,7 +836,7 @@ static const buildableAttributes_t bg_buildableList[ ] = ORGANIC_BULB_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 1000, //int nextthink; ORGANIC_BULB_BT, //int buildTime; @@ -871,7 +871,7 @@ static const buildableAttributes_t bg_buildableList[ ] = POD_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 1000, //int nextthink; POD_BT, //int buildTime; @@ -905,7 +905,7 @@ static const buildableAttributes_t bg_buildableList[ ] = POD_STUMP_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 1000, //int nextthink; POD_STUMP_BT, //int buildTime; @@ -938,7 +938,7 @@ static const buildableAttributes_t bg_buildableList[ ] = CREEPCOLONY_SPLASHRADIUS, //int splashRadius; MOD_ASPAWN, //int meansOfDeath; TEAM_ALIENS, //int team; - ( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 1000, //int nextthink; CREEPCOLONY_BT, //int buildTime; @@ -2248,7 +2248,7 @@ static const classAttributes_t bg_classList[ ] = 0.0f, //float fallDamage; ABUILDER_UPG_REGEN, //float regenRate; SCA_FOVWARPS|SCA_WALLCLIMBER|SCA_ALIENSENSE, //int abilities; - WP_ABUILD2, //weapon_t startWeapon + WP_ABUILD, //weapon_t startWeapon 105.0f, //float buildDist; 110, //int fov; 0.001f, //float bob; @@ -3815,31 +3815,6 @@ static const weaponAttributes_t bg_weapons[ ] = qfalse, //int usesEnergy; ABUILDER_BUILD_REPEAT,//int repeatRate1; ABUILDER_CLAW_REPEAT, //int repeatRate2; - 0, //int repeatRate3; - 0, //int reloadTime; - ABUILDER_CLAW_K_SCALE,//float knockbackScale; - qtrue, //qboolean hasAltMode; - qfalse, //qboolean hasThirdMode; - qfalse, //qboolean canZoom; - 90.0f, //float zoomFov; - qtrue, //qboolean purchasable; - qfalse, //qboolean longRanged; - TEAM_ALIENS //team_t team; - }, - { - WP_ABUILD2, //int weaponNum; - 0, //int price; - STAGE_GE_1, //int stages - SLOT_WEAPON, //int slots; - "abuildupg", //char *weaponName; - "Alien build weapon2",//char *humanName; - "", - 0, //int maxAmmo; - 0, //int maxClips; - qtrue, //int infiniteAmmo; - qfalse, //int usesEnergy; - ABUILDER_BUILD_REPEAT,//int repeatRate1; - ABUILDER_CLAW_REPEAT, //int repeatRate2; ABUILDER_BLOB_REPEAT, //int repeatRate3; 0, //int reloadTime; ABUILDER_CLAW_K_SCALE,//float knockbackScale; diff --git a/src/game/bg_public.h b/src/game/bg_public.h index b7df340..3473924 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -366,7 +366,6 @@ typedef enum WP_MGTURRET, WP_MGTURRET2, WP_ABUILD, - WP_ABUILD2, WP_HBUILD, WP_NUM_WEAPONS } weapon_t; diff --git a/src/game/g_active.c b/src/game/g_active.c index f36ec46..c7a8977 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -847,7 +847,7 @@ void ClientTimerActions( gentity_t *ent, int msec ) client->ps.stats[ STAT_STAMINA ] += rate_stamina; } - if( weapon == WP_ABUILD || weapon == WP_ABUILD2 || + if( weapon == WP_ABUILD || BG_InventoryContainsWeapon( WP_HBUILD, client->ps.stats ) ) { // Update build timer @@ -870,7 +870,6 @@ void ClientTimerActions( gentity_t *ent, int msec ) switch( weapon ) { case WP_ABUILD: - case WP_ABUILD2: case WP_HBUILD: // Set validity bit on buildable @@ -1088,8 +1087,7 @@ void ClientTimerActions( gentity_t *ent, int msec ) { client->time10000 -= 10000; - if( ent->client->ps.weapon == WP_ABUILD || - ent->client->ps.weapon == WP_ABUILD2 ) + if( ent->client->ps.weapon == WP_ABUILD ) { AddScore( ent, ALIEN_BUILDER_SCOREINC ); } diff --git a/src/game/g_combat.c b/src/game/g_combat.c index 87a6bd6..bddafaa 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -184,8 +184,7 @@ float G_CamperRewardBonus( gentity_t *self ) // exclude builders: switch( BG_GetPlayerWeapon( &self->client->ps ) ) { - case WP_ABUILD: - case WP_ABUILD2: + case WP_ABUILD: case WP_HBUILD: return 1.0f; default: ; } diff --git a/src/game/g_missile.c b/src/game/g_missile.c index 74b351c..74ee72b 100644 --- a/src/game/g_missile.c +++ b/src/game/g_missile.c @@ -207,8 +207,7 @@ void G_MissileImpact( gentity_t *ent, trace_t *trace ) if( other->client ) { if( ( other->client->ps.stats[ STAT_STATE ] & SS_SLOWLOCKED ) - && ( other->s.weapon < WP_ALEVEL3 - || ( other->s.weapon == WP_ABUILD2 || other->s.weapon == WP_ABUILD ) ) ) + && ( other->s.weapon < WP_ALEVEL3 || other->s.weapon == WP_ABUILD ) ) { other->client->ps.stats[ STAT_STATE ] |= SS_BLOBLOCKED; other->client->lastLockTime = level.time; @@ -1502,7 +1501,7 @@ gentity_t *fire_slowBlob( gentity_t *self, vec3_t start, vec3_t dir ) bolt->think = G_ExplodeMissile; bolt->s.eType = ET_MISSILE; bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN; - bolt->s.weapon = WP_ABUILD2; + bolt->s.weapon = WP_ABUILD; bolt->s.generic1 = self->s.generic1; //weaponMode bolt->r.ownerNum = self->s.number; bolt->parent = self; diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index bbc4e08..4e08523 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -937,8 +937,7 @@ void cancelBuildFire( gentity_t *ent ) ent->client->ps.stats[ STAT_BUILDABLE ] = BA_NONE; return; } - if( ent->client->ps.weapon == WP_ABUILD || - ent->client->ps.weapon == WP_ABUILD2 ) + if( ent->client->ps.weapon == WP_ABUILD ) meleeAttack( ent, ABUILDER_CLAW_RANGE, ABUILDER_CLAW_WIDTH, ABUILDER_CLAW_WIDTH, ABUILDER_CLAW_DMG, MOD_ABUILDER_CLAW ); } @@ -1776,7 +1775,7 @@ gclient_t *client; bounceBallFire( ent ); break; - case WP_ABUILD2: + case WP_ABUILD: slowBlobFire( ent ); break; @@ -1877,7 +1876,6 @@ void FireWeapon2( gentity_t *ent ) break; case WP_ABUILD: - case WP_ABUILD2: case WP_HBUILD: cancelBuildFire( ent ); break; @@ -1999,7 +1997,6 @@ void FireWeapon( gentity_t *ent ) FlameTurretFire( ent ); break; case WP_ABUILD: - case WP_ABUILD2: buildFire( ent, MN_A_BUILD ); break; case WP_HBUILD: -- 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. --- assets/models/ammo/rocket/rocket.md3 | Bin 0 -> 8668 bytes assets/models/ammo/rocket/rocket.tga | Bin 0 -> 164045 bytes assets/models/ammo/rocket/rocket_1.md3 | Bin 0 -> 4444 bytes assets/models/ammo/rocket/rocket_2.md3 | Bin 0 -> 2860 bytes assets/models/ammo/rocket/thrustc1.tga | Bin 0 -> 49691 bytes assets/models/ammo/rocket/thrustc2.tga | Bin 0 -> 49691 bytes assets/models/ammo/rocket/thrustc3.tga | Bin 0 -> 49691 bytes assets/models/weapons/rocketl/copy of rocketl.md3 | Bin 0 -> 5428 bytes assets/models/weapons/rocketl/flare.tga | Bin 0 -> 12827 bytes assets/models/weapons/rocketl/flarey.tga | Bin 0 -> 66075 bytes assets/models/weapons/rocketl/flash0.wav | Bin 0 -> 99924 bytes assets/models/weapons/rocketl/impact0.wav | Bin 0 -> 276880 bytes assets/models/weapons/rocketl/muzzy.tga | Bin 0 -> 49691 bytes assets/models/weapons/rocketl/newflare.tga | Bin 0 -> 49691 bytes assets/models/weapons/rocketl/rocketl.md3 | Bin 0 -> 5796 bytes assets/models/weapons/rocketl/rocketl_hand.md3 | Bin 0 -> 2964 bytes assets/models/weapons/rocketl/skin.tga | Bin 0 -> 447738 bytes assets/models/weapons/rocketl/weapon.cfg | 19 +++ assets/models/weapons/rocketl/wide.tga | Bin 0 -> 49691 bytes assets/rocketl-copyright | 11 ++ assets/scripts/general_human_buildables.particle | 2 +- assets/scripts/hw_rocketl.particle | 135 ++++++++++++++++++++++ assets/scripts/hw_rocketl.shader | 58 ++++++++++ src/cgame/cg_event.c | 18 +++ src/game/bg_misc.c | 25 ++++ src/game/bg_public.h | 3 + src/game/g_missile.c | 41 +++++++ src/game/g_weapon.c | 16 +++ src/game/tremulous.h | 12 ++ 29 files changed, 339 insertions(+), 1 deletion(-) create mode 100644 assets/models/ammo/rocket/rocket.md3 create mode 100644 assets/models/ammo/rocket/rocket.tga create mode 100644 assets/models/ammo/rocket/rocket_1.md3 create mode 100644 assets/models/ammo/rocket/rocket_2.md3 create mode 100644 assets/models/ammo/rocket/thrustc1.tga create mode 100644 assets/models/ammo/rocket/thrustc2.tga create mode 100644 assets/models/ammo/rocket/thrustc3.tga create mode 100644 assets/models/weapons/rocketl/copy of rocketl.md3 create mode 100644 assets/models/weapons/rocketl/flare.tga create mode 100644 assets/models/weapons/rocketl/flarey.tga create mode 100644 assets/models/weapons/rocketl/flash0.wav create mode 100644 assets/models/weapons/rocketl/impact0.wav create mode 100644 assets/models/weapons/rocketl/muzzy.tga create mode 100644 assets/models/weapons/rocketl/newflare.tga create mode 100644 assets/models/weapons/rocketl/rocketl.md3 create mode 100644 assets/models/weapons/rocketl/rocketl_hand.md3 create mode 100644 assets/models/weapons/rocketl/skin.tga create mode 100644 assets/models/weapons/rocketl/weapon.cfg create mode 100644 assets/models/weapons/rocketl/wide.tga create mode 100644 assets/rocketl-copyright create mode 100644 assets/scripts/hw_rocketl.particle create mode 100644 assets/scripts/hw_rocketl.shader diff --git a/assets/models/ammo/rocket/rocket.md3 b/assets/models/ammo/rocket/rocket.md3 new file mode 100644 index 0000000..c181114 Binary files /dev/null and b/assets/models/ammo/rocket/rocket.md3 differ diff --git a/assets/models/ammo/rocket/rocket.tga b/assets/models/ammo/rocket/rocket.tga new file mode 100644 index 0000000..47e4606 Binary files /dev/null and b/assets/models/ammo/rocket/rocket.tga differ diff --git a/assets/models/ammo/rocket/rocket_1.md3 b/assets/models/ammo/rocket/rocket_1.md3 new file mode 100644 index 0000000..668f3f9 Binary files /dev/null and b/assets/models/ammo/rocket/rocket_1.md3 differ diff --git a/assets/models/ammo/rocket/rocket_2.md3 b/assets/models/ammo/rocket/rocket_2.md3 new file mode 100644 index 0000000..c2af2a0 Binary files /dev/null and b/assets/models/ammo/rocket/rocket_2.md3 differ diff --git a/assets/models/ammo/rocket/thrustc1.tga b/assets/models/ammo/rocket/thrustc1.tga new file mode 100644 index 0000000..581b972 Binary files /dev/null and b/assets/models/ammo/rocket/thrustc1.tga differ diff --git a/assets/models/ammo/rocket/thrustc2.tga b/assets/models/ammo/rocket/thrustc2.tga new file mode 100644 index 0000000..718f95d Binary files /dev/null and b/assets/models/ammo/rocket/thrustc2.tga differ diff --git a/assets/models/ammo/rocket/thrustc3.tga b/assets/models/ammo/rocket/thrustc3.tga new file mode 100644 index 0000000..ea1cc68 Binary files /dev/null and b/assets/models/ammo/rocket/thrustc3.tga differ diff --git a/assets/models/weapons/rocketl/copy of rocketl.md3 b/assets/models/weapons/rocketl/copy of rocketl.md3 new file mode 100644 index 0000000..a66b033 Binary files /dev/null and b/assets/models/weapons/rocketl/copy of rocketl.md3 differ diff --git a/assets/models/weapons/rocketl/flare.tga b/assets/models/weapons/rocketl/flare.tga new file mode 100644 index 0000000..86516ca Binary files /dev/null and b/assets/models/weapons/rocketl/flare.tga differ diff --git a/assets/models/weapons/rocketl/flarey.tga b/assets/models/weapons/rocketl/flarey.tga new file mode 100644 index 0000000..37f56dc Binary files /dev/null and b/assets/models/weapons/rocketl/flarey.tga differ diff --git a/assets/models/weapons/rocketl/flash0.wav b/assets/models/weapons/rocketl/flash0.wav new file mode 100644 index 0000000..009febe Binary files /dev/null and b/assets/models/weapons/rocketl/flash0.wav differ diff --git a/assets/models/weapons/rocketl/impact0.wav b/assets/models/weapons/rocketl/impact0.wav new file mode 100644 index 0000000..f232ff1 Binary files /dev/null and b/assets/models/weapons/rocketl/impact0.wav differ diff --git a/assets/models/weapons/rocketl/muzzy.tga b/assets/models/weapons/rocketl/muzzy.tga new file mode 100644 index 0000000..a452b3f Binary files /dev/null and b/assets/models/weapons/rocketl/muzzy.tga differ diff --git a/assets/models/weapons/rocketl/newflare.tga b/assets/models/weapons/rocketl/newflare.tga new file mode 100644 index 0000000..fd6866e Binary files /dev/null and b/assets/models/weapons/rocketl/newflare.tga differ diff --git a/assets/models/weapons/rocketl/rocketl.md3 b/assets/models/weapons/rocketl/rocketl.md3 new file mode 100644 index 0000000..4119209 Binary files /dev/null and b/assets/models/weapons/rocketl/rocketl.md3 differ diff --git a/assets/models/weapons/rocketl/rocketl_hand.md3 b/assets/models/weapons/rocketl/rocketl_hand.md3 new file mode 100644 index 0000000..2a03eed Binary files /dev/null and b/assets/models/weapons/rocketl/rocketl_hand.md3 differ diff --git a/assets/models/weapons/rocketl/skin.tga b/assets/models/weapons/rocketl/skin.tga new file mode 100644 index 0000000..59e1399 Binary files /dev/null and b/assets/models/weapons/rocketl/skin.tga differ diff --git a/assets/models/weapons/rocketl/weapon.cfg b/assets/models/weapons/rocketl/weapon.cfg new file mode 100644 index 0000000..9711bd9 --- /dev/null +++ b/assets/models/weapons/rocketl/weapon.cfg @@ -0,0 +1,19 @@ +weaponModel models/weapons/rocketl/rocketl.md3 +icon icons/iconw_lucifer +crosshair 48 gfx/2d/crosshair-lcannon_s + +primary +{ + missileModel models/ammo/rocket/rocket.md3 + + missileSound models/weapons/lcannon/missle.wav + missileParticleSystem models/weapons/rocketl/missilePS + + flashDlightColor 1.0 0.7 0.0 + flashSound 0 models/weapons/rocketl/flash0.wav + + impactMark 32 gfx/marks/bullet_mrk + impactSound 0 models/weapons/rocketl/impact0.wav + impactParticleSystem models/weapons/rocketl/impactPS +} + diff --git a/assets/models/weapons/rocketl/wide.tga b/assets/models/weapons/rocketl/wide.tga new file mode 100644 index 0000000..04a59b4 Binary files /dev/null and b/assets/models/weapons/rocketl/wide.tga differ diff --git a/assets/rocketl-copyright b/assets/rocketl-copyright new file mode 100644 index 0000000..fcb3c04 --- /dev/null +++ b/assets/rocketl-copyright @@ -0,0 +1,11 @@ +Rocket Launcher assets: + +flash0.wav: + http://freesound.org/people/shaynecantly/sounds/131555/ + +impact0.wav: + http://freesound.org/people/sarge4267/sounds/102734/ + http://freesound.org/people/sarge4267/sounds/102719/ + +Models and textures: + http://openarena.ws/ diff --git a/assets/scripts/general_human_buildables.particle b/assets/scripts/general_human_buildables.particle index 52ffb64..8a40717 100644 --- a/assets/scripts/general_human_buildables.particle +++ b/assets/scripts/general_human_buildables.particle @@ -261,4 +261,4 @@ humanBuildableDestroyedPS delay 0 period 0 - ~0% } -} \ No newline at end of file +} diff --git a/assets/scripts/hw_rocketl.particle b/assets/scripts/hw_rocketl.particle new file mode 100644 index 0000000..891ac18 --- /dev/null +++ b/assets/scripts/hw_rocketl.particle @@ -0,0 +1,135 @@ +models/weapons/rocketl/missilePS +{ + ejector + { + particle + { + shader sync gfx/sprites/smoke + + displacement 0 0 0 ~0 + + velocityType static + velocityDir linear + velocityMagnitude 50 + velocity 0 0 1 ~20 + + accelerationType static + accelerationDir linear + accelerationMagnitude 50 + acceleration 0 0 0 0 + + radius 0 0.0 60.0 + alpha 0 1.0 0.0 + rotation ~360 ~360 - + bounce 0.5 + + lifeTime 700~50% + } + + count infinite + delay 0 + period 20 - ~0% + } +} + +models/weapons/rocketl/impactPS +{ + ejector + { + particle + { + shader sync rocketFlareParticle + displacement 0 0 0 0 + + velocityType normal + + velocityDir linear + + velocityMagnitude 0 + velocity 0 0 0 ~0 + + accelerationType static + accelerationDir linear + acceleration 0 0 0 ~0 + accelerationMagnitude 0 + + radius 0 50 100 + alpha 250 1 0 + rotation 0 ~-15 ~15 + bounce 0.0 + + lifeTime 40 + } + + count 1 + delay 0 + period 0 - 0 + } + + ejector + { + particle + { + shader sync gfx/sprites/smoke + //shader sync flame3 flame4 flame5 flame6 flame7 flame8 flame9 flame10 flame11 flame12 flame13 flame14 flame15 flame16 flame17 flame18 flame19 flame20 flame21 flame22 flame23 flame24 flame25 + displacement 0 0 0 0 + + velocityType normal + + velocityDir linear + + velocityMagnitude 100 + velocity 0 0 0 ~35 + + accelerationType static + accelerationDir linear + acceleration 0 0 -1 ~5 + accelerationMagnitude 25 + + radius 0 0 60 + alpha 250 .75 0 + rotation 0 ~-15 ~15 + bounce 0.0 + + lifeTime 800~200 + } + + count 10 + delay 0 + period 0 - 0 + } + + ejector + { + particle + { + shader sync flame3 flame4 flame5 flame6 flame7 flame8 flame9 flame10 flame11 flame12 flame13 flame14 flame15 flame16 flame17 flame18 flame19 flame20 flame21 flame22 flame23 flame24 flame25 + displacement 0 0 0 0 + + velocityType normal + + velocityDir linear + + velocityMagnitude 100 + velocity 0 0 0 ~35 + + accelerationType static + accelerationDir linear + acceleration 0 0 -1 ~5 + accelerationMagnitude 25 + + radius 0 0 100 + alpha 250 .75 0 + rotation 0 ~-15 ~15 + bounce 0.0 + color 0 { 0.8 0.2 0.2 } - + + lifeTime 300~100 + } + + count 1 + delay 0 + period 0 - 0 + } +} + diff --git a/assets/scripts/hw_rocketl.shader b/assets/scripts/hw_rocketl.shader new file mode 100644 index 0000000..28c56cb --- /dev/null +++ b/assets/scripts/hw_rocketl.shader @@ -0,0 +1,58 @@ +rocketFlash +{ + deformVertexes autosprite + { + clampmap models/weapons/rocketl/muzzy.tga + blendfunc add + tcMod rotate 1246 + } + { + clampmap models/weapons/rocketl/muzzy.tga + blendfunc add + tcMod rotate -1246 + } +} + +rocketFlare +{ + deformVertexes autosprite + { + clampmap models/weapons/rocketl/wide.tga + blendfunc add + rgbGen const ( 0.980392 0.882353 0.737255 ) + } +} + +rocketFlareParticle +{ + { + clampmap models/weapons/rocketl/wide.tga + blendfunc add + rgbGen const ( 0.980392 0.882353 0.737255 ) + } +} + +rocketThrust +{ + cull disable + { + clampmap models/weapons/rocketl/flarey.tga + blendfunc add + rgbGen const ( 0.541176 0.341176 0.156863 ) + tcMod rotate -96 + tcMod stretch sin 0.3 0.7 0 8 + } + { + clampmap models/weapons/rocketl/wide.tga + blendfunc add + rgbGen const ( 0.843137 0.588235 0.4 ) + } + { + clampmap models/weapons/rocketl/newflare.tga + blendfunc add + rgbGen const ( 0.713726 0.270588 0.121569 ) + tcMod rotate 46 + tcMod stretch inversesawtooth 0.6 0.4 0 4 + } +} + 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"; diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index 3c19b15..92f3826 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -3601,6 +3601,31 @@ static const weaponAttributes_t bg_weapons[ ] = qtrue, //qboolean longRanged; TEAM_HUMANS //team_t team; }, + { + WP_ROCKET_LAUNCHER, //int weaponNum; + ROCKETL_PRICE, //int price; + STAGE_GE_5, //int stages + SLOT_WEAPON, //int slots; + "rocketl", //char *weaponName; + "[yefarms]Rocket Launcher", //char *humanName; + "This is a rocket launcher. It launches rockets.", + ROCKETL_AMMO, //int maxAmmo; + ROCKETL_CLIPS, //int maxClips; + qfalse, //int infiniteAmmo; + qfalse, //int usesEnergy; + ROCKETL_REPEAT, //int repeatRate1; + 0, //int repeatRate2; + 0, //int repeatRate3; + ROCKETL_RELOAD, //int reloadTime; + ROCKETL_K_SCALE, //float knockbackScale; + qfalse, //qboolean hasAltMode; + qfalse, //qboolean hasThirdMode; + qfalse, //qboolean canZoom; + 90.0f, //float zoomFov; + qtrue, //qboolean purchasable; + qtrue, //qboolean longRanged; + TEAM_HUMANS //team_t team; + }, { WP_GRENADE, //int weaponNum; GRENADE_PRICE, //int price; diff --git a/src/game/bg_public.h b/src/game/bg_public.h index 3473924..e4f21ac 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -357,6 +357,7 @@ typedef enum WP_FLAMER, WP_PULSE_RIFLE, WP_LUCIFER_CANNON, + WP_ROCKET_LAUNCHER, WP_GRENADE, WP_SMOKE, WP_MINE, @@ -845,6 +846,8 @@ typedef enum MOD_LCANNON_SPLASH, MOD_FLAMER, MOD_FLAMER_SPLASH, + MOD_ROCKETL, + MOD_ROCKETL_SPLASH, MOD_GRENADE, MOD_PSAWBLADE, MOD_MINE, diff --git a/src/game/g_missile.c b/src/game/g_missile.c index 74ee72b..959067e 100644 --- a/src/game/g_missile.c +++ b/src/game/g_missile.c @@ -965,6 +965,47 @@ gentity_t *fire_luciferCannon( gentity_t *self, vec3_t start, vec3_t dir, return bolt; } + +/* +================= +fire_rocket +================= +*/ +gentity_t *fire_rocket( gentity_t *self, vec3_t start, vec3_t dir ) +{ + gentity_t *bolt; + + VectorNormalize (dir); + + bolt = G_Spawn(); + bolt->classname = "rocket"; + bolt->pointAgainstWorld = qtrue; + bolt->nextthink = level.time + 10000; + bolt->think = G_ExplodeMissile; + bolt->s.eType = ET_MISSILE; + bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN; + bolt->s.weapon = WP_ROCKET_LAUNCHER; + bolt->s.generic1 = self->s.generic1; //weaponMode + bolt->r.ownerNum = self->s.number; + bolt->parent = self; + bolt->damage = ROCKETL_DAMAGE; + bolt->splashDamage = ROCKETL_DAMAGE / 2; + bolt->splashRadius = ROCKETL_RADIUS; + bolt->methodOfDeath = MOD_ROCKETL; + bolt->splashMethodOfDeath = MOD_ROCKETL_SPLASH; + bolt->clipmask = MASK_SHOT; + bolt->target_ent = NULL; + bolt->r.mins[ 0 ] = bolt->r.mins[ 1 ] = bolt->r.mins[ 2 ] = -ROCKETL_SIZE; + bolt->r.maxs[ 0 ] = bolt->r.maxs[ 1 ] = bolt->r.maxs[ 2 ] = ROCKETL_SIZE; + bolt->s.pos.trType = TR_LINEAR; + bolt->s.pos.trTime = level.time - MISSILE_PRESTEP_TIME; // move a bit on the very first frame + VectorCopy( start, bolt->s.pos.trBase ); + VectorScale( dir, ROCKETL_SPEED, bolt->s.pos.trDelta ); + SnapVector( bolt->s.pos.trDelta ); // save net bandwidth + VectorCopy( start, bolt->r.currentOrigin ); + return bolt; +} + /* ================= launch_grenade diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index 4e08523..5453913 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -829,6 +829,19 @@ void LCChargeFire( gentity_t *ent, qboolean secondary ) ent->client->ps.stats[ STAT_MISC ] = 0; } +/* +====================================================================== + +PULSE RIFLE + +====================================================================== +*/ + +void rocketLauncherFire( gentity_t *ent ) +{ + fire_rocket( ent, muzzle, forward ); +} + /* ====================================================================== TESLA GENERATOR @@ -1972,6 +1985,9 @@ void FireWeapon( gentity_t *ent ) case WP_PAIN_SAW: painSawFire( ent ); break; + case WP_ROCKET_LAUNCHER: + rocketLauncherFire( ent ); + break; case WP_GRENADE: throwGrenade( ent ); break; diff --git a/src/game/tremulous.h b/src/game/tremulous.h index 44450f2..bad35e6 100644 --- a/src/game/tremulous.h +++ b/src/game/tremulous.h @@ -538,6 +538,18 @@ TREMULOUS EDGE MOD SRC FILE #define FLAMER_CHARGE_AMMO 50 // ammo cost of a full charge shot #define FLAMER_SECONDARY_REPEAT 200 +#define ROCKETL_PRICE 800 +#define ROCKETL_AMMO 20 +#define ROCKETL_CLIPS 0 +#define ROCKETL_RELOAD 0 +#define ROCKETL_REPEAT 800 +#define ROCKETL_K_SCALE 5235251.0f +#define ROCKETL_DAMAGE HDM(100) +#define ROCKETL_RADIUS 120 +#define ROCKETL_SIZE 5 +#define ROCKETL_SPEED 900 + + #define HBUILD_PRICE 0 #define HBUILD_REPEAT 1000 #define HBUILD_HEALRATE 18 -- cgit From 73d005979462a1b10169010cfc69f3d09e9823c7 Mon Sep 17 00:00:00 2001 From: Mikko Tiusanen Date: Thu, 20 Nov 2014 23:27:03 +0200 Subject: Removed the extra '\' at end of automatic level gain message. --- src/game/g_admin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/g_admin.c b/src/game/g_admin.c index 5d11ac4..aa07e6f 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -3859,7 +3859,7 @@ void G_admin_add_score( gentity_t *ent, int score ) { a = ent->client->pers.admin; a->level = n->level; admin_log( va( "^7%d (%s^7) \"%s" S_COLOR_WHITE "\"", a->level, a->guid, a->name ) ); - AP( va("print \"^3setlevel: ^7%s^7 was given level %d admin rights (^7%s^7) through score gained\\\n\"", + AP( va("print \"^3setlevel: ^7%s^7 was given level %d admin rights (^7%s^7) through score gained\n\"", a->name, a->level, n->name ) ); // admin_writeconfig(); } -- cgit From 25d730ee25bdca309f563e1566ed2b2b3df74143 Mon Sep 17 00:00:00 2001 From: enneract Date: Sat, 22 Nov 2014 19:30:47 +0100 Subject: Tweak Rocket Launcher's settings. --- src/game/tremulous.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/game/tremulous.h b/src/game/tremulous.h index bad35e6..b2932da 100644 --- a/src/game/tremulous.h +++ b/src/game/tremulous.h @@ -538,16 +538,16 @@ TREMULOUS EDGE MOD SRC FILE #define FLAMER_CHARGE_AMMO 50 // ammo cost of a full charge shot #define FLAMER_SECONDARY_REPEAT 200 -#define ROCKETL_PRICE 800 -#define ROCKETL_AMMO 20 -#define ROCKETL_CLIPS 0 -#define ROCKETL_RELOAD 0 -#define ROCKETL_REPEAT 800 -#define ROCKETL_K_SCALE 5235251.0f -#define ROCKETL_DAMAGE HDM(100) +#define ROCKETL_PRICE 700 +#define ROCKETL_AMMO 6 +#define ROCKETL_CLIPS 4 +#define ROCKETL_RELOAD 2000 +#define ROCKETL_REPEAT 1000 +#define ROCKETL_K_SCALE 1.0f +#define ROCKETL_DAMAGE HDM(88) #define ROCKETL_RADIUS 120 #define ROCKETL_SIZE 5 -#define ROCKETL_SPEED 900 +#define ROCKETL_SPEED 700 #define HBUILD_PRICE 0 -- cgit From ae41a0cdf13d6cf4150d32f089d5a45fe068b241 Mon Sep 17 00:00:00 2001 From: enneract Date: Sat, 22 Nov 2014 19:34:18 +0100 Subject: Add a proper icon for Rocket Launcher. --- assets/icons/iconw_rocketl.tga | Bin 0 -> 3772 bytes assets/models/weapons/rocketl/copy of rocketl.md3 | Bin 5428 -> 0 bytes assets/models/weapons/rocketl/weapon.cfg | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 assets/icons/iconw_rocketl.tga delete mode 100644 assets/models/weapons/rocketl/copy of rocketl.md3 diff --git a/assets/icons/iconw_rocketl.tga b/assets/icons/iconw_rocketl.tga new file mode 100644 index 0000000..0aa1e97 Binary files /dev/null and b/assets/icons/iconw_rocketl.tga differ diff --git a/assets/models/weapons/rocketl/copy of rocketl.md3 b/assets/models/weapons/rocketl/copy of rocketl.md3 deleted file mode 100644 index a66b033..0000000 Binary files a/assets/models/weapons/rocketl/copy of rocketl.md3 and /dev/null differ diff --git a/assets/models/weapons/rocketl/weapon.cfg b/assets/models/weapons/rocketl/weapon.cfg index 9711bd9..e5dafc6 100644 --- a/assets/models/weapons/rocketl/weapon.cfg +++ b/assets/models/weapons/rocketl/weapon.cfg @@ -1,5 +1,5 @@ weaponModel models/weapons/rocketl/rocketl.md3 -icon icons/iconw_lucifer +icon icons/iconw_rocketl crosshair 48 gfx/2d/crosshair-lcannon_s primary -- 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(-) 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 From 28fbbadc326e609cd57113a645f4636c1a6f50f7 Mon Sep 17 00:00:00 2001 From: enneract Date: Sat, 22 Nov 2014 21:37:25 +0100 Subject: Tweak Rocket Launcher's settings again. --- src/game/g_missile.c | 2 +- src/game/tremulous.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/game/g_missile.c b/src/game/g_missile.c index 959067e..f9096ef 100644 --- a/src/game/g_missile.c +++ b/src/game/g_missile.c @@ -989,7 +989,7 @@ gentity_t *fire_rocket( gentity_t *self, vec3_t start, vec3_t dir ) bolt->r.ownerNum = self->s.number; bolt->parent = self; bolt->damage = ROCKETL_DAMAGE; - bolt->splashDamage = ROCKETL_DAMAGE / 2; + bolt->splashDamage = ROCKETL_DAMAGE; bolt->splashRadius = ROCKETL_RADIUS; bolt->methodOfDeath = MOD_ROCKETL; bolt->splashMethodOfDeath = MOD_ROCKETL_SPLASH; diff --git a/src/game/tremulous.h b/src/game/tremulous.h index b2932da..e7512d5 100644 --- a/src/game/tremulous.h +++ b/src/game/tremulous.h @@ -539,9 +539,9 @@ TREMULOUS EDGE MOD SRC FILE #define FLAMER_SECONDARY_REPEAT 200 #define ROCKETL_PRICE 700 -#define ROCKETL_AMMO 6 -#define ROCKETL_CLIPS 4 -#define ROCKETL_RELOAD 2000 +#define ROCKETL_AMMO 24 +#define ROCKETL_CLIPS 0 +#define ROCKETL_RELOAD 0 #define ROCKETL_REPEAT 1000 #define ROCKETL_K_SCALE 1.0f #define ROCKETL_DAMAGE HDM(88) -- cgit From 0458519416307eee4b3b0df3b6fd7d2ab8880c1d Mon Sep 17 00:00:00 2001 From: enneract Date: Sat, 22 Nov 2014 21:58:54 +0100 Subject: Sync modNames with meansOfDeath_t enum. --- src/game/g_combat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/game/g_combat.c b/src/game/g_combat.c index bddafaa..b437e45 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -94,6 +94,8 @@ char *modNames[ ] = "MOD_LCANNON_SPLASH", "MOD_FLAMER", "MOD_FLAMER_SPLASH", + "MOD_ROCKETL", + "MOD_ROCKETL_SPLASH", "MOD_GRENADE", "MOD_PSAWBLADE", "MOD_MINE", -- cgit From 1b951e6f35222d76553ed8c824dad2ecc634b7af Mon Sep 17 00:00:00 2001 From: enneract Date: Sat, 22 Nov 2014 22:31:34 +0100 Subject: Keep modNames and meansOfDeath_t enum synced. --- src/game/bg_mod.h | 68 +++++++++++++++++++++++++++++++++++++++++++++++ src/game/bg_public.h | 71 +++---------------------------------------------- src/game/g_combat.c | 74 +++------------------------------------------------- 3 files changed, 74 insertions(+), 139 deletions(-) create mode 100644 src/game/bg_mod.h diff --git a/src/game/bg_mod.h b/src/game/bg_mod.h new file mode 100644 index 0000000..5e4245b --- /dev/null +++ b/src/game/bg_mod.h @@ -0,0 +1,68 @@ +MOD( MOD_UNKNOWN ), +MOD( MOD_HDOG ), +MOD( MOD_SHOTGUN ), +MOD( MOD_BLASTER ), +MOD( MOD_PAINSAW ), +MOD( MOD_MACHINEGUN ), +MOD( MOD_CHAINGUN ), +MOD( MOD_PRIFLE ), +MOD( MOD_MDRIVER ), +MOD( MOD_LASGUN ), +MOD( MOD_LCANNON ), +MOD( MOD_LCANNON_SPLASH ), +MOD( MOD_FLAMER ), +MOD( MOD_FLAMER_SPLASH ), +MOD( MOD_ROCKETL ), +MOD( MOD_ROCKETL_SPLASH ), +MOD( MOD_GRENADE ), +MOD( MOD_PSAWBLADE ), +MOD( MOD_MINE ), +MOD( MOD_FLAMES ), +MOD( MOD_SMOKE ), +MOD( MOD_SPITEFUL_ABCESS ), +MOD( MOD_WATER ), +MOD( MOD_SLIME ), +MOD( MOD_LAVA ), +MOD( MOD_CRUSH ), +MOD( MOD_TELEFRAG ), +MOD( MOD_FALLING ), +MOD( MOD_SUICIDE ), +MOD( MOD_TARGET_LASER ), +MOD( MOD_TRIGGER_HURT ), +MOD( MOD_ABUILDER_CLAW ), +MOD( MOD_LEVEL0_BITE ), +MOD( MOD_LEVEL1_CLAW ), +MOD( MOD_LEVEL1_PCLOUD ), +MOD( MOD_LEVEL3_CLAW ), +MOD( MOD_LEVEL3_POUNCE ), +MOD( MOD_LEVEL5_POUNCE ), +MOD( MOD_LEVEL5_PRICKLES ), +MOD( MOD_LEVEL3_BOUNCEBALL ), +MOD( MOD_LEVEL2_CLAW ), +MOD( MOD_LEVEL2_ZAP ), +MOD( MOD_LEVEL5_CLAW ), +MOD( MOD_LEVEL5_ZAP ), +MOD( MOD_LEVEL5_BOUNCEBALL ), +MOD( MOD_LEVEL2_BOUNCEBALL ), +MOD( MOD_LEVEL4_CLAW ), +MOD( MOD_LEVEL4_TRAMPLE ), +MOD( MOD_LEVEL4_CRUSH ), +MOD( MOD_SLOWBLOB ), +MOD( MOD_POISON ), +MOD( MOD_INFECTION ), +MOD( MOD_SWARM ), +MOD( MOD_MD2 ), +MOD( MOD_HSPAWN ), +MOD( MOD_TESLAGEN ), +MOD( MOD_MGTURRET ), +MOD( MOD_MGTURRET2 ), +MOD( MOD_REACTOR ), +MOD( MOD_ASPAWN ), +MOD( MOD_ATUBE ), +MOD( MOD_OVERMIND ), +MOD( MOD_SLAP ), +MOD( MOD_DECONSTRUCT ), +MOD( MOD_REPLACE ), +MOD( MOD_NOCREEP ), +MOD( MOD_NOBP ), +MOD( MOD_ABOMB ) diff --git a/src/game/bg_public.h b/src/game/bg_public.h index e4f21ac..2ca9e32 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -832,74 +832,9 @@ typedef enum // means of death typedef enum { - MOD_UNKNOWN, - MOD_HDOG, - MOD_SHOTGUN, - MOD_BLASTER, - MOD_PAINSAW, - MOD_MACHINEGUN, - MOD_CHAINGUN, - MOD_PRIFLE, - MOD_MDRIVER, - MOD_LASGUN, - MOD_LCANNON, - MOD_LCANNON_SPLASH, - MOD_FLAMER, - MOD_FLAMER_SPLASH, - MOD_ROCKETL, - MOD_ROCKETL_SPLASH, - MOD_GRENADE, - MOD_PSAWBLADE, - MOD_MINE, - MOD_FLAMES, - MOD_SMOKE, - MOD_SPITEFUL_ABCESS, - MOD_WATER, - MOD_SLIME, - MOD_LAVA, - MOD_CRUSH, - MOD_TELEFRAG, - MOD_FALLING, - MOD_SUICIDE, - MOD_TARGET_LASER, - MOD_TRIGGER_HURT, - MOD_ABUILDER_CLAW, - MOD_LEVEL0_BITE, - MOD_LEVEL1_CLAW, - MOD_LEVEL1_PCLOUD, - MOD_LEVEL3_CLAW, - MOD_LEVEL3_POUNCE, - MOD_LEVEL5_POUNCE, - MOD_LEVEL5_PRICKLES, - MOD_LEVEL3_BOUNCEBALL, - MOD_LEVEL2_CLAW, - MOD_LEVEL2_ZAP, - MOD_LEVEL5_CLAW, - MOD_LEVEL5_ZAP, - MOD_LEVEL5_BOUNCEBALL, - MOD_LEVEL2_BOUNCEBALL, - MOD_LEVEL4_CLAW, - MOD_LEVEL4_TRAMPLE, - MOD_LEVEL4_CRUSH, - MOD_SLOWBLOB, - MOD_POISON, - MOD_INFECTION, - MOD_SWARM, - MOD_MD2, - MOD_HSPAWN, - MOD_TESLAGEN, - MOD_MGTURRET, - MOD_MGTURRET2, - MOD_REACTOR, - MOD_ASPAWN, - MOD_ATUBE, - MOD_OVERMIND, - MOD_SLAP, - MOD_DECONSTRUCT, - MOD_REPLACE, - MOD_NOCREEP, - MOD_NOBP, - MOD_ABOMB +#define MOD(x) x +#include "bg_mod.h" +#undef MOD } meansOfDeath_t; diff --git a/src/game/g_combat.c b/src/game/g_combat.c index b437e45..e43d036 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -80,77 +80,9 @@ void LookAtKiller( gentity_t *self, gentity_t *inflictor, gentity_t *attacker ) // these are just for logging, the client prints its own messages char *modNames[ ] = { - "MOD_UNKNOWN", - "MOD_HDOG", - "MOD_SHOTGUN", - "MOD_BLASTER", - "MOD_PAINSAW", - "MOD_MACHINEGUN", - "MOD_CHAINGUN", - "MOD_PRIFLE", - "MOD_MDRIVER", - "MOD_LASGUN", - "MOD_LCANNON", - "MOD_LCANNON_SPLASH", - "MOD_FLAMER", - "MOD_FLAMER_SPLASH", - "MOD_ROCKETL", - "MOD_ROCKETL_SPLASH", - "MOD_GRENADE", - "MOD_PSAWBLADE", - "MOD_MINE", - "MOD_FLAMES", - "MOD_SMOKE", - "MOD_SPITEFUL_ABCESS", - "MOD_WATER", - "MOD_SLIME", - "MOD_LAVA", - "MOD_CRUSH", - "MOD_TELEFRAG", - "MOD_FALLING", - "MOD_SUICIDE", - "MOD_TARGET_LASER", - "MOD_TRIGGER_HURT", - - "MOD_ABUILDER_CLAW", - "MOD_LEVEL0_BITE", - "MOD_LEVEL1_CLAW", - "MOD_LEVEL1_PCLOUD", - "MOD_LEVEL3_CLAW", - "MOD_LEVEL3_POUNCE", - "MOD_LEVEL5_POUNCE", - "MOD_LEVEL5_PRICKLES", - "MOD_LEVEL3_BOUNCEBALL", - "MOD_LEVEL2_CLAW", - "MOD_LEVEL2_ZAP", - "MOD_LEVEL5_CLAW", - "MOD_LEVEL5_ZAP", - "MOD_LEVEL5_BOUNCEBALL", - "MOD_LEVEL2_BOUNCEBALL", - "MOD_LEVEL4_CLAW", - "MOD_LEVEL4_TRAMPLE", - "MOD_LEVEL4_CRUSH", - - "MOD_SLOWBLOB", - "MOD_POISON", - "MOD_INFECTION", - "MOD_SWARM", - "MOD_MD2", - "MOD_HSPAWN", - "MOD_TESLAGEN", - "MOD_MGTURRET", - "MOD_MGTURRET2", - "MOD_REACTOR", - - "MOD_ASPAWN", - "MOD_ATUBE", - "MOD_OVERMIND", - "MOD_SLAP", - "MOD_DECONSTRUCT", - "MOD_REPLACE", - "MOD_NOCREEP", - "MOD_NOBP", - "MOD_ABOMB" +#define MOD(x) #x +#include "bg_mod.h" +#undef MOD }; /* -- cgit From 47baa4bc2f5f3c6e195d429ef020bbc86ac27ce7 Mon Sep 17 00:00:00 2001 From: Mikko Tiusanen Date: Sun, 23 Nov 2014 13:45:04 +0200 Subject: Added check around the EDGE_VERSION define in main for easy override from build. --- src/game/g_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/game/g_main.c b/src/game/g_main.c index 54b7c32..4777f71 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -26,9 +26,12 @@ TREMULOUS EDGE MOD SRC FILE =========================================================================== */ #include "g_local.h" +#include "edge_version.h" #define G_MOD_VERSION "Aardvark 0.5x" SVN_VERSION -#define EDGE_MOD_VERSION "7.0.x" +#ifndef EDGE_MOD_VERSION +#define EDGE_MOD_VERSION "7.5.x" +#endif level_locals_t level; typedef struct -- cgit From 3fbd7735fcd32ff124fe806e39f6a8f0842dc534 Mon Sep 17 00:00:00 2001 From: enneract Date: Sun, 23 Nov 2014 17:59:09 +0100 Subject: Make reflectors reflect rockets. --- src/game/g_missile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/g_missile.c b/src/game/g_missile.c index f9096ef..830d72a 100644 --- a/src/game/g_missile.c +++ b/src/game/g_missile.c @@ -287,7 +287,7 @@ void G_MissileImpact( gentity_t *ent, trace_t *trace ) return; } } - else if ( other->s.eType == ET_BUILDABLE && other->s.modelindex == BA_A_REFLECTOR && ( !strcmp( ent->classname, "lcannon" ) || !strcmp( ent->classname, "pulse" ) || !strcmp( ent->classname, "lasgun" ) ) ) + else if ( other->s.eType == ET_BUILDABLE && other->s.modelindex == BA_A_REFLECTOR && ( !strcmp( ent->classname, "lcannon" ) || !strcmp( ent->classname, "pulse" ) || !strcmp( ent->classname, "lasgun" ) || !strcmp( ent->classname, "rocket" ) ) ) { G_BounceMissile( ent, trace ); -- cgit From 16a039697805bccc9937e54e87965979e0a51992 Mon Sep 17 00:00:00 2001 From: Mikko Tiusanen Date: Sun, 30 Nov 2014 23:39:44 +0200 Subject: The myscore command now displays the level based on score only even for admins. --- src/game/g_cmds.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 39a87b9..8595b60 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -3820,19 +3820,18 @@ void G_UnEscapeString( char *in, char *out, int len ) void Cmd_MyScore_f( gentity_t *ent ) { - g_admin_level_t *n; + g_admin_level_t *l,*n; if ( !ent || !ent->client->pers.admin ) { ADMP( "This command is only available for registered players.\n" ); return; } - if ( n = G_admin_level_next( G_admin_level( ent->client->pers.admin->level ) ) ) { + l = G_admin_find_level_for_score( ent->client->pers.admin->score ); + if ( n = G_admin_level_next( G_admin_level( l->level ) ) ) { ADMP( va( "^7Level %d (%s^7) total score earned: %d next level: %d\n", - ent->client->pers.admin->level, G_admin_level( ent->client->pers.admin->level )->name, - ent->client->pers.admin->score, n->score ) ); + l->level, G_admin_level( l->level )->name, ent->client->pers.admin->score, n->score ) ); } else { ADMP( va( "^7Level %d (%s^7) total score earned: %d (max level)\n", - ent->client->pers.admin->level, G_admin_level( ent->client->pers.admin->level )->name, - ent->client->pers.admin->score ) ); + l->level, G_admin_level( l->level )->name, ent->client->pers.admin->score ) ); } } -- cgit From 233d282ff4635a8a71267079939e1bbf12285028 Mon Sep 17 00:00:00 2001 From: Mikko Tiusanen Date: Mon, 1 Dec 2014 00:35:56 +0200 Subject: Added the missing (generated) version header. --- src/game/edge_version.h | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 src/game/edge_version.h diff --git a/src/game/edge_version.h b/src/game/edge_version.h new file mode 100644 index 0000000..12518ab --- /dev/null +++ b/src/game/edge_version.h @@ -0,0 +1,3 @@ +#ifndef EDGE_MOD_VERSION +#define EDGE_MOD_VERSION "7.5d" +#endif -- cgit From 2b47fae476112b24205c343cf6f0e7f4cd55af46 Mon Sep 17 00:00:00 2001 From: Mikko Tiusanen Date: Mon, 1 Dec 2014 19:59:32 +0200 Subject: Auto balance mode 2 no longer prevents people from spawning when there's no spawns left in the enemy team. --- src/game/g_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/game/g_main.c b/src/game/g_main.c index 4777f71..65e5d41 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -1090,6 +1090,7 @@ void G_SpawnClients( team_t team ) if( g_teamForceBalance.integer == 2 && !level.humanTeamLocked && !level.alienTeamLocked && + level.numHumanSpawns > 0 && level.numLiveAlienClients-level.numHumanClients > 0 ) numSpawns = -1; } @@ -1100,6 +1101,7 @@ void G_SpawnClients( team_t team ) if( g_teamForceBalance.integer == 2 && !level.humanTeamLocked && !level.alienTeamLocked && + level.numAlienSpawns > 0 && level.numLiveHumanClients-level.numAlienClients > 0 ) numSpawns = -1; } -- cgit From 714b137d73ec84c5f7cea147c44ac0e737d7c6df Mon Sep 17 00:00:00 2001 From: Mikko Tiusanen Date: Mon, 1 Dec 2014 20:21:06 +0200 Subject: Disabled prifle 2ndary fire lock in place for small aliens. --- src/game/g_missile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/game/g_missile.c b/src/game/g_missile.c index 830d72a..fddfe3b 100644 --- a/src/game/g_missile.c +++ b/src/game/g_missile.c @@ -206,13 +206,14 @@ void G_MissileImpact( gentity_t *ent, trace_t *trace ) { if( other->client ) { + /* NOTE: Locking enemies completely in place disabled for now. if( ( other->client->ps.stats[ STAT_STATE ] & SS_SLOWLOCKED ) && ( other->s.weapon < WP_ALEVEL3 || other->s.weapon == WP_ABUILD ) ) { other->client->ps.stats[ STAT_STATE ] |= SS_BLOBLOCKED; other->client->lastLockTime = level.time; } - else if( other->s.weapon >= WP_ALEVEL3 && other->s.weapon < WP_BLASTER + else */if( other->s.weapon >= WP_ALEVEL3 && other->s.weapon < WP_BLASTER && other->client->blobs <= 3 ) { other->client->lastSlowTime = level.time; -- cgit From 4c5cdb7663951909daf4c8fc77313eb20eacc884 Mon Sep 17 00:00:00 2001 From: Mikko Tiusanen Date: Tue, 2 Dec 2014 00:01:47 +0200 Subject: Slightly improved damage of defensive structures on both sides. Some containers are now faster to build for both sides. Increased the speed of prifle 2ndary fire projectile. --- src/game/tremulous.h | 60 ++++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/src/game/tremulous.h b/src/game/tremulous.h index e7512d5..d05ebe4 100644 --- a/src/game/tremulous.h +++ b/src/game/tremulous.h @@ -79,7 +79,7 @@ TREMULOUS EDGE MOD SRC FILE #define ALIEN_SPAWN_REPEAT_TIME 11000 #define ALIEN_REGEN_DAMAGE_TIME 2000 //msec since damage that regen starts again #define ALIEN_REGEN_NOCREEP_MOD (1.0f/3.0f) //regen off creep -#define ALIEN_MAX_FRAGS 18 +#define ALIEN_MAX_FRAGS 9 #define ALIEN_MAX_CREDITS (ALIEN_MAX_FRAGS*ALIEN_CREDITS_PER_KILL) #define ALIEN_CREDITS_PER_KILL 400 #define ALIEN_TK_SUICIDE_PENALTY 150 @@ -345,7 +345,7 @@ TREMULOUS EDGE MOD SRC FILE #define STAMINA_BLACKOUT_LEVEL -800 #define HUMAN_SPAWN_REPEAT_TIME 11000 #define HUMAN_REGEN_DAMAGE_TIME 2000 //msec since damage before dcc repairs -#define HUMAN_MAX_CREDITS 4000 +#define HUMAN_MAX_CREDITS 2000 #define HUMAN_TK_SUICIDE_PENALTY 150 #define HUMAN_BUILDER_SCOREINC 50 // builders receive this many points every 10 seconds #define ALIEN_BUILDER_SCOREINC AVM(100) // builders receive this many points every 10 seconds @@ -511,7 +511,7 @@ TREMULOUS EDGE MOD SRC FILE #define PRIFLE_DMG HDM(9) #define PRIFLE_SPEED 1200 #define PRIFLE_SIZE 5 -#define PRIFLE_SECONDARY_SPEED 800 +#define PRIFLE_SECONDARY_SPEED 900 #define PRIFLE_SECONDARY_REPEAT 400 #define LCANNON_PRICE 600 @@ -539,8 +539,8 @@ TREMULOUS EDGE MOD SRC FILE #define FLAMER_SECONDARY_REPEAT 200 #define ROCKETL_PRICE 700 -#define ROCKETL_AMMO 24 -#define ROCKETL_CLIPS 0 +#define ROCKETL_AMMO 8 +#define ROCKETL_CLIPS 3 #define ROCKETL_RELOAD 0 #define ROCKETL_REPEAT 1000 #define ROCKETL_K_SCALE 1.0f @@ -665,20 +665,20 @@ TREMULOUS EDGE MOD SRC FILE #define ACIDTUBE_BP 6 #define ACIDTUBE_BT 8000 -#define ACIDTUBE_HEALTH ABHM(125) +#define ACIDTUBE_HEALTH ABHM(130) #define ACIDTUBE_REGEN 10 #define ACIDTUBE_SPLASHDAMAGE 50 #define ACIDTUBE_SPLASHRADIUS 100 #define ACIDTUBE_CREEPSIZE 30 #define ACIDTUBE_DAMAGE 8 #define ACIDTUBE_RANGE 300.0f -#define ACIDTUBE_REPEAT 300 +#define ACIDTUBE_REPEAT 280 #define ACIDTUBE_REPEAT_ANIM 2000 #define ACIDTUBE_VALUE ABVM(ACIDTUBE_BP) #define HIVE_BP 8 #define HIVE_BT 13000 -#define HIVE_HEALTH ABHM(125) +#define HIVE_HEALTH ABHM(130) #define HIVE_REGEN 10 #define HIVE_SPLASHDAMAGE 30 #define HIVE_SPLASHRADIUS 200 @@ -688,7 +688,7 @@ TREMULOUS EDGE MOD SRC FILE #define HIVE_REPEAT 3000 #define HIVE_K_SCALE 1.0f #define HIVE_DMG 80 -#define HIVE_SPEED 320.0f +#define HIVE_SPEED 340.0f #define HIVE_DIR_CHANGE_PERIOD 500 #define HIVE_VALUE ABVM(HIVE_BP) @@ -720,7 +720,7 @@ TREMULOUS EDGE MOD SRC FILE #define OVERMIND_VALUE ABVM(50) #define PANZER_SMALL_BP 1 -#define PANZER_SMALL_BT 6000 +#define PANZER_SMALL_BT 3000 #define PANZER_SMALL_HEALTH ABHM(100) #define PANZER_SMALL_REGEN 1 #define PANZER_SMALL_SPLASHDAMAGE 1 @@ -729,7 +729,7 @@ TREMULOUS EDGE MOD SRC FILE #define PANZER_SMALL_VALUE ABVM(PANZER_SMALL_BP) #define PANZER_MEDIUM_BP 2 -#define PANZER_MEDIUM_BT 15000 +#define PANZER_MEDIUM_BT 9000 #define PANZER_MEDIUM_HEALTH ABHM(250) #define PANZER_MEDIUM_REGEN 1 #define PANZER_MEDIUM_SPLASHDAMAGE 5 @@ -738,7 +738,7 @@ TREMULOUS EDGE MOD SRC FILE #define PANZER_MEDIUM_VALUE ABVM(PANZER_MEDIUM_BP) #define PANZER_LARGE_BP 5 -#define PANZER_LARGE_BT 20000 +#define PANZER_LARGE_BT 18000 #define PANZER_LARGE_HEALTH ABHM(450) #define PANZER_LARGE_REGEN 1 #define PANZER_LARGE_SPLASHDAMAGE 10 @@ -945,7 +945,7 @@ TREMULOUS EDGE MOD SRC FILE #define MGTURRET2_BT 20000 #define MGTURRET2_HEALTH HBHM(300) #define MGTURRET2_SPLASHDAMAGE 1 -#define MGTURRET2_SPLASHRADIUS 170 +#define MGTURRET2_SPLASHRADIUS 120 #define MGTURRET2_ANGULARSPEED 12 #define MGTURRET2_ACCURACY_TO_FIRE 0 #define MGTURRET2_VERTICALCAP 40 // +/- maximum pitch @@ -953,8 +953,8 @@ TREMULOUS EDGE MOD SRC FILE #define MGTURRET2_K_SCALE 1.0f #define MGTURRET2_RANGE 50.0f #define MGTURRET2_SPREAD 300 -#define MGTURRET2_DMG HDM(16) -#define MGTURRET2_SPINUP_TIME 600 // time between target sighted and fire +#define MGTURRET2_DMG HDM(18) +#define MGTURRET2_SPINUP_TIME 550 // time between target sighted and fire #define MGTURRET2_VALUE HBVM(MGTURRET2_BP) #define FLAMER2_LIFETIME 350.0f @@ -966,7 +966,7 @@ TREMULOUS EDGE MOD SRC FILE #define TESLAGEN_REPEAT 250 #define TESLAGEN_K_SCALE 4.0f #define TESLAGEN_RANGE 225 -#define TESLAGEN_DMG HDM(11) +#define TESLAGEN_DMG HDM(12) #define TESLAGEN_VALUE HBVM(TESLAGEN_BP) #define DC_BP 15 @@ -1008,36 +1008,36 @@ TREMULOUS EDGE MOD SRC FILE //EDGE BUILDINGS HUMANS #define CONTAINER_SMALL_BP 1 -#define CONTAINER_SMALL_BT 5000 +#define CONTAINER_SMALL_BT 3000 #define CONTAINER_SMALL_HEALTH HBHM(60) #define CONTAINER_SMALL_SPLASHDAMAGE 1 #define CONTAINER_SMALL_SPLASHRADIUS 10 #define CONTAINER_SMALL_VALUE HBVM(CONTAINER_SMALL_BP) #define CONTAINER_MEDIUM_BP 2 -#define CONTAINER_MEDIUM_BT 14000 +#define CONTAINER_MEDIUM_BT 9000 #define CONTAINER_MEDIUM_HEALTH HBHM(250) #define CONTAINER_MEDIUM_SPLASHDAMAGE 5 #define CONTAINER_MEDIUM_SPLASHRADIUS 40 #define CONTAINER_MEDIUM_VALUE HBVM(CONTAINER_MEDIUM_BP) #define CONTAINER_LARGE_BP 5 -#define CONTAINER_LARGE_BT 20000 +#define CONTAINER_LARGE_BT 18000 #define CONTAINER_LARGE_HEALTH HBHM(450) #define CONTAINER_LARGE_SPLASHDAMAGE 10 #define CONTAINER_LARGE_SPLASHRADIUS 70 #define CONTAINER_LARGE_VALUE HBVM(CONTAINER_LARGE_BP) -#define PLATE_SMALL_BP 1 +#define PLATE_SMALL_BP 2 #define PLATE_SMALL_BT 4000 -#define PLATE_SMALL_HEALTH HBHM(25) +#define PLATE_SMALL_HEALTH HBHM(100) #define PLATE_SMALL_SPLASHDAMAGE 5 #define PLATE_SMALL_SPLASHRADIUS 10 #define PLATE_SMALL_VALUE HBVM(PLATE_SMALL_BP) -#define PLATE_LARGE_BP 3 +#define PLATE_LARGE_BP 4 #define PLATE_LARGE_BT 13000 -#define PLATE_LARGE_HEALTH HBHM(100) +#define PLATE_LARGE_HEALTH HBHM(200) #define PLATE_LARGE_SPLASHDAMAGE 5 #define PLATE_LARGE_SPLASHRADIUS 100 #define PLATE_LARGE_VALUE HBVM(PLATE_LARGE_BP) @@ -1057,21 +1057,21 @@ TREMULOUS EDGE MOD SRC FILE #define FENCE_ROD_VALUE HBVM(FENCE_ROD_BP) #define BARRIER_LINE_BP 2 -#define BARRIER_LINE_BT 12000 -#define BARRIER_LINE_HEALTH HBHM(300) +#define BARRIER_LINE_BT 10000 +#define BARRIER_LINE_HEALTH HBHM(350) #define BARRIER_LINE_SPLASHDAMAGE 10 #define BARRIER_LINE_SPLASHRADIUS 50 #define BARRIER_LINE_VALUE HBVM(BARRIER_LINE_BP) #define BARRIER_CORNER_BP 2 -#define BARRIER_CORNER_BT 12000 -#define BARRIER_CORNER_HEALTH HBHM(300) +#define BARRIER_CORNER_BT 10000 +#define BARRIER_CORNER_HEALTH HBHM(350) #define BARRIER_CORNER_SPLASHDAMAGE 10 #define BARRIER_CORNER_SPLASHRADIUS 50 #define BARRIER_CORNER_VALUE HBVM(BARRIER_CORNER_BP) #define BARRIER_POINT_BP 3 -#define BARRIER_POINT_BT 12000 +#define BARRIER_POINT_BT 10000 #define BARRIER_POINT_HEALTH HBHM(350) #define BARRIER_POINT_SPLASHDAMAGE 10 #define BARRIER_POINT_SPLASHRADIUS 50 @@ -1087,14 +1087,14 @@ TREMULOUS EDGE MOD SRC FILE #define SHIELD_VALUE HBVM(SHIELD_BP) #define LADDER_BP 5 -#define LADDER_BT 8000 +#define LADDER_BT 4000 #define LADDER_HEALTH HBHM(155) #define LADDER_SPLASHDAMAGE 15 #define LADDER_SPLASHRADIUS 250 #define LADDER_VALUE HBVM(LADDER_BP) #define TEFLON_FOIL_BP 1 -#define TEFLON_FOIL_BT 2000 +#define TEFLON_FOIL_BT 1500 #define TEFLON_FOIL_HEALTH HBHM(50) #define TEFLON_FOIL_SPLASHDAMAGE 1 #define TEFLON_FOIL_SPLASHRADIUS 1 -- cgit From 1a59a05174d3ed6e6b75b8d9e2b5b074ebf41b38 Mon Sep 17 00:00:00 2001 From: Mikko Tiusanen Date: Tue, 2 Dec 2014 21:59:52 +0200 Subject: Added support for configuring refinery/colony effects on own and enemy team's bp pool. --- src/game/edge_version.h | 2 +- src/game/g_buildable.c | 32 +++++++++++--------------------- src/game/g_local.h | 2 ++ src/game/g_main.c | 10 +++++++--- 4 files changed, 21 insertions(+), 25 deletions(-) diff --git a/src/game/edge_version.h b/src/game/edge_version.h index 12518ab..d5e3ab5 100644 --- a/src/game/edge_version.h +++ b/src/game/edge_version.h @@ -1,3 +1,3 @@ #ifndef EDGE_MOD_VERSION -#define EDGE_MOD_VERSION "7.5d" +#define EDGE_MOD_VERSION "7.5e" #endif diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 841038f..d132890 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -398,30 +398,20 @@ Note: 'pos' can be NULL, in this case return the overall BP of the team. int G_GetBuildPoints( const vec3_t pos, team_t team ) { int value = 0; - - if( !G_Overmind( ) && team == TEAM_ALIENS ) - { - return 0; - } - else if( team == TEAM_ALIENS ) - { + switch(team) { + case TEAM_ALIENS: + if ( !G_Overmind( ) ) return 0; value = level.alienBuildPoints; - } - else if( !G_Reactor( ) && team == TEAM_HUMANS ) - { - return 0; - } - else if( team == TEAM_HUMANS ) - { + break; + case TEAM_HUMANS: + if ( !G_Reactor( ) ) return 0; value = level.humanBuildPoints; - } - else - return 0; - - if( ( value > 0 ) && ( G_TimeTilSuddenDeath( ) <= 0 ) ) + break; + default: return 0; - else - return value; + } + if( ( value > 0 ) && ( G_TimeTilSuddenDeath( ) <= 0 ) ) return 0; + return value; } /* diff --git a/src/game/g_local.h b/src/game/g_local.h index 1b120a8..32b6075 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -1300,6 +1300,8 @@ extern vmCvar_t g_AutoLevelMinTeamSize; extern vmCvar_t g_RageQuitScorePenalty; extern vmCvar_t g_DretchTurretDamage; extern vmCvar_t g_DretchBuildingDamage; +extern vmCvar_t g_OwnTeamBPFactor; +extern vmCvar_t g_EnemyTeamBPFactor; void trap_Print( const char *fmt ); void trap_Error( const char *fmt ); diff --git a/src/game/g_main.c b/src/game/g_main.c index 65e5d41..10df6c0 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -203,6 +203,8 @@ vmCvar_t g_AutoLevelMinTeamSize; vmCvar_t g_RageQuitScorePenalty; vmCvar_t g_DretchTurretDamage; vmCvar_t g_DretchBuildingDamage; +vmCvar_t g_OwnTeamBPFactor; +vmCvar_t g_EnemyTeamBPFactor; // copy cvars that can be set in worldspawn so they can be restored later static char cv_gravity[ MAX_CVAR_VALUE_STRING ]; @@ -372,7 +374,9 @@ static cvarTable_t gameCvarTable[ ] = { &g_AutoLevelMinTeamSize, "g_AutoLevelMinTeamSize", "3", CVAR_ARCHIVE, 0, qfalse }, { &g_RageQuitScorePenalty, "g_RageQuitScorePenalty", "2000", CVAR_ARCHIVE, 0, qfalse }, { &g_DretchTurretDamage, "g_DretchTurretDamage", "1", CVAR_ARCHIVE, 0, qfalse }, - { &g_DretchBuildingDamage, "g_DretchBuildingDamage", "0.5", CVAR_ARCHIVE, 0, qfalse } + { &g_DretchBuildingDamage, "g_DretchBuildingDamage", "0.5", CVAR_ARCHIVE, 0, qfalse }, + { &g_OwnTeamBPFactor, "g_OwnTeamBPFactor", "1.0", CVAR_ARCHIVE, 0, qfalse }, + { &g_EnemyTeamBPFactor, "g_EnemyTeamBPFactor", "0.0", CVAR_ARCHIVE, 0, qfalse } }; static int gameCvarTableSize = sizeof( gameCvarTable ) / sizeof( gameCvarTable[ 0 ] ); void G_InitGame( int levelTime, int randomSeed, int restart ); @@ -1394,8 +1398,8 @@ void G_CalculateBuildPoints( void ) hFixed = h_refineries * g_humanRefineryBuildPoints.value; // LimitSum( g_maxFixedBuildPoints.value, 1.0f, &aFixed, &hFixed ); - level.alienExtraBuildPoints = aVar + aFixed; - level.humanExtraBuildPoints = hVar + hFixed; + level.alienExtraBuildPoints = g_OwnTeamBPFactor.value * (aVar + aFixed) + g_EnemyTeamBPFactor.value * (hVar + hFixed); + level.humanExtraBuildPoints = g_OwnTeamBPFactor.value * (hVar + hFixed) + g_EnemyTeamBPFactor.value * (aVar + aFixed); level.humanBuildPoints += level.humanExtraBuildPoints; level.alienBuildPoints += level.alienExtraBuildPoints; -- cgit