# Endless Electrocution (0.5)

**URL:** https://discourse.cataclysmdda.org/t/endless-electrocution-0-5/1227
**Category:** The Garage
**Created:** [May 15, 2013, 6:23am UTC](https://discourse.cataclysmdda.org/t/endless-electrocution-0-5/1227 "2013-05-15T06:23:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Nappist](https://avatars.discourse-cdn.com/v4/letter/n/c37758/32.png) [@Nappist](https://discourse.cataclysmdda.org/u/Nappist)
#### Post date: [May 15, 2013, 6:23am UTC](https://discourse.cataclysmdda.org/t/endless-electrocution-0-5/1227/1 "2013-05-15T06:23:33Z")

</div>

A shocker zombie spat lightning at a kitchen cluster

![](http://i7.photobucket.com/albums/y280/Ablogqwer/lightningelemental_zps12beebcc.png)

It contains beneath them an oven, a cupboard, two sections of table, floor, wall, broken window.

It is not decaying. The cloud appears to be permanent.

---

<div class="post-metadata">

### Author: ![Reservoir](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/reservoir/32/28_2.png) [@Reservoir](https://discourse.cataclysmdda.org/u/Reservoir)
#### Post date: [May 15, 2013, 8:03am UTC](https://discourse.cataclysmdda.org/t/endless-electrocution-0-5/1227/2 "2013-05-15T08:03:09Z")

</div>

Troll science

---

<div class="post-metadata">

### Author: ![Nappist](https://avatars.discourse-cdn.com/v4/letter/n/c37758/32.png) [@Nappist](https://discourse.cataclysmdda.org/u/Nappist)
#### Post date: [May 17, 2013, 5:37am UTC](https://discourse.cataclysmdda.org/t/endless-electrocution-0-5/1227/3 "2013-05-17T05:37:51Z")

</div>

became a normal cloud after save/quitting and re-entering. before than I used it to read, sew, and otherwise do things for several days.

---

<div class="post-metadata">

### Author: ![oohara](https://avatars.discourse-cdn.com/v4/letter/o/dbc845/32.png) [@oohara](https://discourse.cataclysmdda.org/u/oohara)
#### Post date: [June 19, 2013, 3:20pm UTC](https://discourse.cataclysmdda.org/t/endless-electrocution-0-5/1227/4 "2013-06-19T15:20:09Z")

</div>

I confirmed the bug in the version 0.5 stable.  
When I load a game, I sometimes see a permanent smoke (a smoke  
which doesn’t move or disappear). This doesn’t happen in a freshly  
created world.

The game tracks the number of fields (including smokes) with  
the variable field\_count. If it is non-positive, the game skips  
field processing (map::process\_fields\_in\_submap()).  
Although field\_count is reset to 0 when the world is created  
(map::generate()), it is _not_ initialized when the game is loaded.

— a/mapbuffer.cpp  
+++ b/mapbuffer.cpp  
@@ -209,6 +209,8 @@  
num\_loaded, num\_submaps);  
int locx, locy, locz, turn;  
submap\* sm = new submap;

- sm-\>active\_item\_count = 0;
- sm-\>field\_count = 0;  
fin \>\> locx \>\> locy \>\> locz \>\> turn;  
sm-\>turn\_last\_touched = turn;  
int turndif = (master\_game ? int(master\_game-\>turn) - turn : 0);
