summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormtiusane <mtiusane@users.noreply.github.com>2014-11-22 20:40:43 +0200
committermtiusane <mtiusane@users.noreply.github.com>2014-11-22 20:40:43 +0200
commit69382df33438a83a58645b9912788a47cd24552d (patch)
tree01d7e5a29f3a84abdc4f67d8515892135e62e68f /src
parentfd19ccb037e349286e3b72a1277c58079056fcc2 (diff)
parentae41a0cdf13d6cf4150d32f089d5a45fe068b241 (diff)
Merge pull request #14 from enneract/newguns
Rocket Launcher
Diffstat (limited to 'src')
-rw-r--r--src/cgame/cg_buildable.c3
-rw-r--r--src/cgame/cg_draw.c15
-rw-r--r--src/cgame/cg_event.c20
-rw-r--r--src/cgame/cg_main.c1
-rw-r--r--src/cgame/cg_tutorial.c12
-rw-r--r--src/game/bg_misc.c104
-rw-r--r--src/game/bg_public.h4
-rw-r--r--src/game/g_active.c6
-rw-r--r--src/game/g_combat.c3
-rw-r--r--src/game/g_missile.c46
-rw-r--r--src/game/g_weapon.c23
-rw-r--r--src/game/tremulous.h12
12 files changed, 157 insertions, 92 deletions
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..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";
@@ -1009,7 +1027,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..92f3826 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;
@@ -3602,6 +3602,31 @@ static const weaponAttributes_t bg_weapons[ ] =
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;
STAGE_GE_3, //int stages
@@ -3815,31 +3840,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..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,
@@ -366,7 +367,6 @@ typedef enum
WP_MGTURRET,
WP_MGTURRET2,
WP_ABUILD,
- WP_ABUILD2,
WP_HBUILD,
WP_NUM_WEAPONS
} weapon_t;
@@ -846,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_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..959067e 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;
@@ -966,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
@@ -1502,7 +1542,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..5453913 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -831,6 +831,19 @@ void LCChargeFire( gentity_t *ent, qboolean secondary )
/*
======================================================================
+
+PULSE RIFLE
+
+======================================================================
+*/
+
+void rocketLauncherFire( gentity_t *ent )
+{
+ fire_rocket( ent, muzzle, forward );
+}
+
+/*
+======================================================================
TESLA GENERATOR
======================================================================
*/
@@ -937,8 +950,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 +1788,7 @@ gclient_t *client;
bounceBallFire( ent );
break;
- case WP_ABUILD2:
+ case WP_ABUILD:
slowBlobFire( ent );
break;
@@ -1877,7 +1889,6 @@ void FireWeapon2( gentity_t *ent )
break;
case WP_ABUILD:
- case WP_ABUILD2:
case WP_HBUILD:
cancelBuildFire( ent );
break;
@@ -1974,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;
@@ -1999,7 +2013,6 @@ void FireWeapon( gentity_t *ent )
FlameTurretFire( ent );
break;
case WP_ABUILD:
- case WP_ABUILD2:
buildFire( ent, MN_A_BUILD );
break;
case WP_HBUILD:
diff --git a/src/game/tremulous.h b/src/game/tremulous.h
index 44450f2..b2932da 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 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 700
+
+
#define HBUILD_PRICE 0
#define HBUILD_REPEAT 1000
#define HBUILD_HEALRATE 18