summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/bg_misc.c50
-rw-r--r--src/game/bg_pmove.c30
-rw-r--r--src/game/bg_public.h17
-rw-r--r--src/game/g_active.c37
-rw-r--r--src/game/g_combat.c8
-rw-r--r--src/game/g_local.h2
-rw-r--r--src/game/g_missile.c49
-rw-r--r--src/game/g_weapon.c128
-rw-r--r--src/game/tremulous.h18
9 files changed, 162 insertions, 177 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c
index aea70b2b..8876af15 100644
--- a/src/game/bg_misc.c
+++ b/src/game/bg_misc.c
@@ -1522,7 +1522,7 @@ classAttributes_t bg_classList[ ] =
SOLDIER_REGEN, //int regenRate;
SCA_WALLCLIMBER|SCA_NOWEAPONDRIFT|
SCA_FOVWARPS|SCA_ALIENSENSE|SCA_NOFOOTSTEPS, //int abilities;
- WP_VENOM, //weapon_t startWeapon
+ WP_SOLDIER, //weapon_t startWeapon
0.0f, //float buildDist;
140, //int fov;
0.0f, //float bob;
@@ -1560,7 +1560,7 @@ classAttributes_t bg_classList[ ] =
SCA_NOWEAPONDRIFT|
SCA_FOVWARPS|SCA_WALLCLIMBER|SCA_ALIENSENSE|
SCA_NOFOOTSTEPS, //int abilities;
- WP_GRAB_CLAW, //weapon_t startWeapon
+ WP_HYDRA, //weapon_t startWeapon
0.0f, //float buildDist;
120, //int fov;
0.001f, //float bob;
@@ -1598,7 +1598,7 @@ classAttributes_t bg_classList[ ] =
SCA_NOWEAPONDRIFT|SCA_FOVWARPS|
SCA_WALLCLIMBER|SCA_ALIENSENSE|
SCA_NOFOOTSTEPS, //int abilities;
- WP_GRAB_CLAW_UPG, //weapon_t startWeapon
+ WP_HYDRA_UPG, //weapon_t startWeapon
0.0f, //float buildDist;
120, //int fov;
0.001f, //float bob;
@@ -1635,7 +1635,7 @@ classAttributes_t bg_classList[ ] =
CHIMERA_REGEN, //int regenRate;
SCA_NOWEAPONDRIFT|SCA_WALLJUMPER|
SCA_FOVWARPS|SCA_ALIENSENSE|SCA_NOFOOTSTEPS, //int abilities;
- WP_AREA_ZAP, //weapon_t startWeapon
+ WP_CHIMERA, //weapon_t startWeapon
0.0f, //float buildDist;
90, //int fov;
0.0f, //float bob;
@@ -1672,7 +1672,7 @@ classAttributes_t bg_classList[ ] =
CHIMERA_UPG_REGEN, //int regenRate;
SCA_NOWEAPONDRIFT|SCA_WALLJUMPER|
SCA_FOVWARPS|SCA_ALIENSENSE|SCA_NOFOOTSTEPS, //int abilities;
- WP_DIRECT_ZAP, //weapon_t startWeapon
+ WP_CHIMERA_UPG, //weapon_t startWeapon
0.0f, //float buildDist;
90, //int fov;
0.0f, //float bob;
@@ -1709,7 +1709,7 @@ classAttributes_t bg_classList[ ] =
DRAGOON_REGEN, //int regenRate;
SCA_NOWEAPONDRIFT|
SCA_FOVWARPS|SCA_ALIENSENSE|SCA_NOFOOTSTEPS, //int abilities;
- WP_POUNCE, //weapon_t startWeapon
+ WP_DRAGOON, //weapon_t startWeapon
0.0f, //float buildDist;
110, //int fov;
0.0005f, //float bob;
@@ -1746,7 +1746,7 @@ classAttributes_t bg_classList[ ] =
DRAGOON_UPG_REGEN, //int regenRate;
SCA_NOWEAPONDRIFT|
SCA_FOVWARPS|SCA_ALIENSENSE|SCA_NOFOOTSTEPS, //int abilities;
- WP_POUNCE_UPG, //weapon_t startWeapon
+ WP_DRAGOON_UPG, //weapon_t startWeapon
0.0f, //float buildDist;
110, //int fov;
0.0005f, //float bob;
@@ -1783,7 +1783,7 @@ classAttributes_t bg_classList[ ] =
BMOFO_REGEN, //int regenRate;
SCA_NOWEAPONDRIFT|
SCA_FOVWARPS|SCA_ALIENSENSE|SCA_NOFOOTSTEPS, //int abilities;
- WP_CHARGE, //weapon_t startWeapon
+ WP_BIGMOFO, //weapon_t startWeapon
0.0f, //float buildDist;
90, //int fov;
0.001f, //float bob;
@@ -3084,7 +3084,7 @@ weaponAttributes_t bg_weapons[ ] =
qtrue, //int infiniteAmmo;
qfalse, //int usesEnergy;
ABUILDER_BUILD_REPEAT,//int repeatRate1;
- 0, //int repeatRate2;
+ ABUILDER_BUILD_REPEAT,//int repeatRate2;
0, //int repeatRate3;
0, //int reloadTime;
qtrue, //qboolean hasAltMode;
@@ -3107,16 +3107,16 @@ weaponAttributes_t bg_weapons[ ] =
qfalse, //int usesEnergy;
ABUILDER_BUILD_REPEAT,//int repeatRate1;
ABUILDER_CLAW_REPEAT, //int repeatRate2;
- 0, //int repeatRate3;
+ ABUILDER_BLOB_REPEAT, //int repeatRate3;
0, //int reloadTime;
qtrue, //qboolean hasAltMode;
- qfalse, //qboolean hasThirdMode;
+ qtrue, //qboolean hasThirdMode;
qtrue, //qboolean purchasable;
ABUILDER_ADV_DELAY, //int buildDelay;
WUT_ALIENS //WUTeam_t team;
},
{
- WP_VENOM, //int weaponNum;
+ WP_SOLDIER, //int weaponNum;
0, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
@@ -3138,7 +3138,7 @@ weaponAttributes_t bg_weapons[ ] =
WUT_ALIENS //WUTeam_t team;
},
{
- WP_POUNCE, //int weaponNum;
+ WP_DRAGOON, //int weaponNum;
0, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
@@ -3160,7 +3160,7 @@ weaponAttributes_t bg_weapons[ ] =
WUT_ALIENS //WUTeam_t team;
},
{
- WP_POUNCE_UPG, //int weaponNum;
+ WP_DRAGOON_UPG, //int weaponNum;
0, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
@@ -3173,7 +3173,7 @@ weaponAttributes_t bg_weapons[ ] =
qfalse, //int usesEnergy;
DRAGOON_CLAW_U_REPEAT,//int repeatRate1;
0, //int repeatRate2;
- DRAGOON_SLOWBLOB_REPEAT,//int repeatRate3;
+ DRAGOON_BOUNCEBALL_REPEAT,//int repeatRate3;
0, //int reloadTime;
qfalse, //qboolean hasAltMode;
qtrue, //qboolean hasThirdMode;
@@ -3182,7 +3182,7 @@ weaponAttributes_t bg_weapons[ ] =
WUT_ALIENS //WUTeam_t team;
},
{
- WP_GRAB_CLAW, //int weaponNum;
+ WP_HYDRA, //int weaponNum;
0, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
@@ -3204,7 +3204,7 @@ weaponAttributes_t bg_weapons[ ] =
WUT_ALIENS //WUTeam_t team;
},
{
- WP_GRAB_CLAW_UPG, //int weaponNum;
+ WP_HYDRA_UPG, //int weaponNum;
0, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
@@ -3226,7 +3226,7 @@ weaponAttributes_t bg_weapons[ ] =
WUT_ALIENS //WUTeam_t team;
},
{
- WP_AREA_ZAP, //int weaponNum;
+ WP_CHIMERA, //int weaponNum;
0, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
@@ -3238,17 +3238,17 @@ weaponAttributes_t bg_weapons[ ] =
qtrue, //int infiniteAmmo;
qfalse, //int usesEnergy;
CHIMERA_CLAW_REPEAT, //int repeatRate1;
- CHIMERA_AREAZAP_REPEAT,//int repeatRate2;
+ 0, //int repeatRate2;
0, //int repeatRate3;
0, //int reloadTime;
- qtrue, //qboolean hasAltMode;
+ qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
qfalse, //qboolean purchasable;
0, //int buildDelay;
WUT_ALIENS //WUTeam_t team;
},
{
- WP_DIRECT_ZAP, //int weaponNum;
+ WP_CHIMERA_UPG, //int weaponNum;
0, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
@@ -3260,17 +3260,17 @@ weaponAttributes_t bg_weapons[ ] =
qtrue, //int infiniteAmmo;
qfalse, //int usesEnergy;
CHIMERA_CLAW_U_REPEAT,//int repeatRate1;
- CHIMERA_DIRECTZAP_REPEAT,//int repeatRate2;
- CHIMERA_AREAZAP_REPEAT,//int repeatRate3;
+ CHIMERA_AREAZAP_REPEAT,//int repeatRate2;
+ 0, //int repeatRate3;
0, //int reloadTime;
qtrue, //qboolean hasAltMode;
- qtrue, //qboolean hasThirdMode;
+ qfalse, //qboolean hasThirdMode;
qfalse, //qboolean purchasable;
0, //int buildDelay;
WUT_ALIENS //WUTeam_t team;
},
{
- WP_CHARGE, //int weaponNum;
+ WP_BIGMOFO, //int weaponNum;
0, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c
index 119b3d46..2031db3e 100644
--- a/src/game/bg_pmove.c
+++ b/src/game/bg_pmove.c
@@ -382,7 +382,7 @@ static float PM_CmdScale( usercmd_t *cmd )
}
}
- if( pm->ps->weapon == WP_CHARGE && pm->ps->pm_flags & PMF_CHARGE )
+ if( pm->ps->weapon == WP_BIGMOFO && pm->ps->pm_flags & PMF_CHARGE )
modifier *= ( 1.0f + ( pm->ps->stats[ STAT_MISC ] / (float)BMOFO_CHARGE_TIME ) * ( BMOFO_CHARGE_SPEED - 1.0f ) );
if( pm->ps->pm_type == PM_GRABBED )
@@ -466,7 +466,7 @@ PM_CheckCharge
*/
static void PM_CheckCharge( void )
{
- if( pm->ps->weapon != WP_CHARGE )
+ if( pm->ps->weapon != WP_BIGMOFO )
return;
if( pm->cmd.buttons & BUTTON_ATTACK2 )
@@ -488,8 +488,8 @@ PM_CheckPounce
*/
static qboolean PM_CheckPounce( void )
{
- if( pm->ps->weapon != WP_POUNCE &&
- pm->ps->weapon != WP_POUNCE_UPG )
+ if( pm->ps->weapon != WP_DRAGOON &&
+ pm->ps->weapon != WP_DRAGOON_UPG )
return qfalse;
if( pm->cmd.buttons & BUTTON_ATTACK2 )
@@ -644,13 +644,13 @@ static qboolean PM_CheckJump( void )
return PM_CheckWallJump( );
//can't jump and pounce charge at the same time
- if( ( pm->ps->weapon == WP_POUNCE ||
- pm->ps->weapon == WP_POUNCE_UPG ) &&
+ if( ( pm->ps->weapon == WP_DRAGOON ||
+ pm->ps->weapon == WP_DRAGOON_UPG ) &&
pm->ps->stats[ STAT_MISC ] > 0 )
return qfalse;
//can't jump and charge at the same time
- if( ( pm->ps->weapon == WP_CHARGE ) &&
+ if( ( pm->ps->weapon == WP_BIGMOFO ) &&
pm->ps->stats[ STAT_MISC ] > 0 )
return qfalse;
@@ -2764,7 +2764,7 @@ static void PM_Weapon( void )
//check if non-auto primary/secondary attacks are permited
switch( pm->ps->weapon )
{
- case WP_VENOM:
+ case WP_SOLDIER:
//venom is only autohit
attack1 = attack2 = attack3 = qfalse;
@@ -2776,8 +2776,8 @@ static void PM_Weapon( void )
}
break;
- case WP_POUNCE:
- case WP_POUNCE_UPG:
+ case WP_DRAGOON:
+ case WP_DRAGOON_UPG:
//pouncing has primary secondary AND autohit procedures
attack1 = pm->cmd.buttons & BUTTON_ATTACK;
attack2 = pm->cmd.buttons & BUTTON_ATTACK2;
@@ -2829,7 +2829,7 @@ static void PM_Weapon( void )
if( BG_WeaponHasThirdMode( pm->ps->weapon ) )
{
//hacky special case for slowblob
- if( pm->ps->weapon == WP_POUNCE_UPG && !ammo )
+ if( pm->ps->weapon == WP_DRAGOON_UPG && !ammo )
{
PM_AddEvent( EV_NOAMMO );
pm->ps->weaponTime += 200;
@@ -2874,14 +2874,14 @@ static void PM_Weapon( void )
{
switch( pm->ps->weapon )
{
- case WP_VENOM:
+ case WP_SOLDIER:
pm->ps->generic1 = WPM_PRIMARY;
PM_AddEvent( EV_FIRE_WEAPON );
addTime = BG_FindRepeatRate1ForWeapon( pm->ps->weapon );
break;
- case WP_POUNCE:
- case WP_POUNCE_UPG:
+ case WP_DRAGOON:
+ case WP_DRAGOON_UPG:
pm->ps->generic1 = WPM_SECONDARY;
PM_AddEvent( EV_FIRE_WEAPON2 );
addTime = BG_FindRepeatRate2ForWeapon( pm->ps->weapon );
@@ -2925,7 +2925,7 @@ static void PM_Weapon( void )
BG_packAmmoArray( pm->ps->weapon, pm->ps->ammo, pm->ps->powerups, ammo, clips, maxclips );
}
- else if( pm->ps->weapon == WP_POUNCE_UPG && attack3 )
+ else if( pm->ps->weapon == WP_DRAGOON_UPG && attack3 )
{
//special case for slowblob
ammo--;
diff --git a/src/game/bg_public.h b/src/game/bg_public.h
index 49165a49..019f9bb7 100644
--- a/src/game/bg_public.h
+++ b/src/game/bg_public.h
@@ -328,14 +328,14 @@ typedef enum
{
WP_NONE,
- WP_VENOM,
- WP_GRAB_CLAW,
- WP_GRAB_CLAW_UPG,
- WP_POUNCE,
- WP_POUNCE_UPG,
- WP_AREA_ZAP,
- WP_DIRECT_ZAP,
- WP_CHARGE,
+ WP_SOLDIER,
+ WP_HYDRA,
+ WP_HYDRA_UPG,
+ WP_CHIMERA,
+ WP_CHIMERA_UPG,
+ WP_DRAGOON,
+ WP_DRAGOON_UPG,
+ WP_BIGMOFO,
WP_BLASTER,
WP_MACHINEGUN,
@@ -836,6 +836,7 @@ typedef enum
MOD_HYDRA_PCLOUD,
MOD_DRAGOON_CLAW,
MOD_DRAGOON_POUNCE,
+ MOD_DRAGOON_BOUNCEBALL,
MOD_CHIMERA_CLAW,
MOD_CHIMERA_ZAP,
MOD_BMOFO_CLAW,
diff --git a/src/game/g_active.c b/src/game/g_active.c
index 08a598a3..4eb271b2 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -214,7 +214,7 @@ void ClientImpacts( gentity_t *ent, pmove_t *pm )
ent->touch( ent, other, &trace );
//charge attack
- if( ent->client->ps.weapon == WP_CHARGE &&
+ if( ent->client->ps.weapon == WP_BIGMOFO &&
ent->client->ps.stats[ STAT_MISC ] > 0 &&
ent->client->charging )
ChargeAttack( ent, other );
@@ -470,18 +470,18 @@ void ClientTimerActions( gentity_t *ent, int msec )
}
//client is charging up for a pounce
- if( client->ps.weapon == WP_POUNCE || client->ps.weapon == WP_POUNCE_UPG )
+ if( client->ps.weapon == WP_DRAGOON || client->ps.weapon == WP_DRAGOON_UPG )
{
if( client->ps.stats[ STAT_MISC ] < DRAGOON_POUNCE_SPEED && ucmd->buttons & BUTTON_ATTACK2 )
- {
client->ps.stats[ STAT_MISC ] += ( 100.0f / (float)DRAGOON_POUNCE_TIME ) * DRAGOON_POUNCE_SPEED;
- client->allowedToPounce = qtrue;
- }
if( !( ucmd->buttons & BUTTON_ATTACK2 ) )
{
if( client->ps.stats[ STAT_MISC ] > 0 )
+ {
+ client->allowedToPounce = qtrue;
client->pouncePayload = client->ps.stats[ STAT_MISC ];
+ }
client->ps.stats[ STAT_MISC ] = 0;
}
@@ -491,7 +491,7 @@ void ClientTimerActions( gentity_t *ent, int msec )
}
//client is charging up for a... charge
- if( client->ps.weapon == WP_CHARGE )
+ if( client->ps.weapon == WP_BIGMOFO )
{
if( client->ps.stats[ STAT_MISC ] < BMOFO_CHARGE_TIME && ucmd->buttons & BUTTON_ATTACK2 )
{
@@ -910,7 +910,7 @@ void ClientThink_real( gentity_t *ent )
client->ps.stats[ STAT_STATE ] &= ~SS_BLOBLOCKED;
if( client->ps.stats[ STAT_STATE ] & SS_SLOWLOCKED &&
- client->lastLockTime + DRAGOON_SLOWBLOB_TIME < level.time )
+ client->lastLockTime + ABUILDER_BLOB_TIME < level.time )
client->ps.stats[ STAT_STATE ] &= ~SS_SLOWLOCKED;
client->ps.stats[ STAT_BOOSTTIME ] = level.time - client->lastBoostedTime;
@@ -941,17 +941,26 @@ void ClientThink_real( gentity_t *ent )
client->ps.speed = g_speed.value * BG_FindSpeedForClass( client->ps.stats[ STAT_PCLASS ] );
//TA: slow player if charging up for a pounce
- if( ( client->ps.weapon == WP_POUNCE || client->ps.weapon == WP_POUNCE_UPG ) &&
+ if( ( client->ps.weapon == WP_DRAGOON || client->ps.weapon == WP_DRAGOON_UPG ) &&
ucmd->buttons & BUTTON_ATTACK2 )
client->ps.speed *= DRAGOON_POUNCE_SPEED_MOD;
//TA: slow the player if slow locked
if( client->ps.stats[ STAT_STATE ] & SS_SLOWLOCKED )
- client->ps.speed *= DRAGOON_SLOWBLOB_SPEED_MOD;
+ client->ps.speed *= ABUILDER_BLOB_SPEED_MOD;
if( client->lastCreepSlowTime + CREEP_TIMEOUT < level.time )
client->ps.stats[ STAT_STATE ] &= ~SS_CREEPSLOWED;
+ //randomly disable the jet pack if damaged
+ if( BG_gotItem( UP_JETPACK, client->ps.stats ) &&
+ BG_activated( UP_JETPACK, client->ps.stats ) &&
+ ( client->lastDamageTime + JETPACK_DISABLE_TIME > level.time ) )
+ {
+ if( random( ) > JETPACK_DISABLE_CHANCE )
+ client->ps.pm_type = PM_NORMAL;
+ }
+
// set up for pmove
oldEventSequence = client->ps.eventSequence;
@@ -961,18 +970,18 @@ void ClientThink_real( gentity_t *ent )
{
switch( client->ps.weapon )
{
- case WP_VENOM:
+ case WP_SOLDIER:
if( client->ps.weaponTime <= 0 )
pm.autoWeaponHit[ client->ps.weapon ] = CheckVenomAttack( ent );
break;
- case WP_GRAB_CLAW:
- case WP_GRAB_CLAW_UPG:
+ case WP_HYDRA:
+ case WP_HYDRA_UPG:
CheckGrabAttack( ent );
break;
- case WP_POUNCE:
- case WP_POUNCE_UPG:
+ case WP_DRAGOON:
+ case WP_DRAGOON_UPG:
if( client->ps.weaponTime <= 0 )
pm.autoWeaponHit[ client->ps.weapon ] = CheckPounceAttack( ent );
break;
diff --git a/src/game/g_combat.c b/src/game/g_combat.c
index eb17c7e2..e95722c2 100644
--- a/src/game/g_combat.c
+++ b/src/game/g_combat.c
@@ -926,11 +926,6 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
attacker->client->ps.persistant[ PERS_HITS ]++;
}
- // always give half damage if hurting self
- // calculated after knockback, so rocket jumping works
- if( targ == attacker)
- damage *= 0.5;
-
if( damage < 1 )
damage = 1;
@@ -1000,7 +995,10 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
}
if( targ->client )
+ {
targ->client->ps.stats[ STAT_HEALTH ] = targ->health;
+ targ->client->lastDamageTime = level.time;
+ }
//TA: add to the attackers "account" on the target
if( targ->client && attacker->client &&
diff --git a/src/game/g_local.h b/src/game/g_local.h
index 81e6c7cd..66b0bd33 100644
--- a/src/game/g_local.h
+++ b/src/game/g_local.h
@@ -369,6 +369,7 @@ struct gclient_s
int lastSlowTime;
int lastBoostedTime;
int lastCreepSlowTime; //TA: time until creep can be removed
+ int lastDamageTime;
int pouncePayload; //TA: amount of damage pounce attack will do
qboolean allowedToPounce;
@@ -661,6 +662,7 @@ gentity_t *fire_luciferCannon( gentity_t *self, vec3_t start, vec3_t dir, int da
gentity_t *fire_lockblob( gentity_t *self, vec3_t start, vec3_t dir );
gentity_t *fire_paraLockBlob( gentity_t *self, vec3_t start, vec3_t dir );
gentity_t *fire_slowBlob( gentity_t *self, vec3_t start, vec3_t dir );
+gentity_t *fire_bounceBall( gentity_t *self, vec3_t start, vec3_t dir );
gentity_t *fire_hive( gentity_t *self, vec3_t start, vec3_t dir );
diff --git a/src/game/g_missile.c b/src/game/g_missile.c
index b30f2c3f..cb72502d 100644
--- a/src/game/g_missile.c
+++ b/src/game/g_missile.c
@@ -623,7 +623,7 @@ gentity_t *fire_lockblob( gentity_t *self, vec3_t start, vec3_t dir )
/*
=================
-fire_SlowBlob
+fire_slowBlob
=================
*/
gentity_t *fire_slowBlob( gentity_t *self, vec3_t start, vec3_t dir )
@@ -638,11 +638,11 @@ 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_POUNCE_UPG;
+ bolt->s.weapon = WP_ABUILD2;
bolt->s.generic1 = self->s.generic1; //weaponMode
bolt->r.ownerNum = self->s.number;
bolt->parent = self;
- bolt->damage = DRAGOON_SLOWBLOB_DMG;
+ bolt->damage = ABUILDER_BLOB_DMG;
bolt->splashDamage = 0;
bolt->splashRadius = 0;
bolt->methodOfDeath = MOD_SLOWBLOB;
@@ -653,7 +653,7 @@ gentity_t *fire_slowBlob( gentity_t *self, vec3_t start, vec3_t dir )
bolt->s.pos.trType = TR_GRAVITY;
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, DRAGOON_SLOWBLOB_SPEED, bolt->s.pos.trDelta );
+ VectorScale( dir, ABUILDER_BLOB_SPEED, bolt->s.pos.trDelta );
SnapVector( bolt->s.pos.trDelta ); // save net bandwidth
VectorCopy( start, bolt->r.currentOrigin );
@@ -696,3 +696,44 @@ gentity_t *fire_paraLockBlob( gentity_t *self, vec3_t start, vec3_t dir )
return bolt;
}
+
+/*
+=================
+fire_bounceBall
+=================
+*/
+gentity_t *fire_bounceBall( gentity_t *self, vec3_t start, vec3_t dir )
+{
+ gentity_t *bolt;
+
+ VectorNormalize ( dir );
+
+ bolt = G_Spawn( );
+ bolt->classname = "bounceball";
+ bolt->nextthink = level.time + 3000;
+ bolt->think = G_ExplodeMissile;
+ bolt->s.eType = ET_MISSILE;
+ bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN;
+ bolt->s.weapon = WP_DRAGOON_UPG;
+ bolt->s.generic1 = self->s.generic1; //weaponMode
+ bolt->r.ownerNum = self->s.number;
+ bolt->parent = self;
+ bolt->damage = DRAGOON_BOUNCEBALL_DMG;
+ bolt->splashDamage = 0;
+ bolt->splashRadius = 0;
+ bolt->methodOfDeath = MOD_DRAGOON_BOUNCEBALL;
+ bolt->splashMethodOfDeath = MOD_DRAGOON_BOUNCEBALL;
+ bolt->clipmask = MASK_SHOT;
+ bolt->target_ent = NULL;
+
+ 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, DRAGOON_BOUNCEBALL_SPEED, bolt->s.pos.trDelta );
+ SnapVector( bolt->s.pos.trDelta ); // save net bandwidth
+ VectorCopy( start, bolt->r.currentOrigin );
+ bolt->s.eFlags |= EF_BOUNCE;
+
+ return bolt;
+}
+
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c
index 107128b5..56a5a611 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -622,11 +622,20 @@ void buildFire( gentity_t *ent, dynMenu_t menu )
G_TriggerMenu( ent->client->ps.clientNum, menu );
}
+void slowBlobFire( gentity_t *ent )
+{
+ gentity_t *m;
+
+ m = fire_slowBlob( ent, muzzle, forward );
+
+// VectorAdd( m->s.pos.trDelta, ent->client->ps.velocity, m->s.pos.trDelta ); // "real" physics
+}
+
/*
======================================================================
-VENOM
+SOLDIER
======================================================================
*/
@@ -685,7 +694,7 @@ qboolean CheckVenomAttack( gentity_t *ent )
/*
======================================================================
-GRAB AND CLAW
+HYDRA
======================================================================
*/
@@ -772,7 +781,7 @@ void poisonCloud( gentity_t *ent )
/*
======================================================================
-CLAW AND POUNCE
+DRAGOON
======================================================================
*/
@@ -836,11 +845,11 @@ qboolean CheckPounceAttack( gentity_t *ent )
return qtrue;
}
-void slowBlobFire( gentity_t *ent )
+void bounceBallFire( gentity_t *ent )
{
gentity_t *m;
- m = fire_slowBlob( ent, muzzle, forward );
+ m = fire_bounceBall( ent, muzzle, forward );
// VectorAdd( m->s.pos.trDelta, ent->client->ps.velocity, m->s.pos.trDelta ); // "real" physics
}
@@ -848,7 +857,7 @@ void slowBlobFire( gentity_t *ent )
/*
======================================================================
-ZAP
+CHIMERA
======================================================================
*/
@@ -916,83 +925,12 @@ void areaZapFire( gentity_t *ent )
}
}
-/*
-===============
-directZapFire
-===============
-*/
-void directZapFire( gentity_t *ent )
-{
- int entityList[ MAX_GENTITIES ];
- int targetList[ MAX_GENTITIES ];
- vec3_t range = { CHIMERA_DIRECTZAP_RANGE, CHIMERA_DIRECTZAP_RANGE, CHIMERA_DIRECTZAP_RANGE };
- vec3_t mins, maxs, dir;
- int i, num, numTargets = 0;
- gentity_t *enemy;
- vec3_t end;
- gentity_t *target = NULL, *tent;
- float distance, minDist = 10000.0f;
- trace_t tr;
-
- VectorAdd( muzzle, range, maxs );
- VectorSubtract( muzzle, range, mins );
-
- num = trap_EntitiesInBox( mins, maxs, entityList, MAX_GENTITIES );
- for( i = 0; i < num; i++ )
- {
- enemy = &g_entities[ entityList[ i ] ];
-
- if( ( enemy->client && enemy->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS ) ||
- ( enemy->s.eType == ET_BUILDABLE && BG_FindTeamForBuildable( enemy->s.modelindex ) == BIT_HUMANS ) )
- {
- trap_Trace( &tr, muzzle, NULL, NULL, enemy->s.origin, ent->s.number, MASK_SHOT );
-
- //can't see target from here
- if( tr.entityNum == ENTITYNUM_WORLD )
- continue;
-
- targetList[ numTargets++ ] = entityList[ i ];
- }
- }
-
- VectorAdd( muzzle, forward, end );
-
- for( i = 0; i < numTargets; i++ )
- {
- enemy = &g_entities[ targetList[ i ] ];
-
- distance = pointToLineDistance( enemy->s.origin, muzzle, end );
- if( distance < minDist )
- {
- target = enemy;
- minDist = distance;
- }
- }
-
- if( target != NULL )
- {
- //do some damage
- G_Damage( target, ent, ent, dir, tr.endpos,
- CHIMERA_DIRECTZAP_DMG, DAMAGE_NO_KNOCKBACK, MOD_CHIMERA_ZAP );
-
- // snap the endpos to integers to save net bandwidth, but nudged towards the line
- SnapVectorTowards( tr.endpos, muzzle );
-
- // send railgun beam effect
- tent = G_TempEntity( target->s.pos.trBase, EV_ALIENZAP );
-
- VectorCopy( muzzle, tent->s.origin2 );
-
- tent->s.generic1 = ent->s.number; //src
- tent->s.clientNum = target->s.number; //dest
- }
-}
/*
======================================================================
-CHARGE
+BIG MOFO
======================================================================
*/
@@ -1075,11 +1013,12 @@ void FireWeapon3( gentity_t *ent )
// fire the specific weapon
switch( ent->s.weapon )
{
- case WP_POUNCE_UPG:
- slowBlobFire( ent );
+ case WP_DRAGOON_UPG:
+ bounceBallFire( ent );
break;
- case WP_DIRECT_ZAP:
- areaZapFire( ent );
+
+ case WP_ABUILD2:
+ slowBlobFire( ent );
break;
default:
@@ -1109,15 +1048,12 @@ void FireWeapon2( gentity_t *ent )
// fire the specific weapon
switch( ent->s.weapon )
{
- case WP_GRAB_CLAW_UPG:
+ case WP_HYDRA_UPG:
poisonCloud( ent );
break;
- case WP_AREA_ZAP:
+ case WP_CHIMERA_UPG:
areaZapFire( ent );
break;
- case WP_DIRECT_ZAP:
- directZapFire( ent );
- break;
case WP_LUCIFER_CANNON:
LCChargeFire( ent, qtrue );
@@ -1156,21 +1092,21 @@ void FireWeapon( gentity_t *ent )
// fire the specific weapon
switch( ent->s.weapon )
{
- case WP_GRAB_CLAW:
- case WP_GRAB_CLAW_UPG:
+ case WP_HYDRA:
+ case WP_HYDRA_UPG:
meleeAttack( ent, HYDRA_CLAW_RANGE, HYDRA_CLAW_DMG, MOD_HYDRA_CLAW );
break;
- case WP_POUNCE:
- case WP_POUNCE_UPG:
+ case WP_DRAGOON:
+ case WP_DRAGOON_UPG:
meleeAttack( ent, DRAGOON_CLAW_RANGE, DRAGOON_CLAW_DMG, MOD_DRAGOON_CLAW );
break;
- case WP_AREA_ZAP:
+ case WP_CHIMERA:
meleeAttack( ent, CHIMERA_CLAW_RANGE, CHIMERA_CLAW_DMG, MOD_CHIMERA_CLAW );
break;
- case WP_DIRECT_ZAP:
+ case WP_CHIMERA_UPG:
meleeAttack( ent, CHIMERA_CLAW_RANGE, CHIMERA_CLAW_DMG, MOD_CHIMERA_CLAW );
break;
- case WP_CHARGE:
+ case WP_BIGMOFO:
meleeAttack( ent, BMOFO_CLAW_RANGE, BMOFO_CLAW_DMG, MOD_BMOFO_CLAW );
break;
@@ -1219,14 +1155,10 @@ void FireWeapon( gentity_t *ent )
break;
case WP_ABUILD:
- buildFire( ent, MN_A_BUILD );
- break;
case WP_ABUILD2:
buildFire( ent, MN_A_BUILD );
break;
case WP_HBUILD:
- buildFire( ent, MN_H_BUILD );
- break;
case WP_HBUILD2:
buildFire( ent, MN_H_BUILD );
break;
diff --git a/src/game/tremulous.h b/src/game/tremulous.h
index 7694887d..ffcb9205 100644
--- a/src/game/tremulous.h
+++ b/src/game/tremulous.h
@@ -31,6 +31,11 @@
#define ABUILDER_CLAW_REPEAT 1000
#define ABUILDER_BASE_DELAY 9000
#define ABUILDER_ADV_DELAY 4000
+#define ABUILDER_BLOB_DMG ADM(20)
+#define ABUILDER_BLOB_REPEAT 1000
+#define ABUILDER_BLOB_SPEED 800.0f
+#define ABUILDER_BLOB_SPEED_MOD 0.5f
+#define ABUILDER_BLOB_TIME 5000
#define SOLDIER_BITE_DMG ADM(34)
#define SOLDIER_BITE_RANGE 32.0f
@@ -54,9 +59,6 @@
#define CHIMERA_AREAZAP_DMG ADM(75)
#define CHIMERA_AREAZAP_RANGE 200.0f
#define CHIMERA_AREAZAP_REPEAT 1500
-#define CHIMERA_DIRECTZAP_DMG ADM(100)
-#define CHIMERA_DIRECTZAP_RANGE 200.0f
-#define CHIMERA_DIRECTZAP_REPEAT 1500
#define CHIMERA_WALLJUMP_MAXSPEED 1000.0f
#define DRAGOON_CLAW_DMG ADM(75)
@@ -68,11 +70,9 @@
#define DRAGOON_POUNCE_SPEED 600
#define DRAGOON_POUNCE_SPEED_MOD 0.75f
#define DRAGOON_POUNCE_TIME 1000
-#define DRAGOON_SLOWBLOB_DMG ADM(20)
-#define DRAGOON_SLOWBLOB_REPEAT 1000
-#define DRAGOON_SLOWBLOB_SPEED 800.0f
-#define DRAGOON_SLOWBLOB_SPEED_MOD 0.5f
-#define DRAGOON_SLOWBLOB_TIME 5000
+#define DRAGOON_BOUNCEBALL_DMG ADM(50)
+#define DRAGOON_BOUNCEBALL_REPEAT 1000
+#define DRAGOON_BOUNCEBALL_SPEED 1000.0f
#define BMOFO_CLAW_DMG ADM(150)
#define BMOFO_CLAW_RANGE 128.0f
@@ -381,6 +381,8 @@
#define JETPACK_PRICE 120
#define JETPACK_FLOAT_SPEED 128.0f //up movement speed
#define JETPACK_SINK_SPEED 192.0f //down movement speed
+#define JETPACK_DISABLE_TIME 1000 //time to disable the jetpack when player damaged
+#define JETPACK_DISABLE_CHANCE 0.3f
#define BSUIT_PRICE 200