Merge pull request #1058 from colobot/dev-targetpractice
Update Trainer (Practice) bots, trainer=1 objects, and TargetBotmodernize-cmake-1
commit
354bbf9287
|
@ -810,6 +810,18 @@ msgstr ""
|
|||
msgid "Build a legged sniffer"
|
||||
msgstr ""
|
||||
|
||||
msgid "Build a winged builder"
|
||||
msgstr ""
|
||||
|
||||
msgid "Build a tracked builder"
|
||||
msgstr ""
|
||||
|
||||
msgid "Build a wheeled builder"
|
||||
msgstr ""
|
||||
|
||||
msgid "Build a legged builder"
|
||||
msgstr ""
|
||||
|
||||
msgid "Build a thumper"
|
||||
msgstr ""
|
||||
|
||||
|
@ -825,6 +837,9 @@ msgstr ""
|
|||
msgid "Build a subber"
|
||||
msgstr ""
|
||||
|
||||
msgid "Build a target bot"
|
||||
msgstr ""
|
||||
|
||||
msgid "Run research program for tracked bots"
|
||||
msgstr ""
|
||||
|
||||
|
@ -855,6 +870,12 @@ msgstr ""
|
|||
msgid "Run research program for orga shooter"
|
||||
msgstr ""
|
||||
|
||||
msgid "Run research program for builder"
|
||||
msgstr ""
|
||||
|
||||
msgid "Run research program for target bot"
|
||||
msgstr ""
|
||||
|
||||
msgid "Return to start"
|
||||
msgstr ""
|
||||
|
||||
|
@ -870,6 +891,9 @@ msgstr ""
|
|||
msgid "Explode (\\key action;)"
|
||||
msgstr ""
|
||||
|
||||
msgid "Build (\\key action;)"
|
||||
msgstr ""
|
||||
|
||||
msgid "Recycle (\\key action;)"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1248,6 +1272,18 @@ msgstr ""
|
|||
msgid "Legged grabber"
|
||||
msgstr ""
|
||||
|
||||
msgid "Winged builder"
|
||||
msgstr ""
|
||||
|
||||
msgid "Tracked builder"
|
||||
msgstr ""
|
||||
|
||||
msgid "Wheeled builder"
|
||||
msgstr ""
|
||||
|
||||
msgid "Legged builder"
|
||||
msgstr ""
|
||||
|
||||
msgid "Winged shooter"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1464,7 +1500,7 @@ msgstr ""
|
|||
msgid "Nothing to analyze"
|
||||
msgstr ""
|
||||
|
||||
msgid "Analyzes only organic matter"
|
||||
msgid "Inappropriate sample"
|
||||
msgstr ""
|
||||
|
||||
msgid "Analysis already performed"
|
||||
|
@ -1563,6 +1599,9 @@ msgstr ""
|
|||
msgid "Plans for nuclear power plant available"
|
||||
msgstr ""
|
||||
|
||||
msgid "Plans for builder available"
|
||||
msgstr ""
|
||||
|
||||
msgid "New bot available"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -432,6 +432,7 @@ void InitializeEventTypeTexts()
|
|||
EVENT_TYPE_TEXT[EVENT_OBJECT_FACTORYrr] = "EVENT_OBJECT_FACTORYrr";
|
||||
EVENT_TYPE_TEXT[EVENT_OBJECT_FACTORYrs] = "EVENT_OBJECT_FACTORYrs";
|
||||
EVENT_TYPE_TEXT[EVENT_OBJECT_FACTORYsa] = "EVENT_OBJECT_FACTORYsa";
|
||||
EVENT_TYPE_TEXT[EVENT_OBJECT_FACTORYtg] = "EVENT_OBJECT_FACTORYtg";
|
||||
EVENT_TYPE_TEXT[EVENT_OBJECT_SEARCH] = "EVENT_OBJECT_SEARCH";
|
||||
EVENT_TYPE_TEXT[EVENT_OBJECT_TERRAFORM] = "EVENT_OBJECT_TERRAFORM";
|
||||
EVENT_TYPE_TEXT[EVENT_OBJECT_FIRE] = "EVENT_OBJECT_FIRE";
|
||||
|
@ -527,8 +528,9 @@ void InitializeEventTypeTexts()
|
|||
EVENT_TYPE_TEXT[EVENT_CODE_BATTLE_START] = "EVENT_CODE_BATTLE_START";
|
||||
EVENT_TYPE_TEXT[EVENT_CODE_BATTLE_SPECTATOR] = "EVENT_CODE_BATTLE_SPECTATOR";
|
||||
|
||||
EVENT_TYPE_TEXT[EVENT_OBJECT_RBUILDER] = "EVENT_OBJECT_RBUILDER";
|
||||
EVENT_TYPE_TEXT[EVENT_OBJECT_BUILD] = "EVENT_OBJECT_BUILD";
|
||||
EVENT_TYPE_TEXT[EVENT_OBJECT_RBUILDER] = "EVENT_OBJECT_RBUILDER";
|
||||
EVENT_TYPE_TEXT[EVENT_OBJECT_BUILD] = "EVENT_OBJECT_BUILD";
|
||||
EVENT_TYPE_TEXT[EVENT_OBJECT_RTARGET] = "EVENT_OBJECT_RTARGET";
|
||||
}
|
||||
|
||||
std::string ParseEventType(EventType eventType)
|
||||
|
|
|
@ -496,6 +496,7 @@ enum EventType
|
|||
EVENT_OBJECT_FACTORYtb = 1102,
|
||||
EVENT_OBJECT_FACTORYfb = 1103,
|
||||
EVENT_OBJECT_FACTORYib = 1104,
|
||||
EVENT_OBJECT_FACTORYtg = 1105,
|
||||
EVENT_OBJECT_SEARCH = 1200,
|
||||
EVENT_OBJECT_TERRAFORM = 1201,
|
||||
EVENT_OBJECT_FIRE = 1202,
|
||||
|
@ -600,6 +601,7 @@ enum EventType
|
|||
|
||||
EVENT_OBJECT_RBUILDER = 2300,
|
||||
EVENT_OBJECT_BUILD = 2301,
|
||||
EVENT_OBJECT_RTARGET = 2302,
|
||||
|
||||
//! Maximum value of standard events
|
||||
EVENT_STD_MAX,
|
||||
|
|
|
@ -366,6 +366,7 @@ void InitializeRestext()
|
|||
stringsEvent[EVENT_OBJECT_FACTORYrr] = TR("Build a recycler");
|
||||
stringsEvent[EVENT_OBJECT_FACTORYrs] = TR("Build a shielder");
|
||||
stringsEvent[EVENT_OBJECT_FACTORYsa] = TR("Build a subber");
|
||||
stringsEvent[EVENT_OBJECT_FACTORYtg] = TR("Build a target bot");
|
||||
stringsEvent[EVENT_OBJECT_RTANK] = TR("Run research program for tracked bots");
|
||||
stringsEvent[EVENT_OBJECT_RFLY] = TR("Run research program for winged bots");
|
||||
stringsEvent[EVENT_OBJECT_RTHUMP] = TR("Run research program for thumper");
|
||||
|
@ -377,6 +378,7 @@ void InitializeRestext()
|
|||
stringsEvent[EVENT_OBJECT_RiPAW] = TR("Run research program for legged bots");
|
||||
stringsEvent[EVENT_OBJECT_RiGUN] = TR("Run research program for orga shooter");
|
||||
stringsEvent[EVENT_OBJECT_RBUILDER] = TR("Run research program for builder");
|
||||
stringsEvent[EVENT_OBJECT_RTARGET] = TR("Run research program for target bot");
|
||||
stringsEvent[EVENT_OBJECT_RESET] = TR("Return to start");
|
||||
stringsEvent[EVENT_OBJECT_SEARCH] = TR("Sniff (\\key action;)");
|
||||
stringsEvent[EVENT_OBJECT_TERRAFORM] = TR("Thump (\\key action;)");
|
||||
|
@ -519,6 +521,8 @@ void InitializeRestext()
|
|||
stringsObject[OBJECT_MOBILEtt] = TR("Practice bot");
|
||||
stringsObject[OBJECT_MOBILEwt] = TR("Practice bot");
|
||||
stringsObject[OBJECT_MOBILEit] = TR("Practice bot");
|
||||
stringsObject[OBJECT_MOBILErp] = TR("Practice bot");
|
||||
stringsObject[OBJECT_MOBILEst] = TR("Practice bot");
|
||||
stringsObject[OBJECT_MOBILEfa] = TR("Winged grabber");
|
||||
stringsObject[OBJECT_MOBILEta] = TR("Tracked grabber");
|
||||
stringsObject[OBJECT_MOBILEwa] = TR("Wheeled grabber");
|
||||
|
@ -626,7 +630,7 @@ void InitializeRestext()
|
|||
stringsErr[ERR_BASE_DLOCK] = TR("Doors blocked by a robot or another object");
|
||||
stringsErr[ERR_BASE_DHUMAN] = TR("You must get on the spaceship to take off");
|
||||
stringsErr[ERR_LABO_NULL] = TR("Nothing to analyze");
|
||||
stringsErr[ERR_LABO_BAD] = TR("Analyzes only organic matter");
|
||||
stringsErr[ERR_LABO_BAD] = TR("Inappropriate sample");
|
||||
stringsErr[ERR_LABO_ALREADY] = TR("Analysis already performed");
|
||||
stringsErr[ERR_NUCLEAR_EMPTY] = TR("No uranium to transform");
|
||||
stringsErr[ERR_NUCLEAR_BAD] = TR("Transforms only uranium");
|
||||
|
|
|
@ -193,6 +193,7 @@ void COldModelManager::ChangeVariant(std::vector<ModelTriangle>& triangles, int
|
|||
triangles[i].tex1Name == "factory.png" ||
|
||||
triangles[i].tex1Name == "lemt.png" ||
|
||||
triangles[i].tex1Name == "roller.png" ||
|
||||
triangles[i].tex1Name == "rollert.png" ||
|
||||
triangles[i].tex1Name == "search.png" ||
|
||||
triangles[i].tex1Name == "drawer.png" ||
|
||||
triangles[i].tex1Name == "subm.png" )
|
||||
|
|
|
@ -67,7 +67,6 @@ bool IsAlien(ObjectType type)
|
|||
type == OBJECT_NEST ||
|
||||
type == OBJECT_BULLET ||
|
||||
type == OBJECT_EGG ||
|
||||
type == OBJECT_MOBILEtg ||
|
||||
type == OBJECT_TEEN28 ||
|
||||
type == OBJECT_TEEN31 );
|
||||
}
|
||||
|
|
|
@ -1285,6 +1285,8 @@ void CPyro::DisplayError(PyroType type, CObject* obj)
|
|||
oType == OBJECT_MOBILEtt ||
|
||||
oType == OBJECT_MOBILEft ||
|
||||
oType == OBJECT_MOBILEit ||
|
||||
oType == OBJECT_MOBILErp ||
|
||||
oType == OBJECT_MOBILEst ||
|
||||
oType == OBJECT_MOBILEdr )
|
||||
{
|
||||
err = ERR_DELETEMOBILE;
|
||||
|
@ -2053,11 +2055,14 @@ void CPyro::BurnStart()
|
|||
m_burnType == OBJECT_MOBILEtc ||
|
||||
m_burnType == OBJECT_MOBILEti ||
|
||||
m_burnType == OBJECT_MOBILEts ||
|
||||
m_burnType == OBJECT_MOBILEtt ||
|
||||
m_burnType == OBJECT_MOBILErt ||
|
||||
m_burnType == OBJECT_MOBILErc ||
|
||||
m_burnType == OBJECT_MOBILErr ||
|
||||
m_burnType == OBJECT_MOBILErs ||
|
||||
m_burnType == OBJECT_MOBILErp ||
|
||||
m_burnType == OBJECT_MOBILEsa ||
|
||||
m_burnType == OBJECT_MOBILEst ||
|
||||
m_burnType == OBJECT_MOBILEdr ) // caterpillars?
|
||||
{
|
||||
pos.x = 0.0f;
|
||||
|
@ -2102,7 +2107,8 @@ void CPyro::BurnStart()
|
|||
m_burnType == OBJECT_MOBILEib ||
|
||||
m_burnType == OBJECT_MOBILEic ||
|
||||
m_burnType == OBJECT_MOBILEii ||
|
||||
m_burnType == OBJECT_MOBILEis ) // legs?
|
||||
m_burnType == OBJECT_MOBILEis ||
|
||||
m_burnType == OBJECT_MOBILEit ) // legs?
|
||||
{
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
|
|
|
@ -592,6 +592,8 @@ float CWater::GetLevel(CObject* object)
|
|||
type == OBJECT_MOBILEtt ||
|
||||
type == OBJECT_MOBILEwt ||
|
||||
type == OBJECT_MOBILEit ||
|
||||
type == OBJECT_MOBILErp ||
|
||||
type == OBJECT_MOBILEst ||
|
||||
type == OBJECT_MOBILEdr )
|
||||
{
|
||||
return m_level-2.0f;
|
||||
|
|
|
@ -339,6 +339,12 @@ ObjectType CLevelParserParam::ToObjectType(std::string value)
|
|||
if (value == "Portico" ) return OBJECT_PORTICO;
|
||||
if (value == "SpaceShip" ) return OBJECT_BASE;
|
||||
if (value == "PracticeBot" ) return OBJECT_MOBILEwt;
|
||||
if (value == "WingedTrainer" ) return OBJECT_MOBILEft;
|
||||
if (value == "TrackedTrainer" ) return OBJECT_MOBILEtt;
|
||||
if (value == "WheeledTrainer" ) return OBJECT_MOBILEwt;
|
||||
if (value == "LeggedTrainer" ) return OBJECT_MOBILEit;
|
||||
if (value == "HeavyTrainer" ) return OBJECT_MOBILErp;
|
||||
if (value == "AmphibiousTrainer" ) return OBJECT_MOBILEst;
|
||||
if (value == "WingedGrabber" ) return OBJECT_MOBILEfa;
|
||||
if (value == "TrackedGrabber" ) return OBJECT_MOBILEta;
|
||||
if (value == "WheeledGrabber" ) return OBJECT_MOBILEwa;
|
||||
|
@ -543,7 +549,12 @@ const std::string CLevelParserParam::FromObjectType(ObjectType value)
|
|||
{
|
||||
if (value == OBJECT_PORTICO ) return "Portico";
|
||||
if (value == OBJECT_BASE ) return "SpaceShip";
|
||||
if (value == OBJECT_MOBILEwt ) return "PracticeBot";
|
||||
if (value == OBJECT_MOBILEwt ) return "WheeledTrainer";
|
||||
if (value == OBJECT_MOBILEft ) return "WingedTrainer";
|
||||
if (value == OBJECT_MOBILEtt ) return "TrackedTrainer";
|
||||
if (value == OBJECT_MOBILEit ) return "LeggedTrainer";
|
||||
if (value == OBJECT_MOBILErp ) return "HeavyTrainer";
|
||||
if (value == OBJECT_MOBILEst ) return "AmphibiousTrainer";
|
||||
if (value == OBJECT_MOBILEfa ) return "WingedGrabber";
|
||||
if (value == OBJECT_MOBILEta ) return "TrackedGrabber";
|
||||
if (value == OBJECT_MOBILEwa ) return "WheeledGrabber";
|
||||
|
@ -757,12 +768,13 @@ ObjectType CLevelParserParam::AsObjectType(ObjectType def)
|
|||
|
||||
DriveType CLevelParserParam::ToDriveType(std::string value)
|
||||
{
|
||||
if (value == "Wheeled") return DriveType::Wheeled;
|
||||
if (value == "Tracked") return DriveType::Tracked;
|
||||
if (value == "Winged" ) return DriveType::Winged;
|
||||
if (value == "Legged" ) return DriveType::Legged;
|
||||
if (value == "BigTracked") return DriveType::BigTracked;
|
||||
if (value == "Other" ) return DriveType::Other;
|
||||
if (value == "Wheeled" ) return DriveType::Wheeled;
|
||||
if (value == "Tracked" ) return DriveType::Tracked;
|
||||
if (value == "Winged" ) return DriveType::Winged;
|
||||
if (value == "Legged" ) return DriveType::Legged;
|
||||
if (value == "Heavy" ) return DriveType::Heavy;
|
||||
if (value == "Amphibious") return DriveType::Amphibious;
|
||||
if (value == "Other" ) return DriveType::Other;
|
||||
return static_cast<DriveType>(Cast<int>(value, "drive"));
|
||||
}
|
||||
|
||||
|
@ -909,6 +921,7 @@ int CLevelParserParam::ToResearchFlag(std::string value)
|
|||
if (value == "SUBBER" ) return RESEARCH_SUBM;
|
||||
if (value == "SNIFFER" ) return RESEARCH_SNIFFER;
|
||||
if (value == "BUILDER" ) return RESEARCH_BUILDER;
|
||||
if (value == "TARGET" ) return RESEARCH_TARGET;
|
||||
return Cast<int>(value, "researchflag");
|
||||
}
|
||||
|
||||
|
|
|
@ -39,5 +39,6 @@ enum ResearchType
|
|||
RESEARCH_RECYCLER = (1<<10), //! < recycler
|
||||
RESEARCH_SUBM = (1<<11), //! < submarine
|
||||
RESEARCH_SNIFFER = (1<<12), //! < sniffer
|
||||
RESEARCH_BUILDER = (1<<13) //! < builder
|
||||
RESEARCH_BUILDER = (1<<13), //! < builder
|
||||
RESEARCH_TARGET = (1<<14) //! < target bot
|
||||
};
|
||||
|
|
|
@ -1839,6 +1839,8 @@ void CRobotMain::SelectOneObject(CObject* obj, bool displayError)
|
|||
type == OBJECT_MOBILEtt ||
|
||||
type == OBJECT_MOBILEwt ||
|
||||
type == OBJECT_MOBILEit ||
|
||||
type == OBJECT_MOBILErp ||
|
||||
type == OBJECT_MOBILEst ||
|
||||
type == OBJECT_MOBILEdr ||
|
||||
type == OBJECT_APOLLO2 )
|
||||
{
|
||||
|
@ -2225,6 +2227,8 @@ void CRobotMain::ChangeCamera()
|
|||
oType != OBJECT_MOBILEtt &&
|
||||
oType != OBJECT_MOBILEwt &&
|
||||
oType != OBJECT_MOBILEit &&
|
||||
oType != OBJECT_MOBILErp &&
|
||||
oType != OBJECT_MOBILEst &&
|
||||
oType != OBJECT_MOBILEdr &&
|
||||
oType != OBJECT_APOLLO2 ) return;
|
||||
|
||||
|
@ -3919,6 +3923,7 @@ void CRobotMain::ChangeColor()
|
|||
m_engine->ChangeTextureColor("textures/objects/lemt.png"+teamStr, "textures/objects/lemt.png", COLOR_REF_BOT, newColor, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, nullptr, 0, true);
|
||||
m_engine->ChangeTextureColor("textures/objects/roller.png"+teamStr, "textures/objects/roller.png", COLOR_REF_BOT, newColor, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, nullptr, 0, true);
|
||||
m_engine->ChangeTextureColor("textures/objects/search.png"+teamStr, "textures/objects/search.png", COLOR_REF_BOT, newColor, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, nullptr, 0, true);
|
||||
m_engine->ChangeTextureColor("textures/objects/rollert.png"+teamStr, "textures/objects/rollert.png", COLOR_REF_BOT, newColor, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, nullptr, 0, true);
|
||||
|
||||
exclu[0] = Math::Point( 0.0f/256.0f, 160.0f/256.0f);
|
||||
exclu[1] = Math::Point(256.0f/256.0f, 256.0f/256.0f); // pencils
|
||||
|
@ -5734,13 +5739,15 @@ Error CRobotMain::CanFactoryError(ObjectType type, int team)
|
|||
if (drive == DriveType::Tracked && !IsResearchDone(RESEARCH_TANK, team)) return ERR_BUILD_RESEARCH;
|
||||
if (drive == DriveType::Winged && !IsResearchDone(RESEARCH_FLY, team)) return ERR_BUILD_RESEARCH;
|
||||
if (drive == DriveType::Legged && !IsResearchDone(RESEARCH_iPAW, team)) return ERR_BUILD_RESEARCH;
|
||||
if (drive == DriveType::BigTracked && !IsResearchDone(RESEARCH_TANK, team)) return ERR_BUILD_RESEARCH; // NOTE: Subber is not BigTracked! It currently counts as Other
|
||||
if (drive == DriveType::Heavy && !IsResearchDone(RESEARCH_TANK, team)) return ERR_BUILD_RESEARCH;
|
||||
|
||||
if (type == OBJECT_MOBILErt && !IsResearchDone(RESEARCH_THUMP, team)) return ERR_BUILD_RESEARCH;
|
||||
if (type == OBJECT_MOBILErc && !IsResearchDone(RESEARCH_PHAZER, team)) return ERR_BUILD_RESEARCH;
|
||||
if (type == OBJECT_MOBILErr && !IsResearchDone(RESEARCH_RECYCLER, team)) return ERR_BUILD_RESEARCH;
|
||||
if (type == OBJECT_MOBILErs && !IsResearchDone(RESEARCH_SHIELD, team)) return ERR_BUILD_RESEARCH;
|
||||
if (type == OBJECT_MOBILEsa && !IsResearchDone(RESEARCH_SUBM, team)) return ERR_BUILD_DISABLED; // Can be only researched manually in Scene file
|
||||
if (type == OBJECT_MOBILEst && !IsResearchDone(RESEARCH_SUBM, team)) return ERR_BUILD_DISABLED;
|
||||
if (type == OBJECT_MOBILEtg && !IsResearchDone(RESEARCH_TARGET, team)) return ERR_BUILD_RESEARCH;
|
||||
|
||||
return ERR_OK;
|
||||
}
|
||||
|
|
|
@ -1187,25 +1187,27 @@ bool CAutoBase::CreateInterface(bool bSelect)
|
|||
oy = 3.0f/480.0f;
|
||||
sx = 33.0f/640.0f;
|
||||
sy = 33.0f/480.0f;
|
||||
|
||||
ddim.x = dim.x*1.5f;
|
||||
ddim.y = dim.y*1.5f;
|
||||
|
||||
//? pos.x = ox+sx*7.25f;
|
||||
//? pos.y = oy+sy*0.25f;
|
||||
//? pw->CreateButton(pos, ddim, 63, EVENT_OBJECT_BHELP);
|
||||
|
||||
pos.x = ox+sx*8.00f;
|
||||
pos.y = oy+sy*0.25f;
|
||||
pw->CreateButton(pos, ddim, 28, EVENT_OBJECT_BTAKEOFF);
|
||||
|
||||
if ( m_lightning->GetStatus(sleep, delay, magnetic, progress) )
|
||||
if( !m_object->GetTrainer() )
|
||||
{
|
||||
pos.x = ox+sx*10.2f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
ddim.x = dim.x*1.0f;
|
||||
ddim.y = dim.y*1.0f;
|
||||
pw->CreateButton(pos, ddim, 41, EVENT_OBJECT_LIMIT);
|
||||
ddim.x = dim.x*1.5f;
|
||||
ddim.y = dim.y*1.5f;
|
||||
|
||||
//? pos.x = ox+sx*7.25f;
|
||||
//? pos.y = oy+sy*0.25f;
|
||||
//? pw->CreateButton(pos, ddim, 63, EVENT_OBJECT_BHELP);
|
||||
|
||||
pos.x = ox+sx*8.00f;
|
||||
pos.y = oy+sy*0.25f;
|
||||
pw->CreateButton(pos, ddim, 28, EVENT_OBJECT_BTAKEOFF);
|
||||
|
||||
if ( m_lightning->GetStatus(sleep, delay, magnetic, progress) )
|
||||
{
|
||||
pos.x = ox+sx*10.2f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
ddim.x = dim.x*1.0f;
|
||||
ddim.y = dim.y*1.0f;
|
||||
pw->CreateButton(pos, ddim, 41, EVENT_OBJECT_LIMIT);
|
||||
}
|
||||
}
|
||||
|
||||
pos.x = ox+sx*0.0f;
|
||||
|
|
|
@ -195,6 +195,7 @@ ObjectType ObjectTypeFromFactoryButton(EventType eventType)
|
|||
if ( eventType == EVENT_OBJECT_FACTORYrr ) return OBJECT_MOBILErr;
|
||||
if ( eventType == EVENT_OBJECT_FACTORYrs ) return OBJECT_MOBILErs;
|
||||
if ( eventType == EVENT_OBJECT_FACTORYsa ) return OBJECT_MOBILEsa;
|
||||
if ( eventType == EVENT_OBJECT_FACTORYtg ) return OBJECT_MOBILEtg;
|
||||
|
||||
return OBJECT_NULL;
|
||||
}
|
||||
|
@ -617,6 +618,8 @@ bool CAutoFactory::NearestVehicle()
|
|||
type != OBJECT_MOBILEtt &&
|
||||
type != OBJECT_MOBILEwt &&
|
||||
type != OBJECT_MOBILEit &&
|
||||
type != OBJECT_MOBILErp &&
|
||||
type != OBJECT_MOBILEst &&
|
||||
type != OBJECT_MOBILEdr &&
|
||||
type != OBJECT_MOTHER &&
|
||||
type != OBJECT_ANT &&
|
||||
|
@ -661,6 +664,7 @@ bool CAutoFactory::CreateVehicle()
|
|||
params.angle = angle;
|
||||
params.type = m_type;
|
||||
params.team = m_object->GetTeam();
|
||||
params.trainer = m_object->GetTrainer();
|
||||
CObject* vehicle = CObjectManager::GetInstancePointer()->CreateObject(params);
|
||||
|
||||
vehicle->SetLock(true); // not usable
|
||||
|
@ -726,76 +730,80 @@ bool CAutoFactory::CreateInterface(bool bSelect)
|
|||
oy = 3.0f/480.0f;
|
||||
sx = 33.0f/640.0f;
|
||||
sy = 33.0f/480.0f;
|
||||
if( !m_object->GetTrainer() )
|
||||
{
|
||||
pos.x = 0.0f;
|
||||
pos.y = oy+sy*2.6f;
|
||||
ddim.x = 138.0f/640.0f;
|
||||
ddim.y = 258.0f/480.0f;
|
||||
pw->CreateGroup(pos, ddim, 6, EVENT_WINDOW3);
|
||||
|
||||
pos.x = 0.0f;
|
||||
pos.y = oy+sy*2.6f;
|
||||
ddim.x = 138.0f/640.0f;
|
||||
ddim.y = 258.0f/480.0f;
|
||||
pw->CreateGroup(pos, ddim, 6, EVENT_WINDOW3);
|
||||
pos.x = ox+sx*0.0f;
|
||||
pos.y = oy+sy*9.3f;
|
||||
pw->CreateButton(pos, dim, 128+9, EVENT_OBJECT_FACTORYwa);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+10, EVENT_OBJECT_FACTORYta);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+11, EVENT_OBJECT_FACTORYfa);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+22, EVENT_OBJECT_FACTORYia);
|
||||
|
||||
pos.x = ox+sx*0.0f;
|
||||
pos.y = oy+sy*9.3f;
|
||||
pw->CreateButton(pos, dim, 128+9, EVENT_OBJECT_FACTORYwa);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+10, EVENT_OBJECT_FACTORYta);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+11, EVENT_OBJECT_FACTORYfa);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+22, EVENT_OBJECT_FACTORYia);
|
||||
pos.x = ox+sx*0.0f;
|
||||
pos.y = oy+sy*8.2f;
|
||||
pw->CreateButton(pos, dim, 128+12, EVENT_OBJECT_FACTORYws);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+13, EVENT_OBJECT_FACTORYts);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+14, EVENT_OBJECT_FACTORYfs);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+24, EVENT_OBJECT_FACTORYis);
|
||||
|
||||
pos.x = ox+sx*0.0f;
|
||||
pos.y = oy+sy*8.2f;
|
||||
pw->CreateButton(pos, dim, 128+12, EVENT_OBJECT_FACTORYws);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+13, EVENT_OBJECT_FACTORYts);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+14, EVENT_OBJECT_FACTORYfs);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+24, EVENT_OBJECT_FACTORYis);
|
||||
pos.x = ox+sx*0.0f;
|
||||
pos.y = oy+sy*7.1f;
|
||||
pw->CreateButton(pos, dim, 128+15, EVENT_OBJECT_FACTORYwc);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+16, EVENT_OBJECT_FACTORYtc);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+17, EVENT_OBJECT_FACTORYfc);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+23, EVENT_OBJECT_FACTORYic);
|
||||
|
||||
pos.x = ox+sx*0.0f;
|
||||
pos.y = oy+sy*7.1f;
|
||||
pw->CreateButton(pos, dim, 128+15, EVENT_OBJECT_FACTORYwc);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+16, EVENT_OBJECT_FACTORYtc);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+17, EVENT_OBJECT_FACTORYfc);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+23, EVENT_OBJECT_FACTORYic);
|
||||
pos.x = ox+sx*0.0f;
|
||||
pos.y = oy+sy*6.0f;
|
||||
pw->CreateButton(pos, dim, 128+25, EVENT_OBJECT_FACTORYwi);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+26, EVENT_OBJECT_FACTORYti);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+27, EVENT_OBJECT_FACTORYfi);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+28, EVENT_OBJECT_FACTORYii);
|
||||
|
||||
pos.x = ox+sx*0.0f;
|
||||
pos.y = oy+sy*6.0f;
|
||||
pw->CreateButton(pos, dim, 128+25, EVENT_OBJECT_FACTORYwi);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+26, EVENT_OBJECT_FACTORYti);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+27, EVENT_OBJECT_FACTORYfi);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+28, EVENT_OBJECT_FACTORYii);
|
||||
pos.x = ox+sx*0.0f;
|
||||
pos.y = oy+sy*4.9f;
|
||||
pw->CreateButton(pos, dim, 192+0, EVENT_OBJECT_FACTORYwb);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 192+1, EVENT_OBJECT_FACTORYtb);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 192+2, EVENT_OBJECT_FACTORYfb);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 192+3, EVENT_OBJECT_FACTORYib);
|
||||
|
||||
pos.x = ox+sx*0.0f;
|
||||
pos.y = oy+sy*4.9f;
|
||||
pw->CreateButton(pos, dim, 192+0, EVENT_OBJECT_FACTORYwb);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 192+1, EVENT_OBJECT_FACTORYtb);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 192+2, EVENT_OBJECT_FACTORYfb);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 192+3, EVENT_OBJECT_FACTORYib);
|
||||
pos.x = ox+sx*0.0f;
|
||||
pos.y = oy+sy*3.8f;
|
||||
pw->CreateButton(pos, dim, 128+18, EVENT_OBJECT_FACTORYrt);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+19, EVENT_OBJECT_FACTORYrc);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+20, EVENT_OBJECT_FACTORYrr);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+29, EVENT_OBJECT_FACTORYrs);
|
||||
|
||||
pos.x = ox+sx*0.0f;
|
||||
pos.y = oy+sy*3.8f;
|
||||
pw->CreateButton(pos, dim, 128+18, EVENT_OBJECT_FACTORYrt);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+19, EVENT_OBJECT_FACTORYrc);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+20, EVENT_OBJECT_FACTORYrr);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+29, EVENT_OBJECT_FACTORYrs);
|
||||
|
||||
pos.x = ox+sx*0.0f;
|
||||
pos.y = oy+sy*2.7f;
|
||||
pw->CreateButton(pos, dim, 128+21, EVENT_OBJECT_FACTORYsa);
|
||||
pos.x = ox+sx*0.0f;
|
||||
pos.y = oy+sy*2.7f;
|
||||
pw->CreateButton(pos, dim, 128+21, EVENT_OBJECT_FACTORYsa);
|
||||
pos.x += dim.x;
|
||||
pw->CreateButton(pos, dim, 128+45, EVENT_OBJECT_FACTORYtg);
|
||||
}
|
||||
|
||||
pos.x = ox+sx*0.0f;
|
||||
pos.y = oy+sy*0;
|
||||
|
@ -844,6 +852,7 @@ void CAutoFactory::UpdateInterface()
|
|||
UpdateButton(pw, EVENT_OBJECT_FACTORYrr, m_bBusy);
|
||||
UpdateButton(pw, EVENT_OBJECT_FACTORYrs, m_bBusy);
|
||||
UpdateButton(pw, EVENT_OBJECT_FACTORYsa, m_bBusy);
|
||||
UpdateButton(pw, EVENT_OBJECT_FACTORYtg, m_bBusy);
|
||||
}
|
||||
|
||||
// Updates the status of one interface button.
|
||||
|
|
|
@ -136,7 +136,11 @@ Error CAutoLabo::StartAction(int param)
|
|||
{
|
||||
return ERR_LABO_NULL;
|
||||
}
|
||||
if ( power->GetType() != OBJECT_BULLET )
|
||||
if ( m_research != RESEARCH_TARGET && power->GetType() != OBJECT_BULLET )
|
||||
{
|
||||
return ERR_LABO_BAD;
|
||||
}
|
||||
if ( m_research == RESEARCH_TARGET && power->GetType() != OBJECT_TNT )
|
||||
{
|
||||
return ERR_LABO_BAD;
|
||||
}
|
||||
|
@ -177,6 +181,7 @@ bool CAutoLabo::EventProcess(const Event &event)
|
|||
if ( m_object->GetSelect() ) // center selected?
|
||||
{
|
||||
Error err = ERR_UNKNOWN;
|
||||
if ( event.type == EVENT_OBJECT_RTARGET ) err = StartAction(RESEARCH_TARGET);
|
||||
if ( event.type == EVENT_OBJECT_RiPAW ) err = StartAction(RESEARCH_iPAW);
|
||||
if ( event.type == EVENT_OBJECT_RiGUN ) err = StartAction(RESEARCH_iGUN);
|
||||
|
||||
|
@ -455,7 +460,7 @@ Error CAutoLabo::GetError()
|
|||
CObject* obj = m_object->GetPower();
|
||||
if (obj == nullptr) return ERR_LABO_NULL;
|
||||
ObjectType type = obj->GetType();
|
||||
if ( type != OBJECT_BULLET ) return ERR_LABO_BAD;
|
||||
if ( type != OBJECT_BULLET && type != OBJECT_TNT ) return ERR_LABO_BAD;
|
||||
|
||||
return ERR_OK;
|
||||
}
|
||||
|
@ -482,14 +487,20 @@ bool CAutoLabo::CreateInterface(bool bSelect)
|
|||
oy = 3.0f/480.0f;
|
||||
sx = 33.0f/640.0f;
|
||||
sy = 33.0f/480.0f;
|
||||
if( !m_object->GetTrainer() )
|
||||
{
|
||||
pos.x = ox+sx*6.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 192+8, EVENT_OBJECT_RTARGET);
|
||||
|
||||
pos.x = ox+sx*7.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 64+45, EVENT_OBJECT_RiPAW);
|
||||
pos.x = ox+sx*7.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 64+45, EVENT_OBJECT_RiPAW);
|
||||
|
||||
pos.x = ox+sx*8.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 64+46, EVENT_OBJECT_RiGUN);
|
||||
pos.x = ox+sx*8.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 64+46, EVENT_OBJECT_RiGUN);
|
||||
}
|
||||
|
||||
pos.x = ox+sx*0.0f;
|
||||
pos.y = oy+sy*0;
|
||||
|
@ -515,14 +526,17 @@ void CAutoLabo::UpdateInterface()
|
|||
pw = static_cast< Ui::CWindow* >(m_interface->SearchControl(EVENT_WINDOW0));
|
||||
if ( pw == nullptr ) return;
|
||||
|
||||
DeadInterface(pw, EVENT_OBJECT_RiPAW, m_main->IsResearchEnabled(RESEARCH_iPAW));
|
||||
DeadInterface(pw, EVENT_OBJECT_RiGUN, m_main->IsResearchEnabled(RESEARCH_iGUN));
|
||||
DeadInterface(pw, EVENT_OBJECT_RTARGET, m_main->IsResearchEnabled(RESEARCH_TARGET));
|
||||
DeadInterface(pw, EVENT_OBJECT_RiPAW, m_main->IsResearchEnabled(RESEARCH_iPAW));
|
||||
DeadInterface(pw, EVENT_OBJECT_RiGUN, m_main->IsResearchEnabled(RESEARCH_iGUN));
|
||||
|
||||
OkayButton(pw, EVENT_OBJECT_RTARGET);
|
||||
OkayButton(pw, EVENT_OBJECT_RiPAW);
|
||||
OkayButton(pw, EVENT_OBJECT_RiGUN);
|
||||
|
||||
VisibleInterface(pw, EVENT_OBJECT_RiPAW, !m_bBusy);
|
||||
VisibleInterface(pw, EVENT_OBJECT_RiGUN, !m_bBusy);
|
||||
VisibleInterface(pw, EVENT_OBJECT_RTARGET, !m_bBusy);
|
||||
VisibleInterface(pw, EVENT_OBJECT_RiPAW, !m_bBusy);
|
||||
VisibleInterface(pw, EVENT_OBJECT_RiGUN, !m_bBusy);
|
||||
}
|
||||
|
||||
// Indicates the research conducted for a button.
|
||||
|
@ -542,8 +556,9 @@ void CAutoLabo::OkayButton(Ui::CWindow *pw, EventType event)
|
|||
|
||||
bool CAutoLabo::TestResearch(EventType event)
|
||||
{
|
||||
if ( event == EVENT_OBJECT_RiPAW ) return m_main->IsResearchDone(RESEARCH_iPAW, m_object->GetTeam());
|
||||
if ( event == EVENT_OBJECT_RiGUN ) return m_main->IsResearchDone(RESEARCH_iGUN, m_object->GetTeam());
|
||||
if ( event == EVENT_OBJECT_RTARGET ) return m_main->IsResearchDone(RESEARCH_TARGET, m_object->GetTeam());
|
||||
if ( event == EVENT_OBJECT_RiPAW ) return m_main->IsResearchDone(RESEARCH_iPAW, m_object->GetTeam());
|
||||
if ( event == EVENT_OBJECT_RiGUN ) return m_main->IsResearchDone(RESEARCH_iGUN, m_object->GetTeam());
|
||||
|
||||
return m_main;
|
||||
}
|
||||
|
|
|
@ -262,6 +262,8 @@ bool CAutoMush::SearchTarget()
|
|||
type != OBJECT_MOBILEtt &&
|
||||
type != OBJECT_MOBILEwt &&
|
||||
type != OBJECT_MOBILEit &&
|
||||
type != OBJECT_MOBILErp &&
|
||||
type != OBJECT_MOBILEst &&
|
||||
type != OBJECT_MOBILEdr &&
|
||||
type != OBJECT_DERRICK &&
|
||||
type != OBJECT_STATION &&
|
||||
|
|
|
@ -371,6 +371,8 @@ bool CAutoNuclearPlant::SearchVehicle()
|
|||
type != OBJECT_MOBILEtt &&
|
||||
type != OBJECT_MOBILEwt &&
|
||||
type != OBJECT_MOBILEit &&
|
||||
type != OBJECT_MOBILErp &&
|
||||
type != OBJECT_MOBILEst &&
|
||||
type != OBJECT_MOBILEdr &&
|
||||
type != OBJECT_MOTHER &&
|
||||
type != OBJECT_ANT &&
|
||||
|
|
|
@ -434,6 +434,8 @@ bool CAutoPowerPlant::SearchVehicle()
|
|||
type != OBJECT_MOBILEtt &&
|
||||
type != OBJECT_MOBILEwt &&
|
||||
type != OBJECT_MOBILEit &&
|
||||
type != OBJECT_MOBILErp &&
|
||||
type != OBJECT_MOBILEst &&
|
||||
type != OBJECT_MOBILEdr &&
|
||||
type != OBJECT_MOTHER &&
|
||||
type != OBJECT_ANT &&
|
||||
|
|
|
@ -278,6 +278,9 @@ CObject* CAutoPowerStation::SearchVehicle()
|
|||
type != OBJECT_MOBILEtt &&
|
||||
type != OBJECT_MOBILEwt &&
|
||||
type != OBJECT_MOBILEit &&
|
||||
type != OBJECT_MOBILErp &&
|
||||
type != OBJECT_MOBILEst &&
|
||||
type != OBJECT_MOBILEtg &&
|
||||
type != OBJECT_MOBILEdr ) continue;
|
||||
|
||||
Math::Vector oPos = obj->GetPosition();
|
||||
|
|
|
@ -341,42 +341,44 @@ bool CAutoResearch::CreateInterface(bool bSelect)
|
|||
oy = 3.0f/480.0f;
|
||||
sx = 33.0f/640.0f;
|
||||
sy = 33.0f/480.0f;
|
||||
if( !m_object->GetTrainer() )
|
||||
{
|
||||
pos.x = ox+sx*3.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 64+0, EVENT_OBJECT_RTANK);
|
||||
|
||||
pos.x = ox+sx*3.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 64+0, EVENT_OBJECT_RTANK);
|
||||
pos.x = ox+sx*4.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 64+1, EVENT_OBJECT_RFLY);
|
||||
|
||||
pos.x = ox+sx*4.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 64+1, EVENT_OBJECT_RFLY);
|
||||
pos.x = ox+sx*5.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 64+3, EVENT_OBJECT_RCANON);
|
||||
|
||||
pos.x = ox+sx*5.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 64+3, EVENT_OBJECT_RCANON);
|
||||
pos.x = ox+sx*6.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 64+4, EVENT_OBJECT_RTOWER);
|
||||
|
||||
pos.x = ox+sx*6.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 64+4, EVENT_OBJECT_RTOWER);
|
||||
pos.x = ox+sx*7.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 64+7, EVENT_OBJECT_RATOMIC);
|
||||
|
||||
pos.x = ox+sx*7.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 64+7, EVENT_OBJECT_RATOMIC);
|
||||
pos.x = ox+sx*8.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 64+2, EVENT_OBJECT_RTHUMP);
|
||||
|
||||
pos.x = ox+sx*8.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 64+2, EVENT_OBJECT_RTHUMP);
|
||||
pos.x = ox+sx*9.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 64+6, EVENT_OBJECT_RSHIELD);
|
||||
|
||||
pos.x = ox+sx*9.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 64+6, EVENT_OBJECT_RSHIELD);
|
||||
pos.x = ox+sx*10.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 64+5, EVENT_OBJECT_RPHAZER);
|
||||
|
||||
pos.x = ox+sx*10.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 64+5, EVENT_OBJECT_RPHAZER);
|
||||
|
||||
pos.x = ox+sx*11.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 192+4, EVENT_OBJECT_RBUILDER);
|
||||
pos.x = ox+sx*11.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 192+4, EVENT_OBJECT_RBUILDER);
|
||||
}
|
||||
|
||||
pos.x = ox+sx*14.5f;
|
||||
pos.y = oy+sy*0;
|
||||
|
|
|
@ -55,12 +55,15 @@ DriveType GetDriveFromObject(ObjectType type)
|
|||
case OBJECT_MOBILEib:
|
||||
return DriveType::Legged;
|
||||
|
||||
case OBJECT_MOBILErp:
|
||||
case OBJECT_MOBILErt:
|
||||
case OBJECT_MOBILErc:
|
||||
case OBJECT_MOBILErr:
|
||||
case OBJECT_MOBILErs:
|
||||
// NOTE: Subber is not BigTracked!
|
||||
return DriveType::BigTracked;
|
||||
return DriveType::Heavy;
|
||||
|
||||
case OBJECT_MOBILEsa:
|
||||
return DriveType::Amphibious;
|
||||
|
||||
default:
|
||||
return DriveType::Other;
|
||||
|
|
|
@ -28,7 +28,8 @@ enum class DriveType : unsigned int
|
|||
Tracked,
|
||||
Winged,
|
||||
Legged,
|
||||
BigTracked,
|
||||
Heavy,
|
||||
Amphibious
|
||||
};
|
||||
|
||||
DriveType GetDriveFromObject(ObjectType type);
|
||||
|
|
|
@ -360,6 +360,9 @@ bool CMotionToto::EventFrame(const Event &event)
|
|||
type == OBJECT_MOBILEtt ||
|
||||
type == OBJECT_MOBILEft ||
|
||||
type == OBJECT_MOBILEit ||
|
||||
type == OBJECT_MOBILErp ||
|
||||
type == OBJECT_MOBILEst ||
|
||||
type == OBJECT_MOBILEtg ||
|
||||
type == OBJECT_MOBILEdr ) ) // vehicle?
|
||||
{
|
||||
m_clownTime += event.rTime;
|
||||
|
|
|
@ -100,13 +100,49 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type,
|
|||
m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICLE); // this is a moving object
|
||||
m_object->SetObjectRank(0, rank);
|
||||
|
||||
if ((m_object->GetTrainer() && type == OBJECT_MOBILEsa) || type == OBJECT_MOBILEst)
|
||||
{
|
||||
modelManager->AddModelReference("trainers.mod", false, rank, m_object->GetTeam());
|
||||
}
|
||||
else if ((m_object->GetTrainer() &&
|
||||
( type == OBJECT_MOBILErt ||
|
||||
type == OBJECT_MOBILErc ||
|
||||
type == OBJECT_MOBILErr ||
|
||||
type == OBJECT_MOBILErs)) || type == OBJECT_MOBILErp)
|
||||
{
|
||||
modelManager->AddModelReference("trainerr.mod", false, rank, m_object->GetTeam());
|
||||
}
|
||||
else if (m_object->GetTrainer() ||
|
||||
type == OBJECT_MOBILEwt ||
|
||||
type == OBJECT_MOBILEtt ||
|
||||
type == OBJECT_MOBILEft ||
|
||||
type == OBJECT_MOBILEit)
|
||||
{
|
||||
modelManager->AddModelReference("trainer.mod", false, rank, m_object->GetTeam());
|
||||
}
|
||||
|
||||
if (type == OBJECT_MOBILEfa ||
|
||||
type == OBJECT_MOBILEfb ||
|
||||
type == OBJECT_MOBILEfc ||
|
||||
type == OBJECT_MOBILEfi ||
|
||||
type == OBJECT_MOBILEfs)
|
||||
{
|
||||
modelManager->AddModelReference("lem1f.mod", false, rank, m_object->GetTeam());
|
||||
if (!m_object->GetTrainer())
|
||||
modelManager->AddModelReference("lem1f.mod", false, rank, m_object->GetTeam());
|
||||
else
|
||||
{
|
||||
rank = m_engine->CreateObject();
|
||||
m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT);
|
||||
m_object->SetObjectRank(28, rank);
|
||||
m_object->SetObjectParent(28, 0);
|
||||
modelManager->AddModelReference("trainerf.mod", false, rank, m_object->GetTeam());
|
||||
|
||||
rank = m_engine->CreateObject();
|
||||
m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT);
|
||||
m_object->SetObjectRank(29, rank);
|
||||
m_object->SetObjectParent(29, 0);
|
||||
modelManager->AddModelReference("trainera.mod", false, rank, m_object->GetTeam());
|
||||
}
|
||||
}
|
||||
else if (type == OBJECT_MOBILEta ||
|
||||
type == OBJECT_MOBILEtb ||
|
||||
|
@ -114,7 +150,22 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type,
|
|||
type == OBJECT_MOBILEti ||
|
||||
type == OBJECT_MOBILEts)
|
||||
{
|
||||
modelManager->AddModelReference("lem1t.mod", false, rank, m_object->GetTeam());
|
||||
if (!m_object->GetTrainer())
|
||||
modelManager->AddModelReference("lem1t.mod", false, rank, m_object->GetTeam());
|
||||
else
|
||||
{
|
||||
rank = m_engine->CreateObject();
|
||||
m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT);
|
||||
m_object->SetObjectRank(28, rank);
|
||||
m_object->SetObjectParent(28, 0);
|
||||
modelManager->AddModelReference("trainert.mod", false, rank, m_object->GetTeam());
|
||||
|
||||
rank = m_engine->CreateObject();
|
||||
m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT);
|
||||
m_object->SetObjectRank(29, rank);
|
||||
m_object->SetObjectParent(29, 0);
|
||||
modelManager->AddModelReference("trainera.mod", false, rank, m_object->GetTeam());
|
||||
}
|
||||
}
|
||||
else if (type == OBJECT_MOBILEwa ||
|
||||
type == OBJECT_MOBILEwb ||
|
||||
|
@ -122,13 +173,21 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type,
|
|||
type == OBJECT_MOBILEwi ||
|
||||
type == OBJECT_MOBILEws)
|
||||
{
|
||||
if (m_object->GetTrainer())
|
||||
{
|
||||
modelManager->AddModelReference("lem1wt.mod", false, rank, m_object->GetTeam());
|
||||
}
|
||||
if (!m_object->GetTrainer())
|
||||
modelManager->AddModelReference("lem1w.mod", false, rank, m_object->GetTeam());
|
||||
else
|
||||
{
|
||||
modelManager->AddModelReference("lem1w.mod", false, rank, m_object->GetTeam());
|
||||
rank = m_engine->CreateObject();
|
||||
m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT);
|
||||
m_object->SetObjectRank(28, rank);
|
||||
m_object->SetObjectParent(28, 0);
|
||||
modelManager->AddModelReference("trainerw.mod", false, rank, m_object->GetTeam());
|
||||
|
||||
rank = m_engine->CreateObject();
|
||||
m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT);
|
||||
m_object->SetObjectRank(29, rank);
|
||||
m_object->SetObjectParent(29, 0);
|
||||
modelManager->AddModelReference("trainera.mod", false, rank, m_object->GetTeam());
|
||||
}
|
||||
}
|
||||
else if (type == OBJECT_MOBILEia ||
|
||||
|
@ -137,16 +196,32 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type,
|
|||
type == OBJECT_MOBILEii ||
|
||||
type == OBJECT_MOBILEis)
|
||||
{
|
||||
modelManager->AddModelReference("lem1i.mod", false, rank, m_object->GetTeam());
|
||||
if (!m_object->GetTrainer())
|
||||
modelManager->AddModelReference("lem1i.mod", false, rank, m_object->GetTeam());
|
||||
else
|
||||
{
|
||||
rank = m_engine->CreateObject();
|
||||
m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT);
|
||||
m_object->SetObjectRank(28, rank);
|
||||
m_object->SetObjectParent(28, 0);
|
||||
modelManager->AddModelReference("traineri.mod", false, rank, m_object->GetTeam());
|
||||
|
||||
rank = m_engine->CreateObject();
|
||||
m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT);
|
||||
m_object->SetObjectRank(29, rank);
|
||||
m_object->SetObjectParent(29, 0);
|
||||
modelManager->AddModelReference("trainera.mod", false, rank, m_object->GetTeam());
|
||||
}
|
||||
}
|
||||
else if (type == OBJECT_MOBILErt ||
|
||||
else if (!m_object->GetTrainer() &&
|
||||
(type == OBJECT_MOBILErt ||
|
||||
type == OBJECT_MOBILErc ||
|
||||
type == OBJECT_MOBILErr ||
|
||||
type == OBJECT_MOBILErs)
|
||||
type == OBJECT_MOBILErs))
|
||||
{
|
||||
modelManager->AddModelReference("roller1.mod", false, rank, m_object->GetTeam());
|
||||
}
|
||||
else if (type == OBJECT_MOBILEsa)
|
||||
else if (type == OBJECT_MOBILEsa && !m_object->GetTrainer())
|
||||
{
|
||||
modelManager->AddModelReference("subm1.mod", false, rank, m_object->GetTeam());
|
||||
}
|
||||
|
@ -156,18 +231,34 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type,
|
|||
}
|
||||
else if (type == OBJECT_MOBILEwt)
|
||||
{
|
||||
rank = m_engine->CreateObject();
|
||||
m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT);
|
||||
m_object->SetObjectRank(28, rank);
|
||||
m_object->SetObjectParent(28, 0);
|
||||
modelManager->AddModelReference("trainerw.mod", false, rank, m_object->GetTeam());
|
||||
}
|
||||
else if (type == OBJECT_MOBILEft)
|
||||
{
|
||||
rank = m_engine->CreateObject();
|
||||
m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT);
|
||||
m_object->SetObjectRank(28, rank);
|
||||
m_object->SetObjectParent(28, 0);
|
||||
modelManager->AddModelReference("trainerf.mod", false, rank, m_object->GetTeam());
|
||||
}
|
||||
else if (type == OBJECT_MOBILEtt)
|
||||
{
|
||||
rank = m_engine->CreateObject();
|
||||
m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT);
|
||||
m_object->SetObjectRank(28, rank);
|
||||
m_object->SetObjectParent(28, 0);
|
||||
modelManager->AddModelReference("trainert.mod", false, rank, m_object->GetTeam());
|
||||
}
|
||||
else if (type == OBJECT_MOBILEit)
|
||||
{
|
||||
rank = m_engine->CreateObject();
|
||||
m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT);
|
||||
m_object->SetObjectRank(28, rank);
|
||||
m_object->SetObjectParent(28, 0);
|
||||
modelManager->AddModelReference("traineri.mod", false, rank, m_object->GetTeam());
|
||||
}
|
||||
else if (type == OBJECT_MOBILEdr)
|
||||
|
@ -187,12 +278,14 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type,
|
|||
if (type == OBJECT_MOBILErt ||
|
||||
type == OBJECT_MOBILErc ||
|
||||
type == OBJECT_MOBILErr ||
|
||||
type == OBJECT_MOBILErs)
|
||||
type == OBJECT_MOBILErs ||
|
||||
type == OBJECT_MOBILErp)
|
||||
{
|
||||
m_object->AddCrashSphere(CrashSphere(Math::Vector(0.0f, 4.0f, 0.0f), 6.5f, SOUND_BOUMm, 0.45f));
|
||||
m_object->SetCameraCollisionSphere(Math::Sphere(Math::Vector(0.0f, 3.0f, 0.0f), 7.0f));
|
||||
}
|
||||
else if (type == OBJECT_MOBILEsa)
|
||||
else if (type == OBJECT_MOBILEsa ||
|
||||
type == OBJECT_MOBILEst)
|
||||
{
|
||||
m_object->AddCrashSphere(CrashSphere(Math::Vector(0.0f, 3.0f, 0.0f), 4.5f, SOUND_BOUMm, 0.45f));
|
||||
m_object->SetCameraCollisionSphere(Math::Sphere(Math::Vector(0.0f, 3.0f, 0.0f), 6.0f));
|
||||
|
@ -435,7 +528,8 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type,
|
|||
type == OBJECT_MOBILEtb ||
|
||||
type == OBJECT_MOBILEtc ||
|
||||
type == OBJECT_MOBILEti ||
|
||||
type == OBJECT_MOBILEts) // caterpillars?
|
||||
type == OBJECT_MOBILEts ||
|
||||
type == OBJECT_MOBILEtt) // caterpillars?
|
||||
{
|
||||
// Creates the right caterpillar.
|
||||
rank = m_engine->CreateObject();
|
||||
|
@ -443,7 +537,13 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type,
|
|||
m_object->SetObjectRank(6, rank);
|
||||
m_object->SetObjectParent(6, 0);
|
||||
modelManager->AddModelCopy("lem2t.mod", false, rank, m_object->GetTeam());
|
||||
m_object->SetPartPosition(6, Math::Vector(0.0f, 2.0f, -3.0f));
|
||||
if (m_object->GetTrainer() || type == OBJECT_MOBILEtt)
|
||||
{
|
||||
m_object->SetPartPosition(6, Math::Vector(0.0f, 2.0f, -3.55f));
|
||||
m_object->SetPartScaleZ(6, 0.725f);
|
||||
}
|
||||
else
|
||||
m_object->SetPartPosition(6, Math::Vector(0.0f, 2.0f, -3.0f));
|
||||
|
||||
// Creates the left caterpillar.
|
||||
rank = m_engine->CreateObject();
|
||||
|
@ -451,13 +551,20 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type,
|
|||
m_object->SetObjectRank(7, rank);
|
||||
m_object->SetObjectParent(7, 0);
|
||||
modelManager->AddModelCopy("lem3t.mod", false, rank, m_object->GetTeam());
|
||||
m_object->SetPartPosition(7, Math::Vector(0.0f, 2.0f, 3.0f));
|
||||
if (m_object->GetTrainer() || type == OBJECT_MOBILEtt)
|
||||
{
|
||||
m_object->SetPartPosition(7, Math::Vector(0.0f, 2.0f, 3.55f));
|
||||
m_object->SetPartScaleZ(7, 0.725f);
|
||||
}
|
||||
else
|
||||
m_object->SetPartPosition(7, Math::Vector(0.0f, 2.0f, 3.0f));
|
||||
}
|
||||
|
||||
if (type == OBJECT_MOBILErt ||
|
||||
type == OBJECT_MOBILErc ||
|
||||
type == OBJECT_MOBILErr ||
|
||||
type == OBJECT_MOBILErs) // large caterpillars?
|
||||
type == OBJECT_MOBILErs ||
|
||||
type == OBJECT_MOBILErp) // large caterpillars?
|
||||
{
|
||||
// Creates the right caterpillar.
|
||||
rank = m_engine->CreateObject();
|
||||
|
@ -476,7 +583,8 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type,
|
|||
m_object->SetPartPosition(7, Math::Vector(0.0f, 2.0f, 3.0f));
|
||||
}
|
||||
|
||||
if (type == OBJECT_MOBILEsa) // underwater caterpillars?
|
||||
if (type == OBJECT_MOBILEsa ||
|
||||
type == OBJECT_MOBILEst) // underwater caterpillars?
|
||||
{
|
||||
// Creates the right caterpillar.
|
||||
rank = m_engine->CreateObject();
|
||||
|
@ -552,7 +660,8 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type,
|
|||
type == OBJECT_MOBILEib ||
|
||||
type == OBJECT_MOBILEic ||
|
||||
type == OBJECT_MOBILEis ||
|
||||
type == OBJECT_MOBILEii) // insect legs?
|
||||
type == OBJECT_MOBILEii ||
|
||||
type == OBJECT_MOBILEit) // insect legs?
|
||||
{
|
||||
float table[] =
|
||||
{
|
||||
|
@ -749,6 +858,15 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type,
|
|||
m_object->SetObjectParent(3, 1);
|
||||
modelManager->AddModelReference("subm3.mod", true, rank, m_object->GetTeam());
|
||||
m_object->SetPartPosition(3, Math::Vector(0.5f, 0.0f, 1.5f));
|
||||
|
||||
if (m_object->GetTrainer())
|
||||
{
|
||||
rank = m_engine->CreateObject();
|
||||
m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT);
|
||||
m_object->SetObjectRank(4, rank);
|
||||
m_object->SetObjectParent(4, 0);
|
||||
modelManager->AddModelReference("trainerg.mod", true, rank, m_object->GetTeam());
|
||||
}
|
||||
}
|
||||
|
||||
if (type == OBJECT_MOBILEdr)
|
||||
|
@ -886,7 +1004,8 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type,
|
|||
if (type == OBJECT_MOBILErt ||
|
||||
type == OBJECT_MOBILErc ||
|
||||
type == OBJECT_MOBILErr ||
|
||||
type == OBJECT_MOBILErs)
|
||||
type == OBJECT_MOBILErs ||
|
||||
type == OBJECT_MOBILErp)
|
||||
{
|
||||
m_object->CreateShadowCircle(6.0f, 1.0f);
|
||||
}
|
||||
|
@ -895,7 +1014,9 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type,
|
|||
type == OBJECT_MOBILEtc ||
|
||||
type == OBJECT_MOBILEti ||
|
||||
type == OBJECT_MOBILEts ||
|
||||
type == OBJECT_MOBILEsa)
|
||||
type == OBJECT_MOBILEtt ||
|
||||
type == OBJECT_MOBILEsa ||
|
||||
type == OBJECT_MOBILEst)
|
||||
{
|
||||
m_object->CreateShadowCircle(5.0f, 1.0f);
|
||||
}
|
||||
|
@ -1034,7 +1155,8 @@ void CMotionVehicle::CreatePhysics(ObjectType type)
|
|||
type == OBJECT_MOBILEtb ||
|
||||
type == OBJECT_MOBILEtc ||
|
||||
type == OBJECT_MOBILEti ||
|
||||
type == OBJECT_MOBILEts ) // caterpillars?
|
||||
type == OBJECT_MOBILEts ||
|
||||
type == OBJECT_MOBILEtt ) // caterpillars?
|
||||
{
|
||||
character->wheelFront = 4.0f;
|
||||
character->wheelBack = 4.0f;
|
||||
|
@ -1064,7 +1186,8 @@ void CMotionVehicle::CreatePhysics(ObjectType type)
|
|||
type == OBJECT_MOBILEib ||
|
||||
type == OBJECT_MOBILEic ||
|
||||
type == OBJECT_MOBILEii ||
|
||||
type == OBJECT_MOBILEis ) // legs?
|
||||
type == OBJECT_MOBILEis ||
|
||||
type == OBJECT_MOBILEit) // legs?
|
||||
{
|
||||
character->wheelFront = 4.0f;
|
||||
character->wheelBack = 4.0f;
|
||||
|
@ -1130,7 +1253,8 @@ void CMotionVehicle::CreatePhysics(ObjectType type)
|
|||
if ( type == OBJECT_MOBILErt ||
|
||||
type == OBJECT_MOBILErc ||
|
||||
type == OBJECT_MOBILErr ||
|
||||
type == OBJECT_MOBILErs ) // large caterpillars?
|
||||
type == OBJECT_MOBILErs ||
|
||||
type == OBJECT_MOBILErp) // large caterpillars?
|
||||
{
|
||||
character->wheelFront = 5.0f;
|
||||
character->wheelBack = 5.0f;
|
||||
|
@ -1156,7 +1280,8 @@ void CMotionVehicle::CreatePhysics(ObjectType type)
|
|||
m_physics->SetCirMotionY(MO_STOACCEL, 4.0f);
|
||||
}
|
||||
|
||||
if ( type == OBJECT_MOBILEsa )
|
||||
if ( type == OBJECT_MOBILEsa ||
|
||||
type == OBJECT_MOBILEst )
|
||||
{
|
||||
character->wheelFront = 4.0f;
|
||||
character->wheelBack = 4.0f;
|
||||
|
@ -1441,11 +1566,14 @@ bool CMotionVehicle::EventFrame(const Event &event)
|
|||
type == OBJECT_MOBILEtc ||
|
||||
type == OBJECT_MOBILEti ||
|
||||
type == OBJECT_MOBILEts ||
|
||||
type == OBJECT_MOBILEtt ||
|
||||
type == OBJECT_MOBILErt ||
|
||||
type == OBJECT_MOBILErc ||
|
||||
type == OBJECT_MOBILErr ||
|
||||
type == OBJECT_MOBILErs ||
|
||||
type == OBJECT_MOBILErp ||
|
||||
type == OBJECT_MOBILEsa ||
|
||||
type == OBJECT_MOBILEst ||
|
||||
type == OBJECT_MOBILEdr ) // caterpillars?
|
||||
{
|
||||
s = m_physics->GetLinMotionX(MO_MOTSPEED)*0.7f;
|
||||
|
@ -1471,12 +1599,14 @@ bool CMotionVehicle::EventFrame(const Event &event)
|
|||
if ( type == OBJECT_MOBILEta ||
|
||||
type == OBJECT_MOBILEtc ||
|
||||
type == OBJECT_MOBILEti ||
|
||||
type == OBJECT_MOBILEts )
|
||||
type == OBJECT_MOBILEts ||
|
||||
type == OBJECT_MOBILEtt )
|
||||
{
|
||||
limit[0] = 8.0f*Math::PI/180.0f;
|
||||
limit[1] = -12.0f*Math::PI/180.0f;
|
||||
}
|
||||
else if ( type == OBJECT_MOBILEsa )
|
||||
else if ( type == OBJECT_MOBILEsa ||
|
||||
type == OBJECT_MOBILEst )
|
||||
{
|
||||
limit[0] = 15.0f*Math::PI/180.0f;
|
||||
limit[1] = -15.0f*Math::PI/180.0f;
|
||||
|
@ -1569,7 +1699,8 @@ bool CMotionVehicle::EventFrame(const Event &event)
|
|||
type == OBJECT_MOBILEib ||
|
||||
type == OBJECT_MOBILEic ||
|
||||
type == OBJECT_MOBILEii ||
|
||||
type == OBJECT_MOBILEis ) // legs?
|
||||
type == OBJECT_MOBILEis ||
|
||||
type == OBJECT_MOBILEit ) // legs?
|
||||
{
|
||||
EventFrameInsect(event);
|
||||
}
|
||||
|
|
|
@ -309,6 +309,8 @@ CObjectUPtr CObjectFactory::CreateObject(const ObjectCreateParams& params)
|
|||
case OBJECT_MOBILEtt:
|
||||
case OBJECT_MOBILEwt:
|
||||
case OBJECT_MOBILEit:
|
||||
case OBJECT_MOBILErp:
|
||||
case OBJECT_MOBILEst:
|
||||
case OBJECT_MOBILEdr:
|
||||
case OBJECT_APOLLO2:
|
||||
case OBJECT_CONTROLLER:
|
||||
|
|
|
@ -101,10 +101,12 @@ enum ObjectType
|
|||
OBJECT_TREE3 = 93, //!< Tree3
|
||||
OBJECT_TREE4 = 94, //!< Tree4
|
||||
OBJECT_TREE5 = 95, //!< Tree5
|
||||
OBJECT_MOBILEwt = 100, //!< PracticeBot
|
||||
OBJECT_MOBILEtt = 101, //!< track-trainer (unused)
|
||||
OBJECT_MOBILEft = 102, //!< fly-trainer (unused)
|
||||
OBJECT_MOBILEit = 103, //!< insect-trainer (unused)
|
||||
OBJECT_MOBILEwt = 100, //!< WheeledTrainer (PracticeBot)
|
||||
OBJECT_MOBILEtt = 101, //!< TrackedTrainer
|
||||
OBJECT_MOBILEft = 102, //!< WingedTrainer
|
||||
OBJECT_MOBILEit = 103, //!< LeggedTrainer
|
||||
OBJECT_MOBILErp = 104, //!< HeavyTrainer
|
||||
OBJECT_MOBILEst = 105, //!< AmphibiousTrainer
|
||||
OBJECT_MOBILEwa = 110, //!< WheeledGrabber
|
||||
OBJECT_MOBILEta = 111, //!< TrackedGrabber
|
||||
OBJECT_MOBILEfa = 112, //!< WingedGrabber
|
||||
|
@ -133,6 +135,7 @@ enum ObjectType
|
|||
OBJECT_MOBILEtb = 221, //!< TrackedBuilder
|
||||
OBJECT_MOBILEfb = 222, //!< WingedBuilder
|
||||
OBJECT_MOBILEib = 223, //!< LeggedBuilder
|
||||
OBJECT_MOBILEpr = 224, //!< PracticeBot (alias)
|
||||
OBJECT_WAYPOINT = 250, //!< WayPoint
|
||||
OBJECT_FLAGb = 260, //!< BlueFlag
|
||||
OBJECT_FLAGr = 261, //!< RedFlag
|
||||
|
|
|
@ -356,7 +356,18 @@ bool COldObject::DamageObject(DamageType type, float force, CObject* killer)
|
|||
}
|
||||
else if ( Implements(ObjectInterfaceType::Fragile) )
|
||||
{
|
||||
if ( m_type == OBJECT_BOMB && type != DamageType::Explosive ) return false; // Mine can't be destroyed by shooting
|
||||
if ((m_type == OBJECT_BOMB ||
|
||||
m_type == OBJECT_RUINmobilew1 ||
|
||||
m_type == OBJECT_RUINmobilew2 ||
|
||||
m_type == OBJECT_RUINmobilet1 ||
|
||||
m_type == OBJECT_RUINmobilet2 ||
|
||||
m_type == OBJECT_RUINmobiler1 ||
|
||||
m_type == OBJECT_RUINmobiler2 ||
|
||||
m_type == OBJECT_RUINfactory ||
|
||||
m_type == OBJECT_RUINdoor ||
|
||||
m_type == OBJECT_RUINsupport ||
|
||||
m_type == OBJECT_RUINradar ||
|
||||
m_type == OBJECT_RUINconvert ) && type != DamageType::Explosive ) return false; // Mines and ruins can't be destroyed by shooting
|
||||
if ( m_type == OBJECT_URANIUM ) return false; // UraniumOre is not destroyable (see #777)
|
||||
|
||||
DestroyObject(DestructionType::Explosion, killer);
|
||||
|
@ -491,7 +502,12 @@ void COldObject::DestroyObject(DestructionType type, CObject* killer)
|
|||
m_type == OBJECT_SAFE ||
|
||||
m_type == OBJECT_HUSTON ||
|
||||
m_type == OBJECT_START ||
|
||||
m_type == OBJECT_END ) // building?
|
||||
m_type == OBJECT_END ||
|
||||
m_type == OBJECT_RUINfactory ||
|
||||
m_type == OBJECT_RUINdoor ||
|
||||
m_type == OBJECT_RUINsupport ||
|
||||
m_type == OBJECT_RUINradar ||
|
||||
m_type == OBJECT_RUINconvert ) // building?
|
||||
{
|
||||
pyroType = Gfx::PT_FRAGT;
|
||||
}
|
||||
|
@ -682,7 +698,7 @@ void COldObject::SetType(ObjectType type)
|
|||
m_type == OBJECT_MOBILEfs || // WingedSniffer
|
||||
m_type == OBJECT_MOBILEfc || // WingedShooter
|
||||
m_type == OBJECT_MOBILEfi || // WingedOrgaShooter
|
||||
m_type == OBJECT_MOBILEft || // winged PracticeBot (unused)
|
||||
m_type == OBJECT_MOBILEft || // WingedTrainer
|
||||
m_type == OBJECT_HUMAN || // Me
|
||||
m_type == OBJECT_TECH || // Tech
|
||||
m_type == OBJECT_CONTROLLER)
|
||||
|
@ -732,6 +748,8 @@ void COldObject::SetType(ObjectType type)
|
|||
m_type == OBJECT_MOBILEtt ||
|
||||
m_type == OBJECT_MOBILEwt ||
|
||||
m_type == OBJECT_MOBILEit ||
|
||||
m_type == OBJECT_MOBILErp ||
|
||||
m_type == OBJECT_MOBILEst ||
|
||||
m_type == OBJECT_TOWER ||
|
||||
m_type == OBJECT_RESEARCH ||
|
||||
m_type == OBJECT_ENERGY ||
|
||||
|
@ -797,6 +815,8 @@ void COldObject::SetType(ObjectType type)
|
|||
m_type == OBJECT_MOBILEtt ||
|
||||
m_type == OBJECT_MOBILEwt ||
|
||||
m_type == OBJECT_MOBILEit ||
|
||||
m_type == OBJECT_MOBILErp ||
|
||||
m_type == OBJECT_MOBILEst ||
|
||||
m_type == OBJECT_FACTORY ||
|
||||
m_type == OBJECT_REPAIR ||
|
||||
m_type == OBJECT_DESTROYER||
|
||||
|
@ -826,6 +846,23 @@ void COldObject::SetType(ObjectType type)
|
|||
m_implementedInterfaces[static_cast<int>(ObjectInterfaceType::Fragile)] = false;
|
||||
m_implementedInterfaces[static_cast<int>(ObjectInterfaceType::Shielded)] = false;
|
||||
}
|
||||
else if (m_type == OBJECT_RUINmobilew1 ||
|
||||
m_type == OBJECT_RUINmobilew2 ||
|
||||
m_type == OBJECT_RUINmobilet1 ||
|
||||
m_type == OBJECT_RUINmobilet2 ||
|
||||
m_type == OBJECT_RUINmobiler1 ||
|
||||
m_type == OBJECT_RUINmobiler2 ||
|
||||
m_type == OBJECT_RUINfactory ||
|
||||
m_type == OBJECT_RUINdoor ||
|
||||
m_type == OBJECT_RUINsupport ||
|
||||
m_type == OBJECT_RUINradar ||
|
||||
m_type == OBJECT_RUINconvert )
|
||||
{
|
||||
m_implementedInterfaces[static_cast<int>(ObjectInterfaceType::Damageable)] = true;
|
||||
m_implementedInterfaces[static_cast<int>(ObjectInterfaceType::Destroyable)] = true;
|
||||
m_implementedInterfaces[static_cast<int>(ObjectInterfaceType::Fragile)] = true;
|
||||
m_implementedInterfaces[static_cast<int>(ObjectInterfaceType::Shielded)] = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_implementedInterfaces[static_cast<int>(ObjectInterfaceType::Damageable)] = false;
|
||||
|
@ -890,6 +927,9 @@ void COldObject::SetType(ObjectType type)
|
|||
m_type == OBJECT_MOBILEtt ||
|
||||
m_type == OBJECT_MOBILEwt ||
|
||||
m_type == OBJECT_MOBILEit ||
|
||||
m_type == OBJECT_MOBILErp ||
|
||||
m_type == OBJECT_MOBILEst ||
|
||||
m_type == OBJECT_MOBILEtg ||
|
||||
m_type == OBJECT_MOBILEdr ||
|
||||
m_type == OBJECT_APOLLO2 ||
|
||||
m_type == OBJECT_BASE ||
|
||||
|
@ -2290,7 +2330,8 @@ void COldObject::AdjustCamera(Math::Vector &eye, float &dirH, float &dirV,
|
|||
}
|
||||
else if ( m_type == OBJECT_MOBILErt ||
|
||||
m_type == OBJECT_MOBILErr ||
|
||||
m_type == OBJECT_MOBILErs )
|
||||
m_type == OBJECT_MOBILErs ||
|
||||
m_type == OBJECT_MOBILErp )
|
||||
{
|
||||
eye.x = -1.1f; // on the cap
|
||||
eye.y = 7.9f;
|
||||
|
@ -2332,7 +2373,8 @@ void COldObject::AdjustCamera(Math::Vector &eye, float &dirH, float &dirV,
|
|||
eye.y = 11.0f;
|
||||
eye.z = 0.0f;
|
||||
}
|
||||
else if ( m_type == OBJECT_MOBILEsa )
|
||||
else if ( m_type == OBJECT_MOBILEsa ||
|
||||
m_type == OBJECT_MOBILEst )
|
||||
{
|
||||
eye.x = 3.0f;
|
||||
eye.y = 4.5f;
|
||||
|
@ -2879,6 +2921,8 @@ void COldObject::CreateSelectParticle()
|
|||
m_type == OBJECT_MOBILEtt ||
|
||||
m_type == OBJECT_MOBILEwt ||
|
||||
m_type == OBJECT_MOBILEit ||
|
||||
m_type == OBJECT_MOBILErp ||
|
||||
m_type == OBJECT_MOBILEst ||
|
||||
m_type == OBJECT_MOBILEdr ) // vehicle?
|
||||
{
|
||||
pos = Math::Vector(0.0f, 0.0f, 0.0f);
|
||||
|
@ -2915,24 +2959,16 @@ void COldObject::UpdateSelectParticle()
|
|||
if ( m_type == OBJECT_MOBILErt ||
|
||||
m_type == OBJECT_MOBILErc ||
|
||||
m_type == OBJECT_MOBILErr ||
|
||||
m_type == OBJECT_MOBILErs ) // large caterpillars?
|
||||
m_type == OBJECT_MOBILErs ||
|
||||
m_type == OBJECT_MOBILErp ) // large caterpillars?
|
||||
{
|
||||
pos[0] = Math::Vector(4.2f, 2.8f, 1.5f);
|
||||
pos[1] = Math::Vector(4.2f, 2.8f, -1.5f);
|
||||
dim[0].x = 1.5f;
|
||||
dim[1].x = 1.5f;
|
||||
}
|
||||
else if ( m_type == OBJECT_MOBILEwt ||
|
||||
m_type == OBJECT_MOBILEtt ||
|
||||
m_type == OBJECT_MOBILEft ||
|
||||
m_type == OBJECT_MOBILEit ) // trainer ?
|
||||
{
|
||||
pos[0] = Math::Vector(4.2f, 2.5f, 1.2f);
|
||||
pos[1] = Math::Vector(4.2f, 2.5f, -1.2f);
|
||||
dim[0].x = 1.5f;
|
||||
dim[1].x = 1.5f;
|
||||
}
|
||||
else if ( m_type == OBJECT_MOBILEsa ) // submarine?
|
||||
else if ( m_type == OBJECT_MOBILEsa ||
|
||||
m_type == OBJECT_MOBILEst ) // submarine?
|
||||
{
|
||||
pos[0] = Math::Vector(3.6f, 4.0f, 2.0f);
|
||||
pos[1] = Math::Vector(3.6f, 4.0f, -2.0f);
|
||||
|
@ -2947,6 +2983,17 @@ void COldObject::UpdateSelectParticle()
|
|||
pos[0] = Math::Vector(4.9f, 3.5f, 2.5f);
|
||||
pos[1] = Math::Vector(4.9f, 3.5f, -2.5f);
|
||||
}
|
||||
else if ( m_type == OBJECT_MOBILEwt ||
|
||||
m_type == OBJECT_MOBILEtt ||
|
||||
m_type == OBJECT_MOBILEft ||
|
||||
m_type == OBJECT_MOBILEit ||
|
||||
GetTrainer()) // trainer ?
|
||||
{
|
||||
pos[0] = Math::Vector(4.2f, 2.5f, 1.2f);
|
||||
pos[1] = Math::Vector(4.2f, 2.5f, -1.2f);
|
||||
dim[0].x = 1.5f;
|
||||
dim[1].x = 1.5f;
|
||||
}
|
||||
else
|
||||
{
|
||||
pos[0] = Math::Vector(4.2f, 2.5f, 1.5f);
|
||||
|
@ -2954,61 +3001,72 @@ void COldObject::UpdateSelectParticle()
|
|||
}
|
||||
|
||||
// Red back lens
|
||||
if ( m_type == OBJECT_MOBILEfa ||
|
||||
m_type == OBJECT_MOBILEfb ||
|
||||
m_type == OBJECT_MOBILEfc ||
|
||||
m_type == OBJECT_MOBILEfi ||
|
||||
m_type == OBJECT_MOBILEfs ||
|
||||
m_type == OBJECT_MOBILEft ) // flying?
|
||||
if ( m_type == OBJECT_MOBILEwt ||
|
||||
m_type == OBJECT_MOBILEtt ||
|
||||
m_type == OBJECT_MOBILEft ||
|
||||
m_type == OBJECT_MOBILEit ||
|
||||
GetTrainer()) // trainer?
|
||||
{
|
||||
pos[2] = Math::Vector(-4.0f, 2.5f, 2.2f);
|
||||
pos[3] = Math::Vector(-4.0f, 2.5f, -2.2f);
|
||||
}
|
||||
else if ( m_type == OBJECT_MOBILEfa ||
|
||||
m_type == OBJECT_MOBILEfb ||
|
||||
m_type == OBJECT_MOBILEfc ||
|
||||
m_type == OBJECT_MOBILEfi ||
|
||||
m_type == OBJECT_MOBILEfs ) // flying?
|
||||
{
|
||||
pos[2] = Math::Vector(-4.0f, 3.1f, 4.5f);
|
||||
pos[3] = Math::Vector(-4.0f, 3.1f, -4.5f);
|
||||
dim[2].x = 0.6f;
|
||||
dim[3].x = 0.6f;
|
||||
}
|
||||
if ( m_type == OBJECT_MOBILEwa ||
|
||||
m_type == OBJECT_MOBILEwb ||
|
||||
m_type == OBJECT_MOBILEwc ||
|
||||
m_type == OBJECT_MOBILEwi ||
|
||||
m_type == OBJECT_MOBILEws ) // wheels?
|
||||
else if ( m_type == OBJECT_MOBILEwa ||
|
||||
m_type == OBJECT_MOBILEwb ||
|
||||
m_type == OBJECT_MOBILEwc ||
|
||||
m_type == OBJECT_MOBILEwi ||
|
||||
m_type == OBJECT_MOBILEws ) // wheels?
|
||||
{
|
||||
pos[2] = Math::Vector(-4.5f, 2.7f, 2.8f);
|
||||
pos[3] = Math::Vector(-4.5f, 2.7f, -2.8f);
|
||||
}
|
||||
if ( m_type == OBJECT_MOBILEwt ) // wheels?
|
||||
{
|
||||
pos[2] = Math::Vector(-4.0f, 2.5f, 2.2f);
|
||||
pos[3] = Math::Vector(-4.0f, 2.5f, -2.2f);
|
||||
}
|
||||
if ( m_type == OBJECT_MOBILEia ||
|
||||
m_type == OBJECT_MOBILEib ||
|
||||
m_type == OBJECT_MOBILEic ||
|
||||
m_type == OBJECT_MOBILEii ||
|
||||
m_type == OBJECT_MOBILEis ||
|
||||
m_type == OBJECT_MOBILEit ) // legs?
|
||||
else if ( m_type == OBJECT_MOBILEia ||
|
||||
m_type == OBJECT_MOBILEib ||
|
||||
m_type == OBJECT_MOBILEic ||
|
||||
m_type == OBJECT_MOBILEii ||
|
||||
m_type == OBJECT_MOBILEis ) // legs?
|
||||
{
|
||||
pos[2] = Math::Vector(-4.5f, 2.7f, 2.8f);
|
||||
pos[3] = Math::Vector(-4.5f, 2.7f, -2.8f);
|
||||
}
|
||||
if ( m_type == OBJECT_MOBILEta ||
|
||||
m_type == OBJECT_MOBILEtb ||
|
||||
m_type == OBJECT_MOBILEtc ||
|
||||
m_type == OBJECT_MOBILEti ||
|
||||
m_type == OBJECT_MOBILEts ||
|
||||
m_type == OBJECT_MOBILEtt ) // caterpillars?
|
||||
else if ( m_type == OBJECT_MOBILEta ||
|
||||
m_type == OBJECT_MOBILEtb ||
|
||||
m_type == OBJECT_MOBILEtc ||
|
||||
m_type == OBJECT_MOBILEti ||
|
||||
m_type == OBJECT_MOBILEts ) // caterpillars?
|
||||
{
|
||||
pos[2] = Math::Vector(-3.6f, 4.2f, 3.0f);
|
||||
pos[3] = Math::Vector(-3.6f, 4.2f, -3.0f);
|
||||
}
|
||||
if ( m_type == OBJECT_MOBILErt ||
|
||||
m_type == OBJECT_MOBILErc ||
|
||||
m_type == OBJECT_MOBILErr ||
|
||||
m_type == OBJECT_MOBILErs ) // large caterpillars?
|
||||
else if ( m_type == OBJECT_MOBILErt ||
|
||||
m_type == OBJECT_MOBILErc ||
|
||||
m_type == OBJECT_MOBILErr ||
|
||||
m_type == OBJECT_MOBILErs ) // large caterpillars?
|
||||
{
|
||||
pos[2] = Math::Vector(-5.0f, 5.2f, 2.5f);
|
||||
pos[3] = Math::Vector(-5.0f, 5.2f, -2.5f);
|
||||
}
|
||||
if ( m_type == OBJECT_MOBILEsa ) // submarine?
|
||||
if ( m_type == OBJECT_MOBILErp || ( GetTrainer() &&
|
||||
( m_type == OBJECT_MOBILErt ||
|
||||
m_type == OBJECT_MOBILErc ||
|
||||
m_type == OBJECT_MOBILErr ||
|
||||
m_type == OBJECT_MOBILErs))) // large caterpillars (trainer)?
|
||||
{
|
||||
pos[2] = Math::Vector(-4.6f, 5.2f, 2.6f);
|
||||
pos[3] = Math::Vector(-4.6f, 5.2f, -2.6f);
|
||||
}
|
||||
if ( m_type == OBJECT_MOBILEsa ||
|
||||
m_type == OBJECT_MOBILEst ) // submarine?
|
||||
{
|
||||
pos[2] = Math::Vector(-3.6f, 4.0f, 2.0f);
|
||||
pos[3] = Math::Vector(-3.6f, 4.0f, -2.0f);
|
||||
|
@ -3252,6 +3310,9 @@ float COldObject::GetLightningHitProbability()
|
|||
m_type == OBJECT_MOBILEtt ||
|
||||
m_type == OBJECT_MOBILEwt ||
|
||||
m_type == OBJECT_MOBILEit ||
|
||||
m_type == OBJECT_MOBILErp ||
|
||||
m_type == OBJECT_MOBILEst ||
|
||||
m_type == OBJECT_MOBILEtg ||
|
||||
m_type == OBJECT_MOBILEdr ) // robot?
|
||||
{
|
||||
return 0.5f;
|
||||
|
@ -3265,8 +3326,7 @@ bool COldObject::IsSelectableByDefault(ObjectType type)
|
|||
type == OBJECT_ANT ||
|
||||
type == OBJECT_SPIDER ||
|
||||
type == OBJECT_BEE ||
|
||||
type == OBJECT_WORM ||
|
||||
type == OBJECT_MOBILEtg )
|
||||
type == OBJECT_WORM )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -64,6 +64,7 @@ std::unique_ptr<CBaseBuilding> CBaseBuilding::Create(
|
|||
{
|
||||
auto obj = MakeUnique<CBaseBuilding>(params.id, params.type);
|
||||
|
||||
obj->SetTrainer(params.trainer);
|
||||
obj->SetTeam(params.team);
|
||||
|
||||
float height = params.height;
|
||||
|
|
|
@ -86,7 +86,7 @@ CTaskBuild::~CTaskBuild()
|
|||
|
||||
// Creates a building.
|
||||
|
||||
void CTaskBuild::CreateBuilding(Math::Vector pos, float angle)
|
||||
void CTaskBuild::CreateBuilding(Math::Vector pos, float angle, bool trainer)
|
||||
{
|
||||
ObjectCreateParams params;
|
||||
params.pos = pos;
|
||||
|
@ -94,6 +94,7 @@ void CTaskBuild::CreateBuilding(Math::Vector pos, float angle)
|
|||
params.type = m_type;
|
||||
params.power = 0.0f;
|
||||
params.team = m_object->GetTeam();
|
||||
params.trainer = trainer;
|
||||
m_building = CObjectManager::GetInstancePointer()->CreateObject(params);
|
||||
m_building->SetLock(true); // not yet usable
|
||||
|
||||
|
@ -287,7 +288,7 @@ bool CTaskBuild::EventProcess(const Event &event)
|
|||
|
||||
pos = m_metal->GetPosition();
|
||||
a = m_object->GetRotationY();
|
||||
CreateBuilding(pos, a+Math::PI);
|
||||
CreateBuilding(pos, a+Math::PI, m_object->GetTrainer());
|
||||
CreateLight();
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ public:
|
|||
|
||||
protected:
|
||||
Error FlatFloor();
|
||||
void CreateBuilding(Math::Vector pos, float angle);
|
||||
void CreateBuilding(Math::Vector pos, float angle, bool trainer);
|
||||
void CreateLight();
|
||||
void BlackLight();
|
||||
CObject* SearchMetalObject(float &angle, float dMin, float dMax, float aLimit, Error &err);
|
||||
|
|
|
@ -582,6 +582,8 @@ CObject* CTaskGoto::WormSearch(Math::Vector &impact)
|
|||
oType != OBJECT_MOBILEtt &&
|
||||
oType != OBJECT_MOBILEwt &&
|
||||
oType != OBJECT_MOBILEit &&
|
||||
oType != OBJECT_MOBILErp &&
|
||||
oType != OBJECT_MOBILEst &&
|
||||
oType != OBJECT_MOBILEdr &&
|
||||
oType != OBJECT_DERRICK &&
|
||||
oType != OBJECT_STATION &&
|
||||
|
@ -725,7 +727,8 @@ Error CTaskGoto::Start(Math::Vector goal, float altitude,
|
|||
type == OBJECT_MOBILErt ||
|
||||
type == OBJECT_MOBILErc ||
|
||||
type == OBJECT_MOBILErr ||
|
||||
type == OBJECT_MOBILErs )
|
||||
type == OBJECT_MOBILErs ||
|
||||
type == OBJECT_MOBILErp )
|
||||
{
|
||||
m_bApprox = true;
|
||||
}
|
||||
|
@ -1194,6 +1197,8 @@ bool CTaskGoto::AdjustTarget(CObject* pObj, Math::Vector &pos, float &distance)
|
|||
type == OBJECT_MOBILEtt ||
|
||||
type == OBJECT_MOBILEwt ||
|
||||
type == OBJECT_MOBILEit ||
|
||||
type == OBJECT_MOBILErp ||
|
||||
type == OBJECT_MOBILEst ||
|
||||
type == OBJECT_MOBILEdr )
|
||||
{
|
||||
assert(pObj->Implements(ObjectInterfaceType::Powered));
|
||||
|
@ -1996,12 +2001,14 @@ void CTaskGoto::BitmapTerrain(int minx, int miny, int maxx, int maxy)
|
|||
if ( type == OBJECT_MOBILErt ||
|
||||
type == OBJECT_MOBILErc ||
|
||||
type == OBJECT_MOBILErr ||
|
||||
type == OBJECT_MOBILErs ) // large caterpillars?
|
||||
type == OBJECT_MOBILErs ||
|
||||
type == OBJECT_MOBILErp ) // large caterpillars?
|
||||
{
|
||||
aLimit = 35.0f*Math::PI/180.0f;
|
||||
}
|
||||
|
||||
if ( type == OBJECT_MOBILEsa ) // submarine caterpillars?
|
||||
if ( type == OBJECT_MOBILEsa ||
|
||||
type == OBJECT_MOBILEst ) // submarine caterpillars?
|
||||
{
|
||||
aLimit = 35.0f*Math::PI/180.0f;
|
||||
bAcceptWater = true;
|
||||
|
|
|
@ -380,6 +380,8 @@ CObject* CTaskTake::SearchFriendObject(float &angle,
|
|||
type != OBJECT_MOBILEtt &&
|
||||
type != OBJECT_MOBILEwt &&
|
||||
type != OBJECT_MOBILEit &&
|
||||
type != OBJECT_MOBILErp &&
|
||||
type != OBJECT_MOBILEst &&
|
||||
type != OBJECT_TOWER &&
|
||||
type != OBJECT_RESEARCH &&
|
||||
type != OBJECT_ENERGY &&
|
||||
|
|
|
@ -991,7 +991,8 @@ void CPhysics::MotorUpdate(float aTime, float rTime)
|
|||
type == OBJECT_MOBILEib ||
|
||||
type == OBJECT_MOBILEis ||
|
||||
type == OBJECT_MOBILEic ||
|
||||
type == OBJECT_MOBILEii ) factor = 0.5f;
|
||||
type == OBJECT_MOBILEii ||
|
||||
type == OBJECT_MOBILEit ) factor = 0.5f;
|
||||
|
||||
energy = power->GetEnergy();
|
||||
energy -= fabs(motorSpeed.x)*rTime*factor*0.005f;
|
||||
|
@ -1827,6 +1828,8 @@ void CPhysics::WaterFrame(float aTime, float rTime)
|
|||
type == OBJECT_MOBILEtt ||
|
||||
type == OBJECT_MOBILEwt ||
|
||||
type == OBJECT_MOBILEit ||
|
||||
type == OBJECT_MOBILErp ||
|
||||
type == OBJECT_MOBILEtg ||
|
||||
type == OBJECT_MOBILEdr ||
|
||||
type == OBJECT_APOLLO2 )
|
||||
{
|
||||
|
@ -1848,7 +1851,8 @@ void CPhysics::SoundMotorFull(float rTime, ObjectType type)
|
|||
type == OBJECT_MOBILEib ||
|
||||
type == OBJECT_MOBILEic ||
|
||||
type == OBJECT_MOBILEii ||
|
||||
type == OBJECT_MOBILEis )
|
||||
type == OBJECT_MOBILEis ||
|
||||
type == OBJECT_MOBILEit )
|
||||
{
|
||||
if ( m_soundChannel == -1 )
|
||||
{
|
||||
|
@ -1875,7 +1879,8 @@ void CPhysics::SoundMotorFull(float rTime, ObjectType type)
|
|||
return;
|
||||
}
|
||||
|
||||
if ( type == OBJECT_MOBILEsa )
|
||||
if ( type == OBJECT_MOBILEsa ||
|
||||
type == OBJECT_MOBILEst )
|
||||
{
|
||||
sound = SOUND_MOTORs;
|
||||
amplitude = 0.6f;
|
||||
|
@ -1884,7 +1889,8 @@ void CPhysics::SoundMotorFull(float rTime, ObjectType type)
|
|||
else if ( type == OBJECT_MOBILErt ||
|
||||
type == OBJECT_MOBILErc ||
|
||||
type == OBJECT_MOBILErr ||
|
||||
type == OBJECT_MOBILErs )
|
||||
type == OBJECT_MOBILErs ||
|
||||
type == OBJECT_MOBILErp )
|
||||
{
|
||||
sound = SOUND_MOTORr;
|
||||
amplitude = 1.0f;
|
||||
|
@ -1893,7 +1899,8 @@ void CPhysics::SoundMotorFull(float rTime, ObjectType type)
|
|||
else if ( type == OBJECT_MOBILEta ||
|
||||
type == OBJECT_MOBILEtc ||
|
||||
type == OBJECT_MOBILEti ||
|
||||
type == OBJECT_MOBILEts )
|
||||
type == OBJECT_MOBILEts ||
|
||||
type == OBJECT_MOBILEtt )
|
||||
{
|
||||
sound = SOUND_MOTORt;
|
||||
amplitude = 1.0f;
|
||||
|
@ -1964,7 +1971,8 @@ void CPhysics::SoundMotorSlow(float rTime, ObjectType type)
|
|||
type == OBJECT_MOBILEib ||
|
||||
type == OBJECT_MOBILEic ||
|
||||
type == OBJECT_MOBILEii ||
|
||||
type == OBJECT_MOBILEis )
|
||||
type == OBJECT_MOBILEis ||
|
||||
type == OBJECT_MOBILEit )
|
||||
{
|
||||
if ( m_soundChannel != -1 ) // engine is running?
|
||||
{
|
||||
|
@ -1975,7 +1983,8 @@ void CPhysics::SoundMotorSlow(float rTime, ObjectType type)
|
|||
return;
|
||||
}
|
||||
|
||||
if ( type == OBJECT_MOBILEsa )
|
||||
if ( type == OBJECT_MOBILEsa ||
|
||||
type == OBJECT_MOBILEst )
|
||||
{
|
||||
sound = SOUND_MOTORs;
|
||||
amplitude = 0.4f;
|
||||
|
@ -1983,7 +1992,8 @@ void CPhysics::SoundMotorSlow(float rTime, ObjectType type)
|
|||
else if ( type == OBJECT_MOBILErt ||
|
||||
type == OBJECT_MOBILErc ||
|
||||
type == OBJECT_MOBILErr ||
|
||||
type == OBJECT_MOBILErs )
|
||||
type == OBJECT_MOBILErs ||
|
||||
type == OBJECT_MOBILErp )
|
||||
{
|
||||
sound = SOUND_MOTORr;
|
||||
amplitude = 0.9f;
|
||||
|
@ -1992,7 +2002,8 @@ void CPhysics::SoundMotorSlow(float rTime, ObjectType type)
|
|||
type == OBJECT_MOBILEtb ||
|
||||
type == OBJECT_MOBILEtc ||
|
||||
type == OBJECT_MOBILEti ||
|
||||
type == OBJECT_MOBILEts )
|
||||
type == OBJECT_MOBILEts ||
|
||||
type == OBJECT_MOBILEtt )
|
||||
{
|
||||
sound = SOUND_MOTORt;
|
||||
amplitude = 0.7f;
|
||||
|
@ -2041,7 +2052,8 @@ void CPhysics::SoundMotorSlow(float rTime, ObjectType type)
|
|||
if ( type == OBJECT_MOBILErt ||
|
||||
type == OBJECT_MOBILErc ||
|
||||
type == OBJECT_MOBILErr ||
|
||||
type == OBJECT_MOBILErs )
|
||||
type == OBJECT_MOBILErs ||
|
||||
type == OBJECT_MOBILErp )
|
||||
{
|
||||
m_soundTimePshhh -= rTime;
|
||||
|
||||
|
@ -2087,7 +2099,8 @@ void CPhysics::SoundMotorStop(float rTime, ObjectType type)
|
|||
type == OBJECT_MOBILEib ||
|
||||
type == OBJECT_MOBILEic ||
|
||||
type == OBJECT_MOBILEii ||
|
||||
type == OBJECT_MOBILEis )
|
||||
type == OBJECT_MOBILEis ||
|
||||
type == OBJECT_MOBILEit )
|
||||
{
|
||||
if ( m_soundChannel != -1 ) // engine is running?
|
||||
{
|
||||
|
@ -2707,7 +2720,7 @@ bool CPhysics::ExploOther(ObjectType iType,
|
|||
if (pObj->GetType() == OBJECT_STONE ) { destructionForce = 25.0f; } // TitaniumOre
|
||||
if (pObj->GetType() == OBJECT_URANIUM ) { destructionForce = 25.0f; } // UraniumOre
|
||||
if (pObj->GetType() == OBJECT_MOBILEtg) { destructionForce = 10.0f; damageType = DamageType::Explosive; } // TargetBot (something running into it)
|
||||
if (iType == OBJECT_MOBILEtg) { destructionForce = 10.0f; damageType = DamageType::Explosive; } // TargetBot (it running into something)
|
||||
if (iType == OBJECT_MOBILEtg) { destructionForce = 0.0f; damageType = DamageType::Explosive; } // TargetBot (it running into something)
|
||||
if (pObj->GetType() == OBJECT_TNT ) { destructionForce = 10.0f; damageType = DamageType::Explosive; } // TNT
|
||||
if (pObj->GetType() == OBJECT_BOMB ) { destructionForce = 0.0f; damageType = DamageType::Explosive; } // Mine
|
||||
|
||||
|
@ -2771,7 +2784,9 @@ bool CPhysics::ExploOther(ObjectType iType,
|
|||
oType == OBJECT_MOBILEwt ||
|
||||
oType == OBJECT_MOBILEtt ||
|
||||
oType == OBJECT_MOBILEft ||
|
||||
oType == OBJECT_MOBILEit ) // vehicle?
|
||||
oType == OBJECT_MOBILEit ||
|
||||
oType == OBJECT_MOBILErp ||
|
||||
oType == OBJECT_MOBILEst ) // vehicle?
|
||||
{
|
||||
assert(pObj->Implements(ObjectInterfaceType::Damageable));
|
||||
// TODO: implement "killer"?
|
||||
|
@ -2795,7 +2810,7 @@ int CPhysics::ExploHimself(ObjectType iType, ObjectType oType, float force)
|
|||
float destructionForce = -1.0f; // minimal force required to destroy an object using this explosive, default: not explosive
|
||||
if ( oType == OBJECT_TNT ) destructionForce = 10.0f; // TNT
|
||||
if ( oType == OBJECT_MOBILEtg ) destructionForce = 10.0f; // TargetBot (something running into it)
|
||||
if ( iType == OBJECT_MOBILEtg ) destructionForce = 10.0f; // TargetBot (it running into something)
|
||||
if ( iType == OBJECT_MOBILEtg ) destructionForce = 0.0f; // TargetBot (it running into something)
|
||||
if ( oType == OBJECT_BOMB ) destructionForce = 0.0f; // Mine
|
||||
|
||||
if ( force > destructionForce && destructionForce >= 0.0f )
|
||||
|
@ -2837,6 +2852,8 @@ int CPhysics::ExploHimself(ObjectType iType, ObjectType oType, float force)
|
|||
iType == OBJECT_MOBILEtt ||
|
||||
iType == OBJECT_MOBILEft ||
|
||||
iType == OBJECT_MOBILEit ||
|
||||
iType == OBJECT_MOBILErp ||
|
||||
iType == OBJECT_MOBILEst ||
|
||||
iType == OBJECT_MOBILEdr ||
|
||||
iType == OBJECT_APOLLO2 ) // vehicle?
|
||||
{
|
||||
|
@ -3041,7 +3058,8 @@ void CPhysics::MotorParticle(float aTime, float rTime)
|
|||
type == OBJECT_MOBILEib ||
|
||||
type == OBJECT_MOBILEic ||
|
||||
type == OBJECT_MOBILEii ||
|
||||
type == OBJECT_MOBILEis || // legs?
|
||||
type == OBJECT_MOBILEis ||
|
||||
type == OBJECT_MOBILEit || // legs?
|
||||
type == OBJECT_MOBILEdr ||
|
||||
type == OBJECT_MOTHER ||
|
||||
type == OBJECT_ANT ||
|
||||
|
@ -3147,7 +3165,8 @@ void CPhysics::MotorParticle(float aTime, float rTime)
|
|||
type == OBJECT_MOBILEtb ||
|
||||
type == OBJECT_MOBILEtc ||
|
||||
type == OBJECT_MOBILEti ||
|
||||
type == OBJECT_MOBILEts ) // caterpillars?
|
||||
type == OBJECT_MOBILEts ||
|
||||
type == OBJECT_MOBILEtt ) // caterpillars?
|
||||
{
|
||||
if ( aTime-m_lastSlideParticle >= m_engine->ParticleAdapt(0.05f) )
|
||||
{
|
||||
|
@ -3174,7 +3193,8 @@ void CPhysics::MotorParticle(float aTime, float rTime)
|
|||
if ( type == OBJECT_MOBILErt ||
|
||||
type == OBJECT_MOBILErc ||
|
||||
type == OBJECT_MOBILErr ||
|
||||
type == OBJECT_MOBILErs ) // large caterpillars?
|
||||
type == OBJECT_MOBILErs ||
|
||||
type == OBJECT_MOBILErp ) // large caterpillars?
|
||||
{
|
||||
if ( aTime-m_lastSlideParticle >= m_engine->ParticleAdapt(0.05f) )
|
||||
{
|
||||
|
@ -3448,7 +3468,7 @@ void CPhysics::MotorParticle(float aTime, float rTime)
|
|||
}
|
||||
}
|
||||
|
||||
if ( type == OBJECT_MOBILEsa && m_bSwim )
|
||||
if ( (type == OBJECT_MOBILEsa || type == OBJECT_MOBILEst) && m_bSwim )
|
||||
{
|
||||
h = Math::Mod(aTime, 3.0f);
|
||||
if ( h < 1.5f && ( h < 0.5f || h > 0.9f ) ) return;
|
||||
|
@ -3482,7 +3502,8 @@ void CPhysics::MotorParticle(float aTime, float rTime)
|
|||
if ( type == OBJECT_MOBILErt ||
|
||||
type == OBJECT_MOBILErc ||
|
||||
type == OBJECT_MOBILErr ||
|
||||
type == OBJECT_MOBILErs )
|
||||
type == OBJECT_MOBILErs ||
|
||||
type == OBJECT_MOBILErp )
|
||||
{
|
||||
if ( !m_bMotor ) return;
|
||||
|
||||
|
|
|
@ -82,7 +82,12 @@ const char* GetObjectName(ObjectType type)
|
|||
if ( type == OBJECT_MARKKEYb ) return "KeyBSpot";
|
||||
if ( type == OBJECT_MARKKEYc ) return "KeyCSpot";
|
||||
if ( type == OBJECT_MARKKEYd ) return "KeyDSpot";
|
||||
if ( type == OBJECT_MOBILEwt ) return "PracticeBot";
|
||||
if ( type == OBJECT_MOBILEwt ) return "WheeledTrainer";
|
||||
if ( type == OBJECT_MOBILEtt ) return "TrackedTrainer";
|
||||
if ( type == OBJECT_MOBILEft ) return "WingedTrainer";
|
||||
if ( type == OBJECT_MOBILEit ) return "LeggedTrainer";
|
||||
if ( type == OBJECT_MOBILErp ) return "HeavyTrainer";
|
||||
if ( type == OBJECT_MOBILEst ) return "AmphibiousTrainer";
|
||||
if ( type == OBJECT_MOBILEwa ) return "WheeledGrabber";
|
||||
if ( type == OBJECT_MOBILEta ) return "TrackedGrabber";
|
||||
if ( type == OBJECT_MOBILEfa ) return "WingedGrabber";
|
||||
|
@ -110,6 +115,7 @@ const char* GetObjectName(ObjectType type)
|
|||
if ( type == OBJECT_MOBILEsa ) return "Subber";
|
||||
if ( type == OBJECT_MOBILEtg ) return "TargetBot";
|
||||
if ( type == OBJECT_MOBILEdr ) return "Scribbler";
|
||||
if ( type == OBJECT_MOBILEpr ) return "PracticeBot";
|
||||
if ( type == OBJECT_HUMAN ) return "Me";
|
||||
if ( type == OBJECT_TECH ) return "Tech";
|
||||
if ( type == OBJECT_MOTHER ) return "AlienQueen";
|
||||
|
@ -210,8 +216,14 @@ std::string GetHelpFilename(ObjectType type)
|
|||
if ( type == OBJECT_MOBILErs ) helpfile = "object/botshld";
|
||||
if ( type == OBJECT_MOBILEsa ) helpfile = "object/botsub";
|
||||
if ( type == OBJECT_MOBILEwt ) helpfile = "object/bottr";
|
||||
if ( type == OBJECT_MOBILEtt ) helpfile = "object/bottr";
|
||||
if ( type == OBJECT_MOBILEft ) helpfile = "object/bottr";
|
||||
if ( type == OBJECT_MOBILEit ) helpfile = "object/bottr";
|
||||
if ( type == OBJECT_MOBILErp ) helpfile = "object/bottr";
|
||||
if ( type == OBJECT_MOBILEst ) helpfile = "object/bottr";
|
||||
if ( type == OBJECT_MOBILEtg ) helpfile = "object/bottarg";
|
||||
if ( type == OBJECT_MOBILEdr ) helpfile = "object/botdraw";
|
||||
if ( type == OBJECT_MOBILEpr ) helpfile = "object/bottr";
|
||||
if ( type == OBJECT_APOLLO2 ) helpfile = "object/lrv";
|
||||
if ( type == OBJECT_HUMAN ) helpfile = "object/human";
|
||||
if ( type == OBJECT_MOTHER ) helpfile = "object/mother";
|
||||
|
|
|
@ -809,16 +809,34 @@ bool runSearch(CBotVar* var, Math::Vector pos, int& exception, std::function<boo
|
|||
{
|
||||
while ( array != nullptr )
|
||||
{
|
||||
if (array->GetValInt() == OBJECT_MOBILEpr)
|
||||
{
|
||||
type_v.push_back(OBJECT_MOBILEwt);
|
||||
type_v.push_back(OBJECT_MOBILEtt);
|
||||
type_v.push_back(OBJECT_MOBILEft);
|
||||
type_v.push_back(OBJECT_MOBILEit);
|
||||
type_v.push_back(OBJECT_MOBILErp);
|
||||
type_v.push_back(OBJECT_MOBILEst);
|
||||
}
|
||||
type_v.push_back(static_cast<ObjectType>(array->GetValInt()));
|
||||
array = array->GetNext();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (type != OBJECT_NULL)
|
||||
if (type != OBJECT_NULL && type != OBJECT_MOBILEpr)
|
||||
{
|
||||
type_v.push_back(static_cast<ObjectType>(type));
|
||||
}
|
||||
else if (type == OBJECT_MOBILEpr)
|
||||
{
|
||||
type_v.push_back(OBJECT_MOBILEwt);
|
||||
type_v.push_back(OBJECT_MOBILEtt);
|
||||
type_v.push_back(OBJECT_MOBILEft);
|
||||
type_v.push_back(OBJECT_MOBILEit);
|
||||
type_v.push_back(OBJECT_MOBILErp);
|
||||
type_v.push_back(OBJECT_MOBILEst);
|
||||
}
|
||||
}
|
||||
|
||||
return code(type_v, pos, minDist, maxDist, sens < 0, filter);
|
||||
|
@ -984,16 +1002,34 @@ bool runRadar(CBotVar* var, std::function<bool(std::vector<ObjectType>, float, f
|
|||
{
|
||||
while ( array != nullptr )
|
||||
{
|
||||
if (array->GetValInt() == OBJECT_MOBILEpr)
|
||||
{
|
||||
type_v.push_back(OBJECT_MOBILEwt);
|
||||
type_v.push_back(OBJECT_MOBILEtt);
|
||||
type_v.push_back(OBJECT_MOBILEft);
|
||||
type_v.push_back(OBJECT_MOBILEit);
|
||||
type_v.push_back(OBJECT_MOBILErp);
|
||||
type_v.push_back(OBJECT_MOBILEst);
|
||||
}
|
||||
type_v.push_back(static_cast<ObjectType>(array->GetValInt()));
|
||||
array = array->GetNext();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (type != OBJECT_NULL)
|
||||
if (type != OBJECT_NULL && type != OBJECT_MOBILEpr)
|
||||
{
|
||||
type_v.push_back(static_cast<ObjectType>(type));
|
||||
}
|
||||
else if (type == OBJECT_MOBILEpr)
|
||||
{
|
||||
type_v.push_back(OBJECT_MOBILEwt);
|
||||
type_v.push_back(OBJECT_MOBILEtt);
|
||||
type_v.push_back(OBJECT_MOBILEft);
|
||||
type_v.push_back(OBJECT_MOBILEit);
|
||||
type_v.push_back(OBJECT_MOBILErp);
|
||||
type_v.push_back(OBJECT_MOBILEst);
|
||||
}
|
||||
}
|
||||
|
||||
return code(type_v, angle, focus, minDist, maxDist, sens < 0, filter);
|
||||
|
@ -1155,16 +1191,34 @@ bool CScriptFunctions::rDetect(CBotVar* var, CBotVar* result, int& exception, vo
|
|||
{
|
||||
while ( array != nullptr )
|
||||
{
|
||||
if (array->GetValInt() == OBJECT_MOBILEpr)
|
||||
{
|
||||
type_v.push_back(OBJECT_MOBILEwt);
|
||||
type_v.push_back(OBJECT_MOBILEtt);
|
||||
type_v.push_back(OBJECT_MOBILEft);
|
||||
type_v.push_back(OBJECT_MOBILEit);
|
||||
type_v.push_back(OBJECT_MOBILErp);
|
||||
type_v.push_back(OBJECT_MOBILEst);
|
||||
}
|
||||
type_v.push_back(static_cast<ObjectType>(array->GetValInt()));
|
||||
array = array->GetNext();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (type != OBJECT_NULL)
|
||||
if (type != OBJECT_NULL && type != OBJECT_MOBILEpr)
|
||||
{
|
||||
type_v.push_back(static_cast<ObjectType>(type));
|
||||
}
|
||||
else if (type == OBJECT_MOBILEpr)
|
||||
{
|
||||
type_v.push_back(OBJECT_MOBILEwt);
|
||||
type_v.push_back(OBJECT_MOBILEtt);
|
||||
type_v.push_back(OBJECT_MOBILEft);
|
||||
type_v.push_back(OBJECT_MOBILEit);
|
||||
type_v.push_back(OBJECT_MOBILErp);
|
||||
type_v.push_back(OBJECT_MOBILEst);
|
||||
}
|
||||
}
|
||||
|
||||
pBest = CObjectManager::GetInstancePointer()->Radar(pThis, type_v, 0.0f, 45.0f*Math::PI/180.0f, 0.0f, 20.0f, false, FILTER_NONE, true);
|
||||
|
@ -3269,6 +3323,7 @@ void CScriptFunctions::Init()
|
|||
CBotProgram::DefineNum("ResearchSubber", RESEARCH_SUBM);
|
||||
CBotProgram::DefineNum("ResearchSniffer", RESEARCH_SNIFFER);
|
||||
CBotProgram::DefineNum("ResearchBuilder", RESEARCH_BUILDER);
|
||||
CBotProgram::DefineNum("ResearchTarget", RESEARCH_TARGET);
|
||||
|
||||
CBotProgram::DefineNum("PolskiPortalColobota", 1337);
|
||||
|
||||
|
|
|
@ -876,10 +876,12 @@ void CMap::DrawObjectIcon(Math::Point pos, Math::Point dim, MapColor color,
|
|||
case OBJECT_MOBILErr: icon = 20; break;
|
||||
case OBJECT_MOBILErs: icon = 29; break;
|
||||
case OBJECT_MOBILEsa: icon = 21; break;
|
||||
case OBJECT_MOBILEft: icon = 30; break;
|
||||
case OBJECT_MOBILEtt: icon = 30; break;
|
||||
case OBJECT_MOBILEft: icon = 6; break;
|
||||
case OBJECT_MOBILEtt: icon = 5; break;
|
||||
case OBJECT_MOBILEwt: icon = 30; break;
|
||||
case OBJECT_MOBILEit: icon = 30; break;
|
||||
case OBJECT_MOBILEit: icon = 7; break;
|
||||
case OBJECT_MOBILErp: icon = 9; break;
|
||||
case OBJECT_MOBILEst: icon = 10; break;
|
||||
case OBJECT_MOBILEtg: icon = 45; break;
|
||||
case OBJECT_MOBILEdr: icon = 48; break;
|
||||
case OBJECT_APOLLO2: icon = 49; break;
|
||||
|
@ -900,6 +902,11 @@ void CMap::DrawObjectIcon(Math::Point pos, Math::Point dim, MapColor color,
|
|||
case OBJECT_MOBILEtb:
|
||||
case OBJECT_MOBILEwb:
|
||||
case OBJECT_MOBILEib:
|
||||
case OBJECT_MOBILEft:
|
||||
case OBJECT_MOBILEtt:
|
||||
case OBJECT_MOBILEit:
|
||||
case OBJECT_MOBILErp:
|
||||
case OBJECT_MOBILEst:
|
||||
m_engine->SetTexture("textures/interface/button4.png"); break;
|
||||
default: ; // button3.png
|
||||
}
|
||||
|
@ -1274,6 +1281,8 @@ void CMap::UpdateObject(CObject* pObj)
|
|||
type == OBJECT_MOBILEtt ||
|
||||
type == OBJECT_MOBILEft ||
|
||||
type == OBJECT_MOBILEit ||
|
||||
type == OBJECT_MOBILErp ||
|
||||
type == OBJECT_MOBILEst ||
|
||||
type == OBJECT_MOBILEdr ||
|
||||
type == OBJECT_APOLLO2 ) // moving vehicle?
|
||||
{
|
||||
|
|
|
@ -234,10 +234,13 @@ int CMainShort::GetShortcutIcon(ObjectType type)
|
|||
case OBJECT_MOBILErr: icon = 20; break;
|
||||
case OBJECT_MOBILErs: icon = 29; break;
|
||||
case OBJECT_MOBILEsa: icon = 21; break;
|
||||
case OBJECT_MOBILEft: icon = 30; break;
|
||||
case OBJECT_MOBILEtt: icon = 30; break;
|
||||
case OBJECT_MOBILEft: icon = 6; break;
|
||||
case OBJECT_MOBILEtt: icon = 5; break;
|
||||
case OBJECT_MOBILEwt: icon = 30; break;
|
||||
case OBJECT_MOBILEit: icon = 30; break;
|
||||
case OBJECT_MOBILEit: icon = 7; break;
|
||||
case OBJECT_MOBILErp: icon = 9; break;
|
||||
case OBJECT_MOBILEst: icon = 10; break;
|
||||
case OBJECT_MOBILEtg: icon = 45; break;
|
||||
case OBJECT_MOBILEdr: icon = 48; break;
|
||||
case OBJECT_APOLLO2: icon = 49; break;
|
||||
default: return -1;
|
||||
|
@ -250,6 +253,11 @@ int CMainShort::GetShortcutIcon(ObjectType type)
|
|||
case OBJECT_MOBILEtb:
|
||||
case OBJECT_MOBILEwb:
|
||||
case OBJECT_MOBILEib:
|
||||
case OBJECT_MOBILEft:
|
||||
case OBJECT_MOBILEtt:
|
||||
case OBJECT_MOBILEit:
|
||||
case OBJECT_MOBILErp:
|
||||
case OBJECT_MOBILEst:
|
||||
return 192+icon;
|
||||
default:
|
||||
return 128+icon;
|
||||
|
|
|
@ -875,6 +875,8 @@ bool CObjectInterface::CreateInterface(bool bSelect)
|
|||
type == OBJECT_MOBILEtt ||
|
||||
type == OBJECT_MOBILEwt ||
|
||||
type == OBJECT_MOBILEit ||
|
||||
type == OBJECT_MOBILErp ||
|
||||
type == OBJECT_MOBILEst ||
|
||||
type == OBJECT_MOBILEdr ||
|
||||
type == OBJECT_MOTHER ||
|
||||
type == OBJECT_ANT ||
|
||||
|
@ -1828,10 +1830,11 @@ void CObjectInterface::UpdateInterface()
|
|||
}
|
||||
}
|
||||
|
||||
if ( type == OBJECT_MOBILEfb ||
|
||||
type == OBJECT_MOBILEtb ||
|
||||
type == OBJECT_MOBILEwb ||
|
||||
type == OBJECT_MOBILEib ) // builder?
|
||||
if ( (type == OBJECT_MOBILEfb ||
|
||||
type == OBJECT_MOBILEtb ||
|
||||
type == OBJECT_MOBILEwb ||
|
||||
type == OBJECT_MOBILEib) && // builder?
|
||||
!m_object->GetTrainer() )
|
||||
{
|
||||
if(!bEnable) m_buildInterface = false;
|
||||
CheckInterface(pw, EVENT_OBJECT_BUILD, m_buildInterface);
|
||||
|
@ -1920,6 +1923,8 @@ void CObjectInterface::UpdateInterface()
|
|||
type == OBJECT_MOBILEtt ||
|
||||
type == OBJECT_MOBILEwt ||
|
||||
type == OBJECT_MOBILEit ||
|
||||
type == OBJECT_MOBILErp ||
|
||||
type == OBJECT_MOBILEst ||
|
||||
type == OBJECT_MOBILEdr ||
|
||||
type == OBJECT_MOTHER ||
|
||||
type == OBJECT_ANT ||
|
||||
|
|
Loading…
Reference in New Issue