Skip to content

Commit

Permalink
NWN: tidy up extraneous debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jbowtie committed Mar 28, 2012
1 parent 6bd8cfa commit a64ead7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
15 changes: 1 addition & 14 deletions src/engines/nwn/creature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ void Creature::constructModelName(const Common::UString &type, uint32 id,

model = Common::UString::sprintf("p%s%s%s_%s%03d",
gender.c_str(), race.c_str(), phenoTypeAlt.c_str(), type.c_str(), id);
status("Expecting part model %s", model.c_str());

if (!ResMan.hasResource(model, Aurora::kFileTypeMDL))
model.clear();
}
Expand Down Expand Up @@ -357,13 +357,8 @@ void Creature::getPartModels() {
}

void Creature::getArmorModels() {
for(int j = 0; j < _equippedItems.size(); j++)
{
status("XX Checking item %s (%d of %d)", _equippedItems[j].getTag().c_str(), j, _equippedItems.size());
}
for (std::vector<Item>::iterator e = _equippedItems.begin(); e != _equippedItems.end(); ++e) {
Item item = *e;
status("Checking item %s", item.getTag().c_str());

for (uint i = 0; i < kBodyPartMAX; i++) {
int id = item.getArmorPart(i);
Expand Down Expand Up @@ -407,11 +402,6 @@ void Creature::loadModel() {
getPartModels();
_model = loadModelObject(_partsSuperModelName);

//lookup armour models from equipped items
//set bodyParts[i].armorID
//in getPartsModels use armorid if non-zero
//else use id

for (uint i = 0; i < kBodyPartMAX; i++) {
if (_bodyParts[i].modelName.empty())
continue;
Expand All @@ -424,7 +414,6 @@ void Creature::loadModel() {
continue;

// Add the loaded model to the appropriate part node
// add in the armour model if any, else body model
Graphics::Aurora::ModelNode *part_node = _model->getNode(kBodyPartNodes[i]);
if(part_node)
part_node->addChild(part_model);
Expand Down Expand Up @@ -526,7 +515,6 @@ void Creature::load(const Aurora::GFFStruct &instance, const Aurora::GFFStruct *
Common::vector2orientation(bearingX, bearingY, o[0], o[1], o[2]);

setOrientation(o[0], o[1], o[2]);
status("Loaded %d items for %s", _equippedItems.size(), _tag.c_str());
}

static const char *kBodyPartFields[] = {
Expand Down Expand Up @@ -699,7 +687,6 @@ void Creature::loadEquippedItems(const Aurora::GFFStruct &gff) {
if(!gff.hasField("Equip_ItemList"))
return;

//_equippedItems.clear();
const Aurora::GFFList &cEquipped = gff.getList("Equip_ItemList");
for (Aurora::GFFList::const_iterator e = cEquipped.begin(); e != cEquipped.end(); ++e) {
const Aurora::GFFStruct &cItem = **e;
Expand Down
2 changes: 0 additions & 2 deletions src/engines/nwn/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ void Item::loadArmorParts(const Aurora::GFFStruct &gff)
for (uint i = 0; i < 19; i++)
if (gff.hasField(kArmorPartFields[i])) {
_armorParts[i].id = gff.getUint(kArmorPartFields[i], _armorParts[i].id);
status("Item object \"%s\" sets amour for \"%s\" (%d)", _tag.c_str(), kArmorPartFields[i], _armorParts[i].id);
}
else
_armorParts[i].id = 0;
Expand All @@ -221,7 +220,6 @@ bool Item::isArmor() {
}

int Item::getArmorPart(int index) {
status("Item \"%s\" sets armor for \"%s\" (%d)", _tag.c_str(), kArmorPartFields[index], _armorParts[index].id);
return _armorParts[index].id;
}

Expand Down

0 comments on commit a64ead7

Please sign in to comment.