diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-21 12:00:31 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-21 12:00:31 (GMT) |
| commit | b6736f967e9889c7fc8a68b11abd5be1ad4cc5d7 (patch) | |
| tree | 693cf90faed1cef2ec0e7ff6859e062134316859 /src/simulation/Simulation.cpp | |
| parent | e25d934856fdd7c2288e3a515cac907a0451e9c4 (diff) | |
| download | powder-b6736f967e9889c7fc8a68b11abd5be1ad4cc5d7.zip powder-b6736f967e9889c7fc8a68b11abd5be1ad4cc5d7.tar.gz | |
Add EMP flash, fixes #137
Diffstat (limited to 'src/simulation/Simulation.cpp')
| -rw-r--r-- | src/simulation/Simulation.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 23c1a21..c5a07e5 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -1860,6 +1860,7 @@ void Simulation::create_arc(int sx, int sy, int dx, int dy, int midpoints, int v void Simulation::clear_sim(void) { int i, x, y; + emp_decor = 0; signs.clear(); currentTick = 0; memset(bmap, 0, sizeof(bmap)); @@ -4394,6 +4395,10 @@ void Simulation::update_particles()//doesn't update the particles themselves, bu gravWallChanged = false; } } + if(emp_decor>0) + emp_decor -= emp_decor/25+2; + if(emp_decor < 0) + emp_decor = 0; } memset(pmap, 0, sizeof(pmap)); |
