# Bug with wander spawns

**URL:** https://discourse.cataclysmdda.org/t/bug-with-wander-spawns/10890
**Category:** The Garage
**Created:** [November 18, 2015, 6:58pm UTC](https://discourse.cataclysmdda.org/t/bug-with-wander-spawns/10890 "2015-11-18T18:58:13Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Wyzack](https://avatars.discourse-cdn.com/v4/letter/w/7bcc69/32.png) [@Wyzack](https://discourse.cataclysmdda.org/u/Wyzack)
#### Post date: [November 18, 2015, 6:58pm UTC](https://discourse.cataclysmdda.org/t/bug-with-wander-spawns/10890/1 "2015-11-18T18:58:13Z")

</div>

I decided to make a topic because this is the second time this has happened to me. Essentially if i save and quit my game while close to a horde, the horde will be all around me when i reload. The first time this happened they literally appeared from thin air around my character as soon as one tick passed, but the second time they kind of moved off the initial screen, but still between me and my getaway vehicle. Not sure if this is a known bug with saving and hordes or what, but thought it might be worth sharing incase anyone else has experienced something similar

---

<div class="post-metadata">

### Author: ![Vorchar](https://avatars.discourse-cdn.com/v4/letter/v/5f8ce5/32.png) [@Vorchar](https://discourse.cataclysmdda.org/u/Vorchar)
#### Post date: [November 20, 2015, 8:26pm UTC](https://discourse.cataclysmdda.org/t/bug-with-wander-spawns/10890/2 "2015-11-20T20:26:33Z")

</div>

Not sure if this is related, but I do have hordes on:

 ![](http://imgur.com/VxAW0o9.png)

All those zombies just appeared there while I was driving by. Did not reload or anything.

---

<div class="post-metadata">

### Author: ![CIB](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/cib/32/903_2.png) [@CIB](https://discourse.cataclysmdda.org/u/CIB)
#### Post date: [November 20, 2015, 8:50pm UTC](https://discourse.cataclysmdda.org/t/bug-with-wander-spawns/10890/3 "2015-11-20T20:50:45Z")

</div>

Zombies can literally spawn anywhere you can not see at this moment. That’s just the way it works at the moment.

---

<div class="post-metadata">

### Author: ![Vorchar](https://avatars.discourse-cdn.com/v4/letter/v/5f8ce5/32.png) [@Vorchar](https://discourse.cataclysmdda.org/u/Vorchar)
#### Post date: [November 22, 2015, 9:30am UTC](https://discourse.cataclysmdda.org/t/bug-with-wander-spawns/10890/4 "2015-11-22T09:30:00Z")

</div>

> [@CIB](#):
>
> Zombies can literally spawn anywhere you can not see at this moment. That’s just the way it works at the moment.

No seems to be something else going on, just had bunch of zombies spawn to east of me in an area that I’m seeing while I pressed wait turn button (numpad 5).

![](http://imgur.com/mGsN4lD.png)

---

<div class="post-metadata">

### Author: ![CIB](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/cib/32/903_2.png) [@CIB](https://discourse.cataclysmdda.org/u/CIB)
#### Post date: [November 22, 2015, 9:52am UTC](https://discourse.cataclysmdda.org/t/bug-with-wander-spawns/10890/5 "2015-11-22T09:52:28Z")

</div>

Yes, that’s the distance.

```auto
    if( !ignore_sight ) {
        // If the submap is one of the outermost submaps, assume that monsters are
        // invisible there.
        // When the map shifts because of the player moving (called from game::plmove),
        // the player has still their *old* (not shifted) coordinates.
        // That makes the submaps that have come into view visible (if the sight range
        // is big enough).
        if( gp.x == 0 || gp.y == 0 || gp.x + 1 == MAPSIZE || gp.y + 1 == MAPSIZE ) {
            ignore_sight = true;
        }
    }
```

So basically this is a “feature”.

---

<div class="post-metadata">

### Author: ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)
#### Post date: [November 22, 2015, 5:17pm UTC](https://discourse.cataclysmdda.org/t/bug-with-wander-spawns/10890/6 "2015-11-22T17:17:28Z")

</div>

Either there’s another bug or that code is not working properly, what it is supposed to do is skip the (expensive) sight check if the monster-to-be-spawned is outside of the player’s maximum sight range.
