diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index b054cda74..61b09441f 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -3311,11 +3311,11 @@ void Simulation::update_particles_i(int start, int inc) if (ny+nny>0&&ny+nny=0&&nx+nnx>8].type==PT_LOVE&&loverule[nnx][nny]==0) + else if (parts[rt>>8].type==PT_LOVE&&Element_LOVE::RuleTable[nnx][nny]==0) kill_part(rt>>8); } } @@ -3329,11 +3329,11 @@ void Simulation::update_particles_i(int start, int inc) if (ny+nny>0&&ny+nny=0&&nx+nnx>8].type==PT_LOLZ&&lolzrule[nny][nnx]==0) + else if (parts[rt>>8].type==PT_LOLZ&&Element_LOLZ::RuleTable[nny][nnx]==0) kill_part(rt>>8); } @@ -4747,29 +4747,4 @@ Simulation::Simulation(): clear_sim(); grav->gravity_mask(); - - int loverule[9][9] = - { - {0,0,1,1,0,0,0,0,0}, - {0,1,0,0,1,1,0,0,0}, - {1,0,0,0,0,0,1,0,0}, - {1,0,0,0,0,0,0,1,0}, - {0,1,0,0,0,0,0,0,1}, - {1,0,0,0,0,0,0,1,0}, - {1,0,0,0,0,0,1,0,0}, - {0,1,0,0,1,1,0,0,0}, - {0,0,1,1,0,0,0,0,0}, - }; - int lolzrule[9][9] = - { - {0,0,0,0,0,0,0,0,0}, - {1,0,0,0,0,0,1,0,0}, - {1,0,0,0,0,0,1,0,0}, - {1,0,0,1,1,0,0,1,0}, - {1,0,1,0,0,1,0,1,0}, - {1,0,1,0,0,1,0,1,0}, - {0,1,0,1,1,0,0,1,0}, - {0,1,0,0,0,0,0,1,0}, - {0,1,0,0,0,0,0,1,0}, - }; } diff --git a/src/simulation/elements/LOLZ.cpp b/src/simulation/elements/LOLZ.cpp index 4ab9c6188..a5e837183 100644 --- a/src/simulation/elements/LOLZ.cpp +++ b/src/simulation/elements/LOLZ.cpp @@ -46,6 +46,20 @@ Element_LOLZ::Element_LOLZ() } +//#TPT-Directive ElementHeader Element_LOLZ static int RuleTable[9][9] +int Element_LOLZ::RuleTable[9][9] = +{ + {0,0,0,0,0,0,0,0,0}, + {1,0,0,0,0,0,1,0,0}, + {1,0,0,0,0,0,1,0,0}, + {1,0,0,1,1,0,0,1,0}, + {1,0,1,0,0,1,0,1,0}, + {1,0,1,0,0,1,0,1,0}, + {0,1,0,1,1,0,0,1,0}, + {0,1,0,0,0,0,0,1,0}, + {0,1,0,0,0,0,0,1,0}, +}; + //#TPT-Directive ElementHeader Element_LOLZ static int update(UPDATE_FUNC_ARGS) int Element_LOLZ::update(UPDATE_FUNC_ARGS) { diff --git a/src/simulation/elements/LOVE.cpp b/src/simulation/elements/LOVE.cpp index e15cea29a..3e7b3d400 100644 --- a/src/simulation/elements/LOVE.cpp +++ b/src/simulation/elements/LOVE.cpp @@ -46,6 +46,20 @@ Element_LOVE::Element_LOVE() } +//#TPT-Directive ElementHeader Element_LOVE static int RuleTable[9][9] +int Element_LOVE::RuleTable[9][9] = +{ + {0,0,1,1,0,0,0,0,0}, + {0,1,0,0,1,1,0,0,0}, + {1,0,0,0,0,0,1,0,0}, + {1,0,0,0,0,0,0,1,0}, + {0,1,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,1,0}, + {1,0,0,0,0,0,1,0,0}, + {0,1,0,0,1,1,0,0,0}, + {0,0,1,1,0,0,0,0,0}, +}; + //#TPT-Directive ElementHeader Element_LOVE static int update(UPDATE_FUNC_ARGS) int Element_LOVE::update(UPDATE_FUNC_ARGS) {