diff options
Diffstat (limited to 'src/simulation/Simulation.cpp')
| -rw-r--r-- | src/simulation/Simulation.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index c420f3b..e696581 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2033,6 +2033,7 @@ void Simulation::init_can_move() } } //a list of lots of things PHOT can move through + // TODO: replace with property for (movingType = 0; movingType < PT_NUM; movingType++) { if (movingType == PT_GLAS || movingType == PT_PHOT || movingType == PT_FILT || movingType == PT_INVIS @@ -2721,20 +2722,17 @@ int Simulation::create_part(int p, int x, int y, int tv) { if (pmap[y][x]) { + //If an element has the PROP_DRAWONCTYPE property, and the element being drawn to it does not have PROP_NOCTYPEDRAW (Also some special cases), set the element's ctype int drawOn = pmap[y][x]&0xFF; - if (( - (drawOn == PT_STOR && !(elements[t].Properties&TYPE_SOLID)) || - drawOn==PT_CLNE || - drawOn==PT_BCLN || - drawOn==PT_CONV || - (drawOn==PT_PCLN&&t!=PT_PSCN&&t!=PT_NSCN) || - (drawOn==PT_PBCN&&t!=PT_PSCN&&t!=PT_NSCN) - )&&( - t != PT_CLNE && t != PT_PCLN && t != PT_BCLN && t != PT_STKM && t != PT_STKM2 && t != PT_PBCN && t != PT_STOR && t != PT_FIGH && t != PT_CONV) - ) + if (((elements[drawOn].Properties & PROP_DRAWONCTYPE) || + (drawOn == PT_STOR && !(elements[t].Properties & TYPE_SOLID)) || + (drawOn == PT_PCLN && t != PT_PSCN && t != PT_NSCN) || + (drawOn == PT_PBCN && t != PT_PSCN && t != PT_NSCN)) + && (!(elements[t].Properties & PROP_NOCTYPEDRAW))) { parts[pmap[y][x]>>8].ctype = t; - if (t == PT_LIFE && v < NGOL && drawOn != PT_STOR) parts[pmap[y][x]>>8].tmp = v; + if (t == PT_LIFE && v < NGOL && drawOn != PT_STOR) + parts[pmap[y][x]>>8].tmp = v; } else if ((drawOn == PT_DTEC || (drawOn == PT_PSTN && t != PT_FRME)) && drawOn != t) { |
