summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cgame/cg_draw.c2
-rw-r--r--src/cgame/cg_event.c50
-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
8 files changed, 93 insertions, 23 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index b9f227dd..ea74e49f 100644
--- a/src/cgame/cg_draw.c
+++ b/src/cgame/cg_draw.c
@@ -2768,7 +2768,7 @@ static qboolean CG_DrawScoreboard( )
return qfalse;
}
- if( cg.showScores || cg.predictedPlayerState.pm_type == PM_DEAD ||
+ if( cg.showScores ||
cg.predictedPlayerState.pm_type == PM_INTERMISSION )
{
fade = 1.0;
diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c
index 02070fef..8f6f6b55 100644
--- a/src/cgame/cg_event.c
+++ b/src/cgame/cg_event.c
@@ -111,6 +111,12 @@ static void CG_Obituary( entityState_t *ent )
case MOD_SLOWBLOB:
message = "should have visited a medical station";
break;
+ case MOD_POISON:
+ message = "should have remembered the antitox";
+ break;
+ case MOD_HYDRA_PCLOUD: //FIXME
+ message = "was gassed by a hydra";
+ break;
default:
message = NULL;
break;
@@ -130,6 +136,15 @@ static void CG_Obituary( entityState_t *ent )
message = "toasted himself";
break;
+ case MOD_LCANNON_SPLASH:
+ if( gender == GENDER_FEMALE )
+ message = "irradiated herself";
+ else if( gender == GENDER_NEUTER )
+ message = "irradiated itself";
+ else
+ message = "irradiated himself";
+ break;
+
default:
if( gender == GENDER_FEMALE )
message = "killed herself";
@@ -166,6 +181,9 @@ static void CG_Obituary( entityState_t *ent )
{
switch( mod )
{
+ case MOD_PAINSAW:
+ message = "was sawn by";
+ break;
case MOD_BLASTER:
message = "was blasted by";
break;
@@ -197,9 +215,39 @@ static void CG_Obituary( entityState_t *ent )
message = "was caught in the fallout of";
message2 = "'s lucifer cannon";
break;
+
+ case MOD_ABUILDER_CLAW:
+ message = "should leave";
+ message2 = "'s buildings alone";
+ break;
case MOD_VENOM:
- message = "was biten by";
+ message = "was biten by";
+ break;
+ case MOD_HYDRA_CLAW:
+ message = "was swiped by";
+ message2 = "'s hydra";
+ break;
+ case MOD_DRAGOON_CLAW:
+ message = "was clawed by";
+ message2 = "'s dragoon";
+ break;
+ case MOD_DRAGOON_POUNCE:
+ message = "was pounced upon by";
+ message2 = "'s dragoon";
break;
+ case MOD_CHIMERA_CLAW:
+ message = "was clawed by";
+ message2 = "'s chimera";
+ break;
+ case MOD_CHIMERA_ZAP:
+ message = "was zapped by";
+ message2 = "'s chimera";
+ break;
+ case MOD_BMOFO_CLAW:
+ message = "was mauled by";
+ message2 = "'s big mofo";
+ break;
+
case MOD_TELEFRAG:
message = "tried to invade";
message2 = "'s personal space";
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: