diff options
| author | Stanislaw Skowronek <skylark@disorder.sko> | 2013-11-13 15:11:01 (GMT) |
|---|---|---|
| committer | Stanislaw Skowronek <skylark@disorder.sko> | 2013-11-13 15:11:01 (GMT) |
| commit | cbe7df3b3f8b9b0a7481ee44df258ba0d9d03000 (patch) | |
| tree | 774ce42cc210af6d239afda8464c1fb3975fac49 /src/simulation/Simulation.cpp | |
| parent | 5f8ef63e898c023533a34cd8b523e97e22f82c21 (diff) | |
| download | powder-cbe7df3b3f8b9b0a7481ee44df258ba0d9d03000.zip powder-cbe7df3b3f8b9b0a7481ee44df258ba0d9d03000.tar.gz | |
Add some particle interaction.
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 b311465..07bde47 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2190,6 +2190,11 @@ int Simulation::try_move(int i, int x, int y, int nx, int ny) if(parts[i].sld && r && parts[i].sld == parts[r>>8].sld) return 1; + if(!e && r && parts[r>>8].sld) { + parts[r>>8].vx += parts[i].vx; + parts[r>>8].vy += parts[i].vy; + } + /* half-silvered mirror */ if (!e && parts[i].type==PT_PHOT && (((r&0xFF)==PT_BMTL && rand()<RAND_MAX/2) || |
