Resolved Dynamic Mobs issue (#3467)
* Fixes #3464. * Fixes Dynamic Mobs not being properly reloaded. Thanks to @Litro!
This commit is contained in:
parent
3c157f221d
commit
618fc37eab
@ -4457,12 +4457,12 @@ int npc_reload(void) {
|
|||||||
// dynamic check by [random]
|
// dynamic check by [random]
|
||||||
if( battle_config.dynamic_mobs ){
|
if( battle_config.dynamic_mobs ){
|
||||||
for (int i = 0; i < map_num; i++) {
|
for (int i = 0; i < map_num; i++) {
|
||||||
for( int16 i = 0; i < MAX_MOB_LIST_PER_MAP; i++ ){
|
for( int16 j = 0; j < MAX_MOB_LIST_PER_MAP; j++ ){
|
||||||
struct map_data *mapdata = map_getmapdata(i);
|
struct map_data *mapdata = map_getmapdata(i);
|
||||||
|
|
||||||
if (mapdata->moblist[i] != NULL) {
|
if (mapdata->moblist[j] != NULL) {
|
||||||
aFree(mapdata->moblist[i]);
|
aFree(mapdata->moblist[j]);
|
||||||
mapdata->moblist[i] = NULL;
|
mapdata->moblist[j] = NULL;
|
||||||
}
|
}
|
||||||
if( mapdata->mob_delete_timer != INVALID_TIMER )
|
if( mapdata->mob_delete_timer != INVALID_TIMER )
|
||||||
{ // Mobs were removed anyway,so delete the timer [Inkfish]
|
{ // Mobs were removed anyway,so delete the timer [Inkfish]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user