summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2003-08-26 03:56:26 +0000
committerTim Angus <tim@ngus.net>2003-08-26 03:56:26 +0000
commitcaf924c83b11c0ccfe08df26935c699423116924 (patch)
tree4359e17c33f0cf16ff3e6d520454b55abe6e3e02 /src/game
parent7edc5b60728487eb16d28cbe2d5620ce9439761c (diff)
* Added a bunch of MOD_s
* Fixed buildable outline bug * Scoreboard now longer shown on death * Buildable kills no longer subtract 1 from score
Diffstat (limited to 'src/game')
-rw-r--r--src/game/bg_misc.c2
-rw-r--r--src/game/bg_pmove.c3
-rw-r--r--src/game/bg_public.h11
-rw-r--r--src/game/g_active.c8
-rw-r--r--src/game/g_combat.c6
-rw-r--r--src/game/g_weapon.c34
6 files changed, 43 insertions, 21 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c
index 88baff57..7311a6a6 100644
--- a/src/game/bg_misc.c
+++ b/src/game/bg_misc.c
@@ -1495,7 +1495,7 @@ classAttributes_t bg_classList[ ] =
PCL_A_O_LEV4, //int classnum;
"bigmofo", //char *classname;
"Big Mofo", //char *humanname;
- "bug", //char *modelname;
+ "bigmofo", //char *modelname;
1.2f, //float modelScale;
"default", //char *skinname;
"alien_general_hud", //char *hudname;
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c
index 359a4c59..43d6f246 100644
--- a/src/game/bg_pmove.c
+++ b/src/game/bg_pmove.c
@@ -2322,6 +2322,9 @@ static void PM_BeginWeaponChange( int weapon )
PM_AddEvent( EV_CHANGE_WEAPON );
pm->ps->weaponstate = WEAPON_DROPPING;
pm->ps->weaponTime += 200;
+
+ //reset build weapon
+ pm->ps->stats[ STAT_BUILDABLE ] = BA_NONE;
if( !( pm->ps->persistant[ PERS_STATE ] & PS_NONSEGMODEL ) )
PM_StartTorsoAnim( TORSO_DROP );
diff --git a/src/game/bg_public.h b/src/game/bg_public.h
index 7984645c..70cbc944 100644
--- a/src/game/bg_public.h
+++ b/src/game/bg_public.h
@@ -782,6 +782,7 @@ typedef enum
MOD_UNKNOWN,
MOD_SHOTGUN,
MOD_BLASTER,
+ MOD_PAINSAW,
MOD_MACHINEGUN,
MOD_CHAINGUN,
MOD_PRIFLE,
@@ -799,8 +800,18 @@ typedef enum
MOD_TARGET_LASER,
MOD_TRIGGER_HURT,
+ MOD_ABUILDER_CLAW,
MOD_VENOM,
+ MOD_HYDRA_CLAW,
+ MOD_HYDRA_PCLOUD,
+ MOD_DRAGOON_CLAW,
+ MOD_DRAGOON_POUNCE,
+ MOD_CHIMERA_CLAW,
+ MOD_CHIMERA_ZAP,
+ MOD_BMOFO_CLAW,
+
MOD_SLOWBLOB,
+ MOD_POISON,
MOD_HSPAWN,
MOD_TESLAGEN,
diff --git a/src/game/g_active.c b/src/game/g_active.c
index ec7a74fb..10086b41 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -455,12 +455,12 @@ void ClientTimerActions( gentity_t *ent, int msec )
client->ps.stats[ STAT_STAMINA ] = MAX_STAMINA;
}
- //client is poisoned
+ //client is poisoned FIXME: set attacker parameter
if( client->ps.stats[ STAT_STATE ] & SS_POISONED )
{
int damage = ( level.time - client->lastPoisonTime ) / 1000;
- G_Damage( ent, NULL, NULL, NULL, NULL, damage, 0, MOD_VENOM );
+ G_Damage( ent, NULL, NULL, NULL, NULL, damage, 0, MOD_POISON );
}
//client is charging up for a pounce
@@ -537,9 +537,9 @@ void ClientTimerActions( gentity_t *ent, int msec )
{
client->time1000 -= 1000;
- //client is poisoned
+ //client is poisoned FIXME: set attacker parameter
if( client->ps.stats[ STAT_STATE ] & SS_POISONCLOUDED )
- G_Damage( ent, NULL, NULL, NULL, NULL, HYDRA_PCLOUD_DMG, 0, MOD_VENOM );
+ G_Damage( ent, NULL, NULL, NULL, NULL, HYDRA_PCLOUD_DMG, 0, MOD_HYDRA_PCLOUD );
//replenish alien health
if( client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
diff --git a/src/game/g_combat.c b/src/game/g_combat.c
index 6cd67f6e..d60bb4b7 100644
--- a/src/game/g_combat.c
+++ b/src/game/g_combat.c
@@ -202,7 +202,7 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
self->enemy = attacker;
- self->client->ps.persistant[PERS_KILLED]++;
+ self->client->ps.persistant[ PERS_KILLED ]++;
if( attacker && attacker->client )
{
@@ -225,10 +225,8 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
}
}
- else
- {
+ else if( attacker->s.eType != ET_BUILDABLE )
AddScore( self, -1 );
- }
if( attacker && attacker->client &&
attacker->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS &&
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c
index 06be1359..5dfc7c1a 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -69,7 +69,7 @@ void SnapVectorTowards( vec3_t v, vec3_t to )
meleeAttack
===============
*/
-void meleeAttack( gentity_t *ent, float range, int damage )
+void meleeAttack( gentity_t *ent, float range, int damage, meansOfDeath_t mod )
{
trace_t tr;
vec3_t end;
@@ -99,7 +99,7 @@ void meleeAttack( gentity_t *ent, float range, int damage )
}
if ( traceEnt->takedamage )
- G_Damage( traceEnt, ent, ent, forward, tr.endpos, damage, DAMAGE_NO_KNOCKBACK, MOD_VENOM );
+ G_Damage( traceEnt, ent, ent, forward, tr.endpos, damage, DAMAGE_NO_KNOCKBACK, mod );
}
/*
@@ -344,7 +344,7 @@ void painSawFire( gentity_t *ent )
}
if ( traceEnt->takedamage )
- G_Damage( traceEnt, ent, ent, forward, tr.endpos, PAINSAW_DAMAGE, DAMAGE_NO_KNOCKBACK, MOD_VENOM );
+ G_Damage( traceEnt, ent, ent, forward, tr.endpos, PAINSAW_DAMAGE, DAMAGE_NO_KNOCKBACK, MOD_PAINSAW );
}
/*
@@ -435,6 +435,11 @@ BUILD GUN
======================================================================
*/
+/*
+===============
+cancelBuildFire
+===============
+*/
void cancelBuildFire( gentity_t *ent )
{
vec3_t forward, end;
@@ -478,9 +483,14 @@ void cancelBuildFire( gentity_t *ent )
}
}
else if( ent->client->ps.weapon == WP_ABUILD2 )
- meleeAttack( ent, ABUILDER_CLAW_RANGE, ABUILDER_CLAW_DMG ); //melee attack for alien builder
+ meleeAttack( ent, ABUILDER_CLAW_RANGE, ABUILDER_CLAW_DMG, MOD_ABUILDER_CLAW ); //melee attack for alien builder
}
+/*
+===============
+buildFire
+===============
+*/
void buildFire( gentity_t *ent, dynMenu_t menu )
{
if( ( ent->client->ps.stats[ STAT_BUILDABLE ] & ~SB_VALID_TOGGLEBIT ) > BA_NONE )
@@ -702,7 +712,7 @@ qboolean CheckPounceAttack( gentity_t *ent )
damage = (int)( ( (float)ent->client->pouncePayload / (float)DRAGOON_POUNCE_SPEED ) * DRAGOON_POUNCE_DMG );
- G_Damage( traceEnt, ent, ent, forward, tr.endpos, damage, DAMAGE_NO_KNOCKBACK, MOD_VENOM );
+ G_Damage( traceEnt, ent, ent, forward, tr.endpos, damage, DAMAGE_NO_KNOCKBACK, MOD_DRAGOON_POUNCE );
ent->client->allowedToPounce = qfalse;
@@ -774,7 +784,7 @@ void areaZapFire( gentity_t *ent )
//do some damage
G_Damage( enemy, ent, ent, dir, tr.endpos,
- damage, DAMAGE_NO_KNOCKBACK, MOD_TESLAGEN );
+ damage, DAMAGE_NO_KNOCKBACK, MOD_CHIMERA_ZAP );
// snap the endpos to integers to save net bandwidth, but nudged towards the line
SnapVectorTowards( tr.endpos, muzzle );
@@ -846,7 +856,7 @@ void directZapFire( gentity_t *ent )
{
//do some damage
G_Damage( target, ent, ent, dir, tr.endpos,
- CHIMERA_DIRECTZAP_DMG, DAMAGE_NO_KNOCKBACK, MOD_TESLAGEN );
+ 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 );
@@ -1041,20 +1051,20 @@ void FireWeapon( gentity_t *ent )
{
case WP_GRAB_CLAW:
case WP_GRAB_CLAW_UPG:
- meleeAttack( ent, HYDRA_CLAW_RANGE, HYDRA_CLAW_DMG );
+ meleeAttack( ent, HYDRA_CLAW_RANGE, HYDRA_CLAW_DMG, MOD_HYDRA_CLAW );
break;
case WP_POUNCE:
case WP_POUNCE_UPG:
- meleeAttack( ent, DRAGOON_CLAW_RANGE, DRAGOON_CLAW_DMG );
+ meleeAttack( ent, DRAGOON_CLAW_RANGE, DRAGOON_CLAW_DMG, MOD_DRAGOON_CLAW );
break;
case WP_AREA_ZAP:
- meleeAttack( ent, CHIMERA_CLAW_RANGE, CHIMERA_CLAW_DMG );
+ meleeAttack( ent, CHIMERA_CLAW_RANGE, CHIMERA_CLAW_DMG, MOD_CHIMERA_CLAW );
break;
case WP_DIRECT_ZAP:
- meleeAttack( ent, CHIMERA_CLAW_RANGE, CHIMERA_CLAW_DMG );
+ meleeAttack( ent, CHIMERA_CLAW_RANGE, CHIMERA_CLAW_DMG, MOD_CHIMERA_CLAW );
break;
case WP_GROUND_POUND:
- meleeAttack( ent, BMOFO_CLAW_RANGE, BMOFO_CLAW_DMG );
+ meleeAttack( ent, BMOFO_CLAW_RANGE, BMOFO_CLAW_DMG, MOD_BMOFO_CLAW );
break;
case WP_BLASTER: