summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cgame/cg_weapons.c1
-rw-r--r--src/game/bg_misc.c31
-rw-r--r--src/game/bg_public.h1
-rw-r--r--src/game/g_active.c26
-rw-r--r--src/game/g_weapon.c3
5 files changed, 57 insertions, 5 deletions
diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c
index 91dc841e..855ae926 100644
--- a/src/cgame/cg_weapons.c
+++ b/src/cgame/cg_weapons.c
@@ -770,6 +770,7 @@ void CG_RegisterWeapon( int weaponNum )
break;
case WP_GRAB_CLAW:
+ case WP_GRAB_CLAW_UPG:
MAKERGB( weaponInfo->flashDlightColor, 0, 0, 0 );
weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/melee/fstatck.wav", qfalse );
break;
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c
index 1fef2b5c..8967f09b 100644
--- a/src/game/bg_misc.c
+++ b/src/game/bg_misc.c
@@ -1358,7 +1358,7 @@ classAttributes_t bg_classList[ ] =
140, //int fov;
0.0f, //float bob;
25, //int steptime;
- 1.8f, //float speed;
+ 1.5f, //float speed;
5.0f, //float sticky;
{ PCL_A_O_LEV1, PCL_NONE, PCL_NONE }, //int children[ 3 ];
3000, //int timetoevolve;
@@ -1387,7 +1387,7 @@ classAttributes_t bg_classList[ ] =
120, //int fov;
0.001f, //float bob;
25, //int steptime;
- 1.6f, //float speed;
+ 1.5f, //float speed;
4.0f, //float sticky;
{ PCL_A_O_LEV2, PCL_A_O_LEV1_UPG, PCL_NONE }, //int children[ 3 ];
3000, //int timetoevolve;
@@ -1411,12 +1411,12 @@ classAttributes_t bg_classList[ ] =
50, //int health;
5, //int regenRate;
SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities;
- WP_GRAB_CLAW, //weapon_t startWeapon
+ WP_GRAB_CLAW_UPG, //weapon_t startWeapon
0.0f, //float buildDist;
120, //int fov;
0.001f, //float bob;
25, //int steptime;
- 1.6f, //float speed;
+ 1.5f, //float speed;
4.0f, //float sticky;
{ PCL_A_O_LEV2, PCL_NONE, PCL_NONE }, //int children[ 3 ];
3000, //int timetoevolve;
@@ -2445,6 +2445,29 @@ weaponAttributes_t bg_weapons[ ] =
WUT_ALIENS //WUTeam_t team;
},
{
+ WP_GRAB_CLAW_UPG, //int weaponNum;
+ 100, //int price;
+ ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
+ SLOT_WEAPON, //int slots;
+ "grabandclaw_upgrade",//char *weaponName;
+ "Claws Upgrade", //char *weaponHumanName;
+ { "models/weapons2/gauntlet/gauntlet.md3", 0, 0, 0 },
+ "icons/iconw_gauntlet",
+ 0, //int quan;
+ 0, //int clips;
+ 0, //int maxClips;
+ qtrue, //int infiniteAmmo;
+ qfalse, //int usesEnergy;
+ 500, //int repeatRate;
+ 0, //int reloadTime;
+ qtrue, //qboolean hasAltMode;
+ qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean synced;
+ qfalse, //qboolean purchasable;
+ 0, //int buildDelay;
+ WUT_ALIENS //WUTeam_t team;
+ },
+ {
WP_AREA_ZAP, //int weaponNum;
100, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
diff --git a/src/game/bg_public.h b/src/game/bg_public.h
index a9f66292..361ae0ce 100644
--- a/src/game/bg_public.h
+++ b/src/game/bg_public.h
@@ -338,6 +338,7 @@ typedef enum
WP_PLASMAGUN,
WP_VENOM,
WP_GRAB_CLAW,
+ WP_GRAB_CLAW_UPG,
WP_POUNCE,
WP_POUNCE_UPG,
WP_AREA_ZAP,
diff --git a/src/game/g_active.c b/src/game/g_active.c
index 077acecd..6e61fe2e 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -548,8 +548,31 @@ void ClientTimerActions( gentity_t *ent, int msec )
//replenish alien health
if( client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
{
+ int entityList[ MAX_GENTITIES ];
+ vec3_t range = { 200, 200, 200 };
+ vec3_t mins, maxs, dir;
+ int i, num;
+ gentity_t *alienPlayer;
+ float modifier = 1.0f;
+
+ VectorAdd( client->ps.origin, range, maxs );
+ VectorSubtract( client->ps.origin, range, mins );
+
+ num = trap_EntitiesInBox( mins, maxs, entityList, MAX_GENTITIES );
+ for( i = 0; i < num; i++ )
+ {
+ alienPlayer = &g_entities[ entityList[ i ] ];
+
+ if( alienPlayer->client && alienPlayer->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS &&
+ alienPlayer->client->ps.stats[ STAT_PCLASS ] == PCL_A_O_LEV4 )
+ {
+ modifier = 2.0f;
+ break;
+ }
+ }
+
if( ent->health < client->ps.stats[ STAT_MAX_HEALTH ] )
- BG_FindRegenRateForClass( client->ps.stats[ STAT_PCLASS ] );
+ ent->health += BG_FindRegenRateForClass( client->ps.stats[ STAT_PCLASS ] ) * modifier;
if( ent->health > client->ps.stats[ STAT_MAX_HEALTH ] )
ent->health = client->ps.stats[ STAT_MAX_HEALTH ];
@@ -984,6 +1007,7 @@ void ClientThink_real( gentity_t *ent ) {
break;
case WP_GRAB_CLAW:
+ case WP_GRAB_CLAW_UPG:
/*if( client->ps.weaponTime <= 0 )*/ //FIXME: correct decision?
CheckGrabAttack( ent );
break;
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c
index 6ffe8f2a..53d4cf59 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -912,6 +912,8 @@ void FireWeapon2( gentity_t *ent )
// fire the specific weapon
switch( ent->s.weapon )
{
+ case WP_GRAB_CLAW_UPG:
+ break;
case WP_POUNCE:
case WP_POUNCE_UPG:
meleeAttack( ent, 32.0f, 150 );
@@ -981,6 +983,7 @@ void FireWeapon( gentity_t *ent )
lockBlobLauncherFire( ent );
break;
case WP_GRAB_CLAW:
+ case WP_GRAB_CLAW_UPG:
meleeAttack( ent, 32.0f, 5 );
break;
case WP_POUNCE: