Skip to content

Commit

Permalink
Fix misc_explobox2 explosion origin
Browse files Browse the repository at this point in the history
  • Loading branch information
4LT committed Nov 18, 2023
1 parent a5f282c commit b6c0822
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion misc.qc
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,18 @@ void() barrel_use_targets = {
};

void() barrel_explode;
void() barrel_explode2;

void() barrel_explode0 = {
self.takedamage = DAMAGE_NO;

if (self.classname == "misc_explobox2") {
self.think = barrel_explode2;
} else {
self.think = barrel_explode;
}

self.classname = "explo_box";
self.think = barrel_explode;

// so we don't have to think about it again
if (self.movetype == MOVETYPE_PUSH) {
Expand All @@ -267,6 +274,13 @@ void() barrel_explode =
BecomeExplosion();
};

void() barrel_explode2 = {
self.origin = (self.absmin + self.absmax) / 2.0;
T_RadiusDamage(self, self, 160, world);
sound(self, CHAN_VOICE, "weapons/r_exp3.wav", 1, ATTN_NORM);
particle(self.origin, '0 0 0', 75, 255);
BecomeExplosion();
}


/*QUAKED misc_explobox (0 .5 .8) (0 0 0) (32 32 64)
Expand Down

0 comments on commit b6c0822

Please sign in to comment.