diff --git a/src/game/baseq2/g_monster.c b/src/game/baseq2/g_monster.c index c7b40b5c..420bf116 100644 --- a/src/game/baseq2/g_monster.c +++ b/src/game/baseq2/g_monster.c @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // monster weapons // -//FIXME mosnters should call these with a totally accurate direction +//FIXME monsters should call these with a totally accurate direction // and we can mess it up based on skill. Spread should be for normal // and we can tighten or loosen based on skill. We could muck with // the damages too, but I'm not sure that's such a good idea. diff --git a/src/game/baseq2/g_weapon.c b/src/game/baseq2/g_weapon.c index 492eda0f..5eb908f7 100644 --- a/src/game/baseq2/g_weapon.c +++ b/src/game/baseq2/g_weapon.c @@ -68,6 +68,10 @@ qboolean fire_hit (edict_t *self, vec3_t aim, int damage, int kick) vec3_t point; float range; vec3_t dir; + + // Lazarus: Paranoia check + if(!self->enemy) + return false; //see if enemy is in range VectorSubtract (self->enemy->s.origin, self->s.origin, dir); @@ -364,6 +368,7 @@ void fire_blaster (edict_t *self, vec3_t start, vec3_t dir, int damage, int spee bolt->clipmask = MASK_SHOT; bolt->solid = SOLID_BBOX; bolt->s.effects |= effect; + bolt->s.renderfx |= RF_NOSHADOW; VectorClear (bolt->mins); VectorClear (bolt->maxs); bolt->s.modelindex = gi.modelindex ("models/objects/laser/tris.md2"); @@ -400,7 +405,7 @@ static void Grenade_Explode (edict_t *ent) vec3_t origin; int mod; - if (ent->owner->client) + if (ent->owner && ent->owner->client) PlayerNoise(ent->owner, ent->s.origin, PNOISE_IMPACT); //FIXME: if we are onground then raise our Z just a bit since we are a point? @@ -580,7 +585,7 @@ void rocket_touch (edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *su return; } - if (ent->owner->client) + if (ent->owner && ent->owner->client) PlayerNoise(ent->owner, ent->s.origin, PNOISE_IMPACT); // calculate position for the explosion entity