mirror of
https://github.com/yquake2/rogue.git
synced 2024-11-22 20:31:50 +00:00
Fix sanity checks of train_blocked() and train_use()
With the changes the sanity checks are the same as in baseq2 and xatrix. Reported by maraakate in yquake2 issue #160.
This commit is contained in:
parent
d5fbc8c0f1
commit
78de36c25a
1 changed files with 6 additions and 1 deletions
|
@ -3032,6 +3032,11 @@ SP_func_water(edict_t *self)
|
||||||
void
|
void
|
||||||
train_blocked(edict_t *self, edict_t *other)
|
train_blocked(edict_t *self, edict_t *other)
|
||||||
{
|
{
|
||||||
|
if (!self || !other)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!(other->svflags & SVF_MONSTER) && (!other->client))
|
if (!(other->svflags & SVF_MONSTER) && (!other->client))
|
||||||
{
|
{
|
||||||
/* give it a chance to go away on it's own terms (like gibs) */
|
/* give it a chance to go away on it's own terms (like gibs) */
|
||||||
|
@ -3316,7 +3321,7 @@ void
|
||||||
train_use(edict_t *self, edict_t *other /* unused */,
|
train_use(edict_t *self, edict_t *other /* unused */,
|
||||||
edict_t *activator)
|
edict_t *activator)
|
||||||
{
|
{
|
||||||
if (!self || !other)
|
if (!self || !activator)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue