diff options
| author | Japa | 2010-04-10 08:14:26 +0000 |
|---|---|---|
| committer | Japa | 2010-04-10 08:14:26 +0000 |
| commit | d152bfaf28ae7653e008a6763c2abb97c949c142 (patch) | |
| tree | bd376391e2cabab63f33a8421e6d9bf54ccfdff7 /Constructions.cpp | |
| parent | 661f48f7a818b144459ce03b15dbf60bfd0ee76f (diff) | |
| download | stonesense-d152bfaf28ae7653e008a6763c2abb97c949c142.tar.gz stonesense-d152bfaf28ae7653e008a6763c2abb97c949c142.tar.bz2 stonesense-d152bfaf28ae7653e008a6763c2abb97c949c142.tar.xz | |
got some more stuff working.
creatures are all invisible for some reason, and buildings don't work.
Diffstat (limited to 'Constructions.cpp')
| -rw-r--r-- | Constructions.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Constructions.cpp b/Constructions.cpp index 37be1b2..ea0b34c 100644 --- a/Constructions.cpp +++ b/Constructions.cpp @@ -6,16 +6,17 @@ void changeConstructionMaterials(WorldSegment* segment, vector<t_construction>* allConstructions){
//find construction
int32_t i;
- Block* b;
+ Block* b;
t_construction* construct = 0;
i = (uint32_t) allConstructions->size();
- if(i <= 0) return;
- while(--i >= 0){
- construct = &(*allConstructions)[i];
- b = segment->getBlock(construct->x, construct->y, construct->z);
- if( !b ) continue;
- b->material=construct->material;
- }
+ if(i <= 0) return;
+ while(--i >= 0){
+ construct = &(*allConstructions)[i];
+ b = segment->getBlock(construct->x, construct->y, construct->z);
+ if( !b ) continue;
+ b->material.type=construct->mat_type;
+ b->material.index=construct->mat_idx;
+ }
}
|
