Skip to content

Commit 4cb93e3

Browse files
authored
Merge pull request #66 from WofWca/fix-look-at-missile-on-suicide
fix: look at explosion on suicide, fix FF for mine
2 parents 08f082c + 74a2720 commit 4cb93e3

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

code/game/g_combat.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ qboolean CanDamage( gentity_t *targ, vec3_t origin )
11761176
G_RadiusDamage
11771177
============
11781178
*/
1179-
qboolean G_RadiusDamage ( vec3_t origin, gentity_t *attacker, float damage, float radius,
1179+
qboolean G_RadiusDamage ( gentity_t *self, vec3_t origin, gentity_t *attacker, float damage, float radius,
11801180
gentity_t *ignore, int mod) {
11811181
float points, dist;
11821182
gentity_t *ent;
@@ -1233,7 +1233,7 @@ qboolean G_RadiusDamage ( vec3_t origin, gentity_t *attacker, float damage, floa
12331233
// push the center of mass higher than the origin so players
12341234
// get knocked into the air more
12351235
dir[2] += 24;
1236-
G_Damage (ent, NULL, attacker, dir, origin, (int)points, DAMAGE_RADIUS, mod);
1236+
G_Damage (ent, self, attacker, dir, origin, (int)points, DAMAGE_RADIUS, mod);
12371237
}
12381238
}
12391239

code/game/g_local.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ const char *BuildShaderStateConfig( void );
527527
//
528528
qboolean CanDamage (gentity_t *targ, vec3_t origin);
529529
void G_Damage (gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, vec3_t dir, vec3_t point, int damage, int dflags, int mod);
530-
qboolean G_RadiusDamage (vec3_t origin, gentity_t *attacker, float damage, float radius, gentity_t *ignore, int mod);
530+
qboolean G_RadiusDamage (gentity_t *self, vec3_t origin, gentity_t *attacker, float damage, float radius, gentity_t *ignore, int mod);
531531
int G_InvulnerabilityEffect( gentity_t *targ, vec3_t dir, vec3_t point, vec3_t impactpoint, vec3_t bouncedir );
532532
void body_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int meansOfDeath );
533533
void TossClientItems( gentity_t *self );

code/game/g_missile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void G_ExplodeMissile( gentity_t *ent ) {
6363

6464
// splash damage
6565
if ( ent->splashDamage ) {
66-
if( G_RadiusDamage( ent->r.currentOrigin, ent->parent, ent->splashDamage, ent->splashRadius, ent
66+
if( G_RadiusDamage( ent, ent->r.currentOrigin, ent->parent, ent->splashDamage, ent->splashRadius, ent
6767
, ent->splashMethodOfDeath ) ) {
6868
g_entities[ent->r.ownerNum].client->accuracy_hits++;
6969
}
@@ -409,7 +409,7 @@ void G_MissileImpact( gentity_t *ent, trace_t *trace ) {
409409

410410
// splash damage (doesn't apply to person directly hit)
411411
if ( ent->splashDamage ) {
412-
if( G_RadiusDamage( trace->endpos, ent->parent, ent->splashDamage, ent->splashRadius,
412+
if( G_RadiusDamage( ent, trace->endpos, ent->parent, ent->splashDamage, ent->splashRadius,
413413
other, ent->splashMethodOfDeath ) ) {
414414
if( !hitClient ) {
415415
g_entities[ent->r.ownerNum].client->accuracy_hits++;

0 commit comments

Comments
 (0)