thingfixes

This commit is contained in:
Henrique 2011-09-15 22:02:16 -03:00
parent 1838120f6e
commit da10f16a64
1 changed files with 6 additions and 5 deletions

View File

@ -39,19 +39,19 @@ bool ThingsType::load(const std::string& file)
int numEffects = Fw::getU16(fin); int numEffects = Fw::getU16(fin);
int numShots = Fw::getU16(fin); int numShots = Fw::getU16(fin);
m_itemsType.resize(numItems); m_itemsType.resize(numItems-100);
for(int id = 100; id < numItems; ++id) for(int id = 100; id < numItems; ++id)
parseThingType(fin, m_itemsType[id - 100]); parseThingType(fin, m_itemsType[id - 100]);
m_creaturesType.resize(numItems); m_creaturesType.resize(numCreatures);
for(int id = 0; id < numCreatures; ++id) for(int id = 0; id < numCreatures; ++id)
parseThingType(fin, m_creaturesType[id]); parseThingType(fin, m_creaturesType[id]);
m_effectsType.resize(numItems); m_effectsType.resize(numEffects);
for(int id = 0; id < numEffects; ++id) for(int id = 0; id < numEffects; ++id)
parseThingType(fin, m_effectsType[id]); parseThingType(fin, m_effectsType[id]);
m_shotsType.resize(numItems); m_shotsType.resize(numShots);
for(int id = 0; id < numShots; ++id) for(int id = 0; id < numShots; ++id)
parseThingType(fin, m_shotsType[id]); parseThingType(fin, m_shotsType[id]);
@ -120,7 +120,7 @@ void ThingsType::parseThingType(std::stringstream& fin, ThingType& thingType)
thingType.isFluidContainer = true; thingType.isFluidContainer = true;
break; break;
case Otc::DatSplash: // Splashes case Otc::DatSplash: // Splashes
thingType.isStackable = true; thingType.isSplash = true;
break; break;
case Otc::DatBlockWalk: // Blocks solid objects (creatures, walls etc) case Otc::DatBlockWalk: // Blocks solid objects (creatures, walls etc)
thingType.isNotWalkable = true; thingType.isNotWalkable = true;
@ -155,6 +155,7 @@ void ThingsType::parseThingType(std::stringstream& fin, ThingType& thingType)
thingType.lightColor = Fw::getU16(fin); thingType.lightColor = Fw::getU16(fin);
break; break;
case Otc::DatDontHide: // A few monuments that are not supposed to be hidden by floors case Otc::DatDontHide: // A few monuments that are not supposed to be hidden by floors
thingType.isDontHide = true;
break; break;
case Otc::DatTranslucent: // Grounds that are translucent case Otc::DatTranslucent: // Grounds that are translucent
thingType.isTranslucent = true; thingType.isTranslucent = true;