[Gcblue-commits] gcb_wx/src/sim Game.cpp,1.137,1.138 tcControllableObject.cpp,1.1,1.2 tcGoal.cpp,1.6
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2005-07-26 00:37:19
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13788/src/sim Modified Files: Game.cpp tcControllableObject.cpp tcGoal.cpp tcGoalTracker.cpp tcLauncher.cpp tcObjectControl.cpp tcSensorMapTrack.cpp tcSimState.cpp tcSubObject.cpp tcTorpedoObject.cpp Log Message: Added mission goal status to "Mission" channel (hit F7), added sub periscope and mast ops to multiplayer, changed torpedo behavior to resume s-search if track lost early, made afterburner smoke thin a little more uniformly Index: tcSubObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSubObject.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** tcSubObject.cpp 20 Jul 2005 16:24:55 -0000 1.14 --- tcSubObject.cpp 26 Jul 2005 00:37:05 -0000 1.15 *************** *** 51,54 **** --- 51,63 ---- tcPlatformObject::operator<<(stream); + unsigned char mastFlags; + stream >> mastFlags; + + SetPeriscopeState((mastFlags & PERISCOPE) != 0); + SetRadarMastState((mastFlags & RADARMAST) != 0); + SetSnorkelState((mastFlags & SNORKEL) != 0); + + commandObj.ClearNewCommand(); + return stream; } *************** *** 61,64 **** --- 70,80 ---- tcPlatformObject::operator>>(stream); + unsigned char mastFlags = 0; + if (periscopeRaised) mastFlags |= PERISCOPE; + if (radarMastRaised) mastFlags |= RADARMAST; + if (isSnorkeling) mastFlags |= SNORKEL; + + stream << mastFlags; + return stream; } *************** *** 265,268 **** --- 281,286 ---- void tcSubObject::SetPeriscopeState(bool state) { + if (periscopeRaised == state) return; + periscopeRaised = state; *************** *** 276,279 **** --- 294,299 ---- tcMessageInterface::Get()->PopupMessage(s); } + + commandObj.SetNewCommand(MAST_CMD); } *************** *** 283,286 **** --- 303,308 ---- void tcSubObject::SetRadarMastState(bool state) { + if (radarMastRaised == state) return; + radarMastRaised = state; *************** *** 294,297 **** --- 316,321 ---- tcMessageInterface::Get()->PopupMessage(s); } + + commandObj.SetNewCommand(MAST_CMD); } *************** *** 303,307 **** --- 327,336 ---- if (!IsDieselElectric()) return; + if (isSnorkeling == state) return; + isSnorkeling = state; + + + commandObj.SetNewCommand(MAST_CMD); } *************** *** 531,535 **** else { ! sensor->SetActive(false); } } --- 560,564 ---- else { ! SetSensorState(n, false); // vs. sensor->SetActive(false) to have correct multiplayer messages sent } } Index: tcSimState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSimState.cpp,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -d -r1.87 -r1.88 *** tcSimState.cpp 14 Jul 2005 23:42:24 -0000 1.87 --- tcSimState.cpp 26 Jul 2005 00:37:05 -0000 1.88 *************** *** 741,744 **** --- 741,751 ---- afDamage = afDamage * damageEffectiveness; // scale damage by effectiveness + // allow small chance of quadruple damage critical hit + if (damageEffectiveness > 0.98f) + { + afDamage *= 4.0f; + } + + tcPlatformObject *pPlatformObj = dynamic_cast<tcPlatformObject*>(apGameObj); if (pPlatformObj != NULL) *************** *** 2617,2620 **** --- 2624,2628 ---- tcGameObject::SetClientMode(false); tcCommandObject::SetClientMode(false); + tcControllableObject::SetSinglePlayerMode(true); if (tcOptions::Get()->OptionStringExists("UsePositionRegistry")) *************** *** 2643,2646 **** --- 2651,2655 ---- tcGameObject::SetClientMode(true); tcCommandObject::SetClientMode(true); + tcControllableObject::SetSinglePlayerMode(false); if (positionRegistry) *************** *** 2661,2664 **** --- 2670,2674 ---- tcGameObject::SetClientMode(false); tcCommandObject::SetClientMode(false); + tcControllableObject::SetSinglePlayerMode(false); if (tcOptions::Get()->OptionStringExists("UsePositionRegistry")) *************** *** 2772,2776 **** strcpy(msScenarioInfo.mzDescription,""); msScenarioInfo.mbLoaded = false; ! goalTracker = new tcGoalTracker(); tcGoal::AttachSimState(this); --- 2782,2786 ---- strcpy(msScenarioInfo.mzDescription,""); msScenarioInfo.mbLoaded = false; ! goalTracker = tcGoalTracker::Get(); tcGoal::AttachSimState(this); *************** *** 2818,2822 **** { Clear(); ! if (goalTracker) delete goalTracker; if (positionRegistry) delete positionRegistry; } --- 2828,2832 ---- { Clear(); ! if (positionRegistry) delete positionRegistry; } Index: tcSensorMapTrack.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSensorMapTrack.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcSensorMapTrack.cpp 20 Jul 2005 16:24:55 -0000 1.4 --- tcSensorMapTrack.cpp 26 Jul 2005 00:37:05 -0000 1.5 *************** *** 70,74 **** } ! stream >> mnDatabaseID; stream >> sensorFlags; --- 70,77 ---- } ! long databaseId; ! stream >> databaseId; ! IdentifyTrack(databaseId); ! stream >> sensorFlags; *************** *** 194,198 **** void tcSensorMapTrack::SetModel(tc3DModel* model_) { ! if (model) delete model; model = model_; } --- 197,208 ---- void tcSensorMapTrack::SetModel(tc3DModel* model_) { ! if (model) ! { ! // why isn't this part of tc3DModel destructor? (same issue in tcGameObject) ! model->SetSmokeMode(0); ! model->UpdateEffects(); // clear smoke particle generator ! model->DetachFromParent(); ! delete model; ! } model = model_; } *************** *** 366,370 **** if ((ambiguityList.size() == 1) && (mnDatabaseID == -1)) { ! mnDatabaseID = ambiguityList[0]; } --- 376,380 ---- if ((ambiguityList.size() == 1) && (mnDatabaseID == -1)) { ! IdentifyTrack(ambiguityList[0]); } *************** *** 419,423 **** if (databaseID != -1) { ! mnDatabaseID = databaseID; } --- 429,433 ---- if (databaseID != -1) { ! IdentifyTrack(databaseID); } *************** *** 561,564 **** --- 571,582 ---- } + /** + * @returns database id of track or -1 if not identified + */ + long tcSensorMapTrack::GetDatabaseId() const + { + return mnDatabaseID; + } + void tcSensorMapTrack::IdentifyTrack(long id) { *************** *** 567,572 **** // load new 3D mode ! //tcDatabaseObject* objData = tcDatabase::Get()->GetObject(id); ! //SetModel(objData->Get3DModel()); } --- 585,590 ---- // load new 3D mode ! tcDatabaseObject* objData = tcDatabase::Get()->GetObject(id); ! SetModel(objData->Copy3DModel()); } Index: tcGoal.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcGoal.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tcGoal.cpp 2 Nov 2004 04:23:56 -0000 1.6 --- tcGoal.cpp 26 Jul 2005 00:37:05 -0000 1.7 *************** *** 68,71 **** --- 68,75 ---- class_<tcDestroyGoal, bases<tcGoal> >("DestroyGoal", init<std::string>()) ; + + object ProtectGoalType = + class_<tcProtectGoal, bases<tcGoal> >("ProtectGoal", init<std::string>()) + ; } *************** *** 121,130 **** * Writes status summary of goal condition to file */ ! void tcGoal::WriteStatus(std::stringstream& stream) { stream << "* Generic goal" << GoalStateToString(goalState) << "\n"; } tcGoal::tcGoal() { goalState = UNRESOLVED; --- 125,140 ---- * Writes status summary of goal condition to file */ ! void tcGoal::WriteStatus(std::stringstream& stream, unsigned int level) { + for (unsigned int n=0; n<level; n++) + { + stream << indentString; + } + stream << "* Generic goal" << GoalStateToString(goalState) << "\n"; } tcGoal::tcGoal() + : indentString(" ") { goalState = UNRESOLVED; *************** *** 132,135 **** --- 142,146 ---- tcGoal::tcGoal(const tcGoal& goal) + : indentString(goal.indentString) { goalState = goal.goalState; *************** *** 161,165 **** { wxASSERT(simState); - if (goalState != UNRESOLVED) return; // resolved, return immediately // use children to determine pass/fail --- 172,175 ---- *************** *** 190,195 **** } } ! void tcCompoundGoal::WriteStatus(std::stringstream& stream) { std::string typeString; --- 200,210 ---- } } ! void tcCompoundGoal::WriteStatus(std::stringstream& stream, unsigned int level) { + for (unsigned int n=0; n<level; n++) + { + stream << indentString; + } + std::string typeString; *************** *** 204,208 **** stream << "* Compound Goal -- " ! "Mission to achieve " << typeString << " of these subgoals "; if (goalState == PASSED) --- 219,223 ---- stream << "* Compound Goal -- " ! "Mission to achieve " << typeString << " of the following subgoals "; if (goalState == PASSED) *************** *** 224,230 **** for (size_t n=0; n<nChildren; n++) { - stream << " "; tcGoal* childGoal = children.at(n); ! childGoal->WriteStatus(stream); } } --- 239,244 ---- for (size_t n=0; n<nChildren; n++) { tcGoal* childGoal = children.at(n); ! childGoal->WriteStatus(stream, level + 1); } } *************** *** 282,287 **** } ! void tcTimeGoal::WriteStatus(std::stringstream& stream) { if (simState->GetTime() >= passTimeout) { --- 296,306 ---- } ! void tcTimeGoal::WriteStatus(std::stringstream& stream, unsigned int level) { + for (unsigned int n=0; n<level; n++) + { + stream << indentString; + } + if (simState->GetTime() >= passTimeout) { *************** *** 337,365 **** if (goalState != UNRESOLVED) return; // resolved, return immediately ! unsigned int nSize = simState->GetPlatformCount(); ! tnPoolIndex pos = simState->GetPlatformStartPosition(); ! tnPoolIndex key; ! bool unitFound = false; ! // inefficient linear search for now ! for(unsigned i=0;(i<nSize)&&(!unitFound);i++) ! { ! tcGameObject *obj; ! simState->GetNextPlatform(pos,key,obj); ! if (targetString == obj->mzUnit.mz) unitFound = true; ! } ! if (!unitFound) { ! goalState = PASSED; } } ! void tcDestroyGoal::WriteStatus(std::stringstream& stream) { ! stream << "* Destroy Goal -- Platform " << targetString; ! if (goalState == PASSED) { stream << " was DESTROYED.\n"; --- 356,433 ---- if (goalState != UNRESOLVED) return; // resolved, return immediately + tcGameObject* obj = simState->GetObjectByName(targetString); + if (obj == 0) + { + goalState = PASSED; + } ! } ! void tcDestroyGoal::WriteStatus(std::stringstream& stream, unsigned int level) ! { ! for (unsigned int n=0; n<level; n++) ! { ! stream << indentString; ! } ! ! stream << "* Destroy Goal -- " << targetString; ! ! if (goalState == PASSED) ! { ! stream << " was DESTROYED.\n"; ! } ! else ! { ! stream << " NOT DESTROYED.\n"; ! } ! } ! ! ! tcDestroyGoal::tcDestroyGoal(const tcDestroyGoal& goal) ! : tcGoal(goal) ! { ! targetString = goal.targetString; ! } ! ! /*** tcProtectGoal ***/ ! ! tcGoal* tcProtectGoal::Clone() ! { ! tcGoal *goal = new tcProtectGoal(*this); ! return goal; ! } ! ! ! void tcProtectGoal::Update() ! { ! wxASSERT(simState); ! ! tcGameObject* obj = simState->GetObjectByName(targetString); ! ! if (obj == 0) { ! goalState = FAILED; } + else if (obj->mfDamageLevel >= 1.0) + { + goalState = FAILED; + } + else + { + goalState = PASSED; + } } ! void tcProtectGoal::WriteStatus(std::stringstream& stream, unsigned int level) { ! for (unsigned int n=0; n<level; n++) ! { ! stream << indentString; ! } ! stream << "* Protect Goal -- " << targetString; ! ! if (goalState == FAILED) { stream << " was DESTROYED.\n"; *************** *** 367,378 **** else { ! stream << " NOT DESTROYED.\n"; } } ! tcDestroyGoal::tcDestroyGoal(const tcDestroyGoal& goal) : tcGoal(goal) { targetString = goal.targetString; ! } \ No newline at end of file --- 435,446 ---- else { ! stream << " REMAINS SAFE.\n"; } } ! tcProtectGoal::tcProtectGoal(const tcProtectGoal& goal) : tcGoal(goal) { targetString = goal.targetString; ! } Index: tcLauncher.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcLauncher.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** tcLauncher.cpp 14 Jul 2005 23:42:23 -0000 1.27 --- tcLauncher.cpp 26 Jul 2005 00:37:05 -0000 1.28 *************** *** 101,105 **** { mpChildDBObj = tcDatabase::Get()->GetObject(mnChildDBKey); ! InitForNewChild(); } --- 101,108 ---- { mpChildDBObj = tcDatabase::Get()->GetObject(mnChildDBKey); ! if (mpChildDBObj) ! { ! InitForNewChild(); ! } } *************** *** 448,451 **** --- 451,455 ---- /** * Use to change child class (e.g. while changing loadout via tcStores) + * Use SetChildClass("") to clear previous child for empty launcher */ void tcLauncher::SetChildClass(const std::string& childClass) *************** *** 453,456 **** --- 457,467 ---- if (mpChildDBObj && (childClass == mpChildDBObj->mzClass.mz)) return; + if (childClass.size() == 0) + { + mnChildDBKey = -1; + mpChildDBObj = 0; + return; + } + mpChildDBObj = tcDatabase::Get()->GetObject(childClass); if (mpChildDBObj) *************** *** 479,482 **** --- 490,494 ---- void tcLauncher::InitForNewChild() { + if (mpChildDBObj == 0) return; mbActive = 1; *************** *** 618,621 **** --- 630,637 ---- { status = LAUNCHER_EMPTY; + if (mpChildDBObj != 0) + { + SetChildClass(""); + } return; } Index: tcGoalTracker.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcGoalTracker.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcGoalTracker.cpp 5 Dec 2004 02:49:48 -0000 1.7 --- tcGoalTracker.cpp 26 Jul 2005 00:37:05 -0000 1.8 *************** *** 24,34 **** #ifndef WX_PRECOMP #include "wx/wx.h" - #include "wx/msw/private.h" // for MS Windows specific definitions #endif - #include "tcGoalTracker.h" - #include "tcGoal.h" #include <sstream> #include <fstream> #ifdef _DEBUG --- 24,38 ---- #ifndef WX_PRECOMP #include "wx/wx.h" #endif #include <sstream> #include <fstream> + #include "tcGoalTracker.h" + #include "tcGoal.h" + #include "tcSimState.h" + #include "tcUserInfo.h" + #include "common/tcStream.h" + #include "common/tcObjStream.h" + #ifdef _DEBUG *************** *** 37,40 **** --- 41,91 ---- /** + * Singleton accessor + */ + tcGoalTracker* tcGoalTracker::Get() + { + static tcGoalTracker instance; + + return &instance; + } + + /** + * Loads state from update stream + */ + tcUpdateStream& tcGoalTracker::operator<<(tcUpdateStream& stream) + { + bool allianceFailedPrev = allianceFailed; + bool allianceSucceededPrev = allianceSucceeded; + + stream >> allianceFailed; + stream >> allianceSucceeded; + stream >> goalStatusDescription; + + statusChanged = (allianceFailed != allianceFailedPrev) || + (allianceSucceeded != allianceSucceededPrev); + + return stream; + } + + /** + * Saves state to update stream + * alliance value must be stored with stream.SetDetailLevel + */ + tcUpdateStream& tcGoalTracker::operator>>(tcUpdateStream& stream) + { + int alliance = stream.GetDetailLevel(); // a hack, really should not do this + + allianceFailed = HasAllianceFailed(alliance); + allianceSucceeded = HasAllianceSucceeded(alliance); + goalStatusDescription = GetAllianceGoalStatusDescription(alliance); + + stream << allianceFailed; + stream << allianceSucceeded; + stream << goalStatusDescription; + + return stream; + } + + /** * Clears all alliance goals. */ *************** *** 50,53 **** --- 101,134 ---- } } + + allianceFailed = false; + allianceSucceeded = false; + statusChanged = false; + goalStatusDescription.clear(); + } + + const std::string& tcGoalTracker::GetAllianceGoalStatusDescription(int alliance) + { + static std::string resultString; + + if (tcSimState::Get()->IsMultiplayerClient()) + { + if (tcUserInfo::Get()->IsOwnAlliance(alliance)) + { + return goalStatusDescription; + } + else + { + resultString = "Error"; + return resultString; + } + } + + std::stringstream statusStream; + + WriteStatus(statusStream, alliance); + + resultString = statusStream.str(); + return resultString; } *************** *** 101,104 **** --- 182,196 ---- bool tcGoalTracker::HasStatusChanged(int alliance) { + if (tcSimState::Get()->IsMultiplayerClient()) + { + if (statusChanged) + { + // set false so that HasStatusChanged returns true only once per change + statusChanged = false; + return true; + } + return false; + } + tcGoal* allianceGoal = allianceGoals[alliance]; if (!allianceGoal) return false; *************** *** 147,150 **** --- 239,245 ---- if (currentTime - lastUpdateTime < updateInterval) return; lastUpdateTime = currentTime; + + if (tcSimState::Get()->IsMultiplayerClient()) return; + for(int i=0;i<MAX_ALLIANCES;i++) { *************** *** 171,175 **** tcGoalTracker::tcGoalTracker() ! : updateInterval(9.01) { lastUpdateTime = 0; --- 266,273 ---- tcGoalTracker::tcGoalTracker() ! : updateInterval(9.01), ! allianceFailed(false), ! allianceSucceeded(false), ! statusChanged(false) { lastUpdateTime = 0; Index: tcTorpedoObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcTorpedoObject.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** tcTorpedoObject.cpp 14 Jul 2005 23:42:24 -0000 1.15 --- tcTorpedoObject.cpp 26 Jul 2005 00:37:05 -0000 1.16 *************** *** 172,176 **** { seeker->SetPassiveSonar(); - seeker->SetActive(false); // override default for passive to always be active } else --- 172,175 ---- *************** *** 178,181 **** --- 177,181 ---- seeker->SetActiveSonar(); } + seeker->SetActive(false); // override default for passive to always be active wxString s = wxString::Format("Torp %d-%d", obj->mnID, rand() % 1000); *************** *** 231,235 **** float tcTorpedoObject::GetSonarSourceLevel() const { ! float SLp = 120.0f + mcKin.mfSpeed_kts; if (!IsEnsonifying()) return SLp; --- 231,235 ---- float tcTorpedoObject::GetSonarSourceLevel() const { ! float SLp = 120.0f + goalSpeed_kts; if (!IsEnsonifying()) return SLp; *************** *** 457,461 **** float tti_s; float range_km; ! goalDepth_m = -seeker->mcTrack.mfAlt_m; seeker->mcTrack.GetPrediction(predictedtrack, t); --- 457,461 ---- float tti_s; float range_km; ! goalDepth_m = -seeker->mcTrack.mfAlt_m; seeker->mcTrack.GetPrediction(predictedtrack, t); *************** *** 476,483 **** interceptPitch_rad, tti_s, range_km); ! useInterceptPitch = true; ! interceptTime = tti_s; ! } ! } else if (seeker->mnMode == SSMODE_SEEKERSEARCH) { --- 476,488 ---- interceptPitch_rad, tti_s, range_km); ! useInterceptPitch = true; ! interceptTime = tti_s; ! ! if (interceptTime < 100) ! { ! searchMode = SEARCH_LEFTCIRCLE; // to revert to circle search if we lose track when close ! } ! } ! } else if (seeker->mnMode == SSMODE_SEEKERSEARCH) { *************** *** 502,506 **** { goalHeading_rad = mcKin.mfHeading_rad; // maintain heading during acquire - searchMode = SEARCH_LEFTCIRCLE; // to revert to circle search if acq fails } else // error --- 507,510 ---- Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.137 retrieving revision 1.138 diff -C2 -d -r1.137 -r1.138 *** Game.cpp 2 Jul 2005 16:51:12 -0000 1.137 --- Game.cpp 26 Jul 2005 00:37:05 -0000 1.138 *************** *** 120,123 **** --- 120,131 ---- int alliance = allianceList[idx]; + if (tcUserInfo::Get()->IsOwnAlliance(alliance)) + { + tcMessageInterface::Get()->ClearChannel("Mission"); + tcMessageInterface::Get()->ChannelMessage("Mission", + goalTracker->GetAllianceGoalStatusDescription(alliance)); + tcMessageInterface::Get()->ChannelMessage("Mission", ""); + } + if (goalTracker->HasAllianceFailed(alliance)) { *************** *** 446,450 **** std::cout << "InitializeSound() completed" << std::endl; } ! catch(...) { wxMessageBox("Unknown sound initialization error, attempting to disable sound", --- 454,458 ---- std::cout << "InitializeSound() completed" << std::endl; } ! catch (...) { wxMessageBox("Unknown sound initialization error, attempting to disable sound", *************** *** 2565,2569 **** pythonInterface = tcSimPythonInterface::Get(); ! goalTracker = simState->GetGoalTracker(); userInfo = tcUserInfo::Get(); --- 2573,2577 ---- pythonInterface = tcSimPythonInterface::Get(); ! goalTracker = tcGoalTracker::Get(); userInfo = tcUserInfo::Get(); Index: tcControllableObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcControllableObject.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcControllableObject.cpp 6 May 2005 23:57:52 -0000 1.1 --- tcControllableObject.cpp 26 Jul 2005 00:37:05 -0000 1.2 *************** *** 35,38 **** --- 35,39 ---- #endif + bool tcControllableObject::singlePlayerMode = true; tcUserInfo* tcControllableObject::userInfo = 0; *************** *** 42,45 **** --- 43,50 ---- } + void tcControllableObject::SetSinglePlayerMode(bool state) + { + singlePlayerMode = state; + } /** *************** *** 148,152 **** bool tcControllableObject::IsControlled() const { ! return controller == userInfo->GetUsername(); } --- 153,157 ---- bool tcControllableObject::IsControlled() const { ! return singlePlayerMode || (controller == userInfo->GetUsername()); } Index: tcObjectControl.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcObjectControl.cpp,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** tcObjectControl.cpp 14 Jul 2005 23:42:24 -0000 1.45 --- tcObjectControl.cpp 26 Jul 2005 00:37:05 -0000 1.46 *************** *** 1225,1230 **** strcpy(zClass,"BAL"); break; default: ! strcpy(zClass,"ERR"); break; } --- 1225,1236 ---- strcpy(zClass,"BAL"); break; + case DTYPE_TORPEDO: + strcpy(zClass, "TOR"); + break; + case DTYPE_SUBMARINE: + strcpy(zClass, "SUB"); + break; default: ! strcpy(zClass,"UNK"); break; } *************** *** 1265,1270 **** strcpy(zModel,"SUB"); break; default: ! strcpy(zModel,"ERR"); break; } --- 1271,1282 ---- strcpy(zModel,"SUB"); break; + case MTYPE_TORPEDO: + strcpy(zModel, "TOR"); + break; + case MTYPE_FIXED: + strcpy(zModel, "GND"); + break; default: ! strcpy(zModel,"UNK"); break; } *************** *** 1833,1837 **** else { ! hintText = "Error"; } xhint = lastMousePos.x + 10; --- 1845,1849 ---- else { ! hintText = ""; // nothing loaded in launcher } xhint = lastMousePos.x + 10; |