diff options
Diffstat (limited to 'src/emap/mob.c')
-rw-r--r-- | src/emap/mob.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/emap/mob.c b/src/emap/mob.c index 04507a2..81f8435 100644 --- a/src/emap/mob.c +++ b/src/emap/mob.c @@ -343,23 +343,16 @@ int emob_dead_pre(struct mob_data **mdPtr, sprintf(name, "mob_spawn_%d_%d", m, md->bl.id); map->iwall_remove(name); } - // FIXME: Check if srcPtr is not null, THEN try this code - ///////////////////////////////////////////////////////////////////////// - // Program terminated with signal SIGSEGV, Segmentation fault. - // i#0 emob_dead_pre (mdPtr=<optimized out>, srcPtr=0x7ffcd5622190, typePtr=0x7ffcd562218c) at ../../src/emap/mob.c:351 - // 351 if (sd->sc.data && sd->sc.data[SC_BOTTER_SYNDROME]) { - ///////////////////////////////////////////////////////////////////////// - /* - if (srcPtr && *srcPtr) { + // Check for effects from the source + if (srcPtr) { // If Botter Syndrome is active, mob may randomly get NODROP // Aka *typePtr |= 1 struct map_session_data *sd = BL_CAST(BL_PC, *srcPtr); - if (sd->sc.data && sd->sc.data[SC_BOTTER_SYNDROME]) { + if (sd && sd->sc.data && sd->sc.data[SC_BOTTER_SYNDROME]) { if (rnd()%100 < sd->sc.data[SC_BOTTER_SYNDROME]->val1) *typePtr = *typePtr | 1; } } - */ } return 3; } |