summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2020-04-01 00:18:46 +0200
committerPaweł Redman <pawel.redman@gmail.com>2020-04-01 00:33:53 +0200
commit10b31b618ce0205f2b2692504111a3186dbbad7f (patch)
treee0b1fba78f5000d85542da98c3e0b67ce1f6b4aa /src
parent8ac348834d427686e88c45bd98a8f2821f053207 (diff)
Let all alien attack hit anyone and buff the zap
Diffstat (limited to 'src')
-rw-r--r--src/game/g_weapon.c32
-rw-r--r--src/game/tremulous.h8
2 files changed, 23 insertions, 17 deletions
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c
index 1758e8d..a3541f3 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -978,8 +978,8 @@ void CheckGrabAttack( gentity_t *ent )
if( traceEnt->client )
{
- if( traceEnt->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
- return;
+ /*if( traceEnt->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
+ return;*/
if( traceEnt->client->ps.stats[ STAT_HEALTH ] <= 0 )
return;
@@ -1000,8 +1000,8 @@ void CheckGrabAttack( gentity_t *ent )
else if( ent->client->ps.weapon == WP_ALEVEL1_UPG )
traceEnt->client->grabExpiryTime = level.time + LEVEL1_GRAB_U_TIME;
}
- else if( traceEnt->s.eType == ET_BUILDABLE &&
- traceEnt->s.modelindex == BA_H_MGTURRET )
+ else if( traceEnt->s.eType == ET_BUILDABLE/* &&
+ traceEnt->s.modelindex == BA_H_MGTURRET*/ )
{
if( !traceEnt->lev1Grabbed )
G_AddPredictableEvent( ent, EV_LEV1_GRAB, 0 );
@@ -1107,9 +1107,12 @@ static gentity_t *G_FindNewZapTarget( gentity_t *ent )
{
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 ) ) && enemy->health > 0 )
+ if( enemy == ent )
+ continue;
+
+ if( ( ( enemy->client /*&& enemy->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS*/ ) ||
+ ( enemy->s.eType == ET_BUILDABLE /*&&
+ BG_FindTeamForBuildable( enemy->s.modelindex ) == BIT_HUMANS*/ ) ) && enemy->health > 0 )
{
qboolean foundOldTarget = qfalse;
@@ -1290,9 +1293,12 @@ void G_UpdateZaps( int msec )
//do the damage
if( damage )
{
- G_Damage( target, source, zap->creator, forward, target->s.origin,
- damage, DAMAGE_NO_LOCDAMAGE, MOD_LEVEL2_ZAP );
- zap->damageUsed += damage;
+ if( target != zap->creator ) // jfc
+ {
+ G_Damage( target, source, zap->creator, forward, target->s.origin,
+ damage, DAMAGE_NO_LOCDAMAGE, MOD_LEVEL2_ZAP );
+ zap->damageUsed += damage;
+ }
}
}
}
@@ -1341,9 +1347,9 @@ void areaZapFire( gentity_t *ent )
traceEnt = &g_entities[ tr.entityNum ];
- if( ( ( traceEnt->client && traceEnt->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS ) ||
- ( traceEnt->s.eType == ET_BUILDABLE &&
- BG_FindTeamForBuildable( traceEnt->s.modelindex ) == BIT_HUMANS ) ) && traceEnt->health > 0 )
+ if( ( ( traceEnt->client && traceEnt != ent /*&& traceEnt->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS*/ ) ||
+ ( traceEnt->s.eType == ET_BUILDABLE /*&&
+ BG_FindTeamForBuildable( traceEnt->s.modelindex ) == BIT_HUMANS*/ ) ) && traceEnt->health > 0 )
{
G_CreateNewZap( ent, traceEnt );
}
diff --git a/src/game/tremulous.h b/src/game/tremulous.h
index 97738f2..fa74a98 100644
--- a/src/game/tremulous.h
+++ b/src/game/tremulous.h
@@ -80,11 +80,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define LEVEL2_CLAW_K_SCALE 1.0f
#define LEVEL2_CLAW_U_REPEAT 400
#define LEVEL2_CLAW_U_K_SCALE 1.0f
-#define LEVEL2_AREAZAP_DMG ADM(80)
-#define LEVEL2_AREAZAP_RANGE 200.0f
+#define LEVEL2_AREAZAP_DMG ADM(16)
+#define LEVEL2_AREAZAP_RANGE 1000.0f
#define LEVEL2_AREAZAP_WIDTH 15.0f
-#define LEVEL2_AREAZAP_REPEAT 1500
-#define LEVEL2_AREAZAP_TIME 1000
+#define LEVEL2_AREAZAP_REPEAT 300
+#define LEVEL2_AREAZAP_TIME 300
#define LEVEL2_AREAZAP_MAX_TARGETS 3
#define LEVEL2_WALLJUMP_MAXSPEED 1000.0f