From: hellcatv <hel...@us...> - 2005-03-24 07:15:39
|
Update of /cvsroot/vegastrike/vegastrike/src/cmd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18880/cmd Modified Files: basecomputer.cpp Log Message: fixed no template no weapon upgrade bug Index: basecomputer.cpp =================================================================== RCS file: /cvsroot/vegastrike/vegastrike/src/cmd/basecomputer.cpp,v retrieving revision 1.146 retrieving revision 1.147 diff -C2 -r1.146 -r1.147 *** basecomputer.cpp 4 Feb 2005 01:18:29 -0000 1.146 --- basecomputer.cpp 24 Mar 2005 07:15:30 -0000 1.147 *************** *** 3216,3231 **** m_theTemplate = UnitConstCache::setCachedConst(StringIntKey(templateName,faction),UnitFactory::createUnit(templateName.c_str(),true,faction)); } ! if (m_theTemplate->name != LOAD_FAILED) { ! m_addMultMode = GetModeFromName(m_selectedItem.content.c_str()); // Whether the price is linear or geometric. ! unsigned int offset; // Temp. Not used. ! Cargo* part = baseUnit->GetCargo(m_selectedItem.content, offset); // Whether the base has any of these. ! if(part && part->quantity > 0) { ! m_part = *part; ! endInit(); ! } else { ! finish(); ! } } else { ! finish(); } --- 3216,3230 ---- m_theTemplate = UnitConstCache::setCachedConst(StringIntKey(templateName,faction),UnitFactory::createUnit(templateName.c_str(),true,faction)); } ! if (m_theTemplate->name == LOAD_FAILED) { ! m_theTemplate=NULL; ! } ! m_addMultMode = GetModeFromName(m_selectedItem.content.c_str()); // Whether the price is linear or geometric. ! unsigned int offset; // Temp. Not used. ! Cargo* part = baseUnit->GetCargo(m_selectedItem.content, offset); // Whether the base has any of these. ! if(part && part->quantity > 0) { ! m_part = *part; ! endInit(); } else { ! finish(); } |