Fixes for lavaball entity and func_door_secret2.

This commit is contained in:
Knightmare66 2020-03-08 05:56:09 -04:00
parent ef76c81f23
commit 1eaba3e791
3 changed files with 24 additions and 12 deletions

View file

@ -552,10 +552,11 @@ void q1_fireball_fly (edict_t *self)
((random() * 100) - 50),
(self->speed + (random() * 150)));
lavaball->movetype = MOVETYPE_FLYMISSILE;
// lavaball->movetype = MOVETYPE_FLYMISSILE;
lavaball->movetype = MOVETYPE_TOSS;
lavaball->clipmask = MASK_SHOT;
lavaball->solid = SOLID_BBOX;
lavaball->s.effects |= EF_ROCKET; //EF_FLAG1
lavaball->s.effects |= EF_ROCKET; // EF_FLAG1
lavaball->s.renderfx |= RF_GLOW;
VectorClear (lavaball->mins);
VectorClear (lavaball->maxs);
@ -587,7 +588,7 @@ void SP_misc_q1_fireball (edict_t *self)
self->think = q1_fireball_fly;
self->classname = "fireball";
self->common_name = "Lavaball spawner";
self->common_name = "Lavaball Spawner";
gi.linkentity(self);
}

View file

@ -135,6 +135,13 @@ void fd_secret_done(edict_t *self)
void secret_blocked(edict_t *self, edict_t *other)
{
// Remove dead Q1 monsters, as they can't be gibbed
if ( (other->svflags & SVF_DEADMONSTER) && (other->flags & FL_Q1_MONSTER) )
{
G_FreeEdict(other);
return;
}
if (!(self->flags & FL_TEAMSLAVE))
T_Damage (other, self, self, self->pos0, other->s.origin, self->pos0, self->dmg, 0, 0, MOD_CRUSH);

View file

@ -1588,11 +1588,11 @@ void SV_Physics_Toss (edict_t *ent)
// add gravity
if (ent->movetype != MOVETYPE_FLY
&& ent->movetype != MOVETYPE_FLYMISSILE
// RAFAEL- move type for rippergun projectile
&& ent->movetype != MOVETYPE_WALLBOUNCE
&& ent->movetype != MOVETYPE_VEHICLE
&& ent->movetype != MOVETYPE_RAIN)
&& ent->movetype != MOVETYPE_FLYMISSILE
// RAFAEL- move type for rippergun projectile
&& ent->movetype != MOVETYPE_WALLBOUNCE
&& ent->movetype != MOVETYPE_VEHICLE
&& ent->movetype != MOVETYPE_RAIN)
SV_AddGravity (ent);
// move angles
@ -1656,10 +1656,14 @@ void SV_Physics_Toss (edict_t *ent)
else
ent->waterlevel = 0;
if (!wasinwater && isinwater)
gi.positioned_sound (old_origin, g_edicts, CHAN_AUTO, gi.soundindex("misc/h2ohit1.wav"), 1, 1, 0);
else if (wasinwater && !isinwater)
gi.positioned_sound (ent->s.origin, g_edicts, CHAN_AUTO, gi.soundindex("misc/h2ohit1.wav"), 1, 1, 0);
if (!wasinwater && isinwater) {
if (strcmp(ent->classname, "lavaball") && strcmp(ent->classname, "bubble"))
gi.positioned_sound (old_origin, g_edicts, CHAN_AUTO, gi.soundindex("misc/h2ohit1.wav"), 1, 1, 0);
}
else if (wasinwater && !isinwater) {
if (strcmp(ent->classname, "lavaball") && strcmp(ent->classname, "bubble"))
gi.positioned_sound (ent->s.origin, g_edicts, CHAN_AUTO, gi.soundindex("misc/h2ohit1.wav"), 1, 1, 0);
}
}
// move teamslaves