summaryrefslogtreecommitdiff
path: root/Constructions.cpp
diff options
context:
space:
mode:
authorKris Parker2009-12-10 12:30:22 +0000
committerKris Parker2009-12-10 12:30:22 +0000
commitafba6ea721bc363502f07826d2c0cfb184e447fa (patch)
treed8bc5cdbde815131315838ed170b1c47d7c4f618 /Constructions.cpp
parent35ea344b23fa77945fcf8a267e04cc2494e71a36 (diff)
downloadstonesense-afba6ea721bc363502f07826d2c0cfb184e447fa.tar.gz
stonesense-afba6ea721bc363502f07826d2c0cfb184e447fa.tar.bz2
stonesense-afba6ea721bc363502f07826d2c0cfb184e447fa.tar.xz
Merge terrain config to the trunk
Diffstat (limited to 'Constructions.cpp')
-rw-r--r--Constructions.cpp54
1 files changed, 1 insertions, 53 deletions
diff --git a/Constructions.cpp b/Constructions.cpp
index a269509..37be1b2 100644
--- a/Constructions.cpp
+++ b/Constructions.cpp
@@ -14,59 +14,7 @@ void changeConstructionMaterials(WorldSegment* segment, vector<t_construction>*
construct = &(*allConstructions)[i];
b = segment->getBlock(construct->x, construct->y, construct->z);
if( !b ) continue;
- //replace floor, wall and ramp types
- if(b->floorType > 0){
- switch(construct->material.type){
- case Mat_Wood:
- if(b->floorType == ID_CNSTFLOOR){
- //set to wooden floor
- b->floorType = ID_WOODFLOOR;
- //if tile beneth has a wooden wall, dont display a floor. hackish. buggish. whatever
- Block* under = segment->getBlockRelativeTo( b->x, b->y, b->z, eBelow );
- if(under && under->wallType == ID_WOODWALL)
- b->floorType = 0;
- }
- break;
- case Mat_Stone:
- //case Trey_Parker:
- break;
-
- case Mat_Metal:
- b->floorType = ID_METALFLOOR;
- }
-
- }
- if(b->wallType > 0){
- switch(construct->material.type){
- case Mat_Wood:
- if(b->wallType == ID_CNSTFORTIFICATION)
- b->wallType = ID_WOODFORTIFICATION;
- else
- b->wallType = ID_WOODWALL;
- break;
- case Mat_Stone:
- //stones are the default constructed object, so dont change them
- break;
- case Mat_Metal:
- b->wallType = ID_METALWALL;
- break;
- }
- }
- if(b->stairType > 0){
- switch(construct->material.type){
- case Mat_Wood:
- if(b->stairType == ID_CNSTR_STAIR_UP)
- b->stairType = ID_WOODFLOOR_STAIR_UP;
- if(b->stairType == ID_CNSTR_STAIR_UPDOWN)
- b->stairType = ID_WOODFLOOR_STAIR_UPDOWN;
- if(b->stairType == ID_CNSTR_STAIR_DOWN)
- b->stairType = ID_WOODFLOOR_STAIR_DOWN;
- break;
- case Mat_Stone:
- //case Trey_Parker:
- break;
- }
- }
+ b->material=construct->material;
}
}