Added global magnifyDamage setting
parent
94ea1ff106
commit
80963f1a2b
|
@ -559,6 +559,7 @@ bool COldObject::ExplodeObject(ExplosionType type, float force, float decay)
|
|||
loss = force;
|
||||
}
|
||||
loss *= m_magnifyDamage;
|
||||
loss *= m_main->GetGlobalMagnifyDamage();
|
||||
loss *= decay;
|
||||
|
||||
// Decreases the power of the shield.
|
||||
|
@ -3296,4 +3297,3 @@ void COldObject::SetScale(const Math::Vector& scale)
|
|||
{
|
||||
SetPartScale(0, scale);
|
||||
}
|
||||
|
||||
|
|
|
@ -219,6 +219,8 @@ CRobotMain::CRobotMain(CController* controller)
|
|||
m_endingLostRank = 0;
|
||||
m_winTerminate = false;
|
||||
|
||||
m_globalMagnifyDamage = 1.0f;
|
||||
|
||||
m_exitAfterMission = false;
|
||||
|
||||
m_autosave = true;
|
||||
|
@ -2909,6 +2911,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
|
|||
m_endTakeResearch = 0;
|
||||
m_endTakeWinDelay = 2.0f;
|
||||
m_endTakeLostDelay = 2.0f;
|
||||
m_globalMagnifyDamage = 1.0f;
|
||||
m_obligatoryTotal = 0;
|
||||
m_prohibitedTotal = 0;
|
||||
m_mapShow = true;
|
||||
|
@ -3256,16 +3259,15 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
|
|||
continue;
|
||||
}
|
||||
|
||||
if ((line->GetCommand() == "Global" || line->GetCommand() == "Level") && !resetObject)
|
||||
if (line->GetCommand() == "Level" && !resetObject)
|
||||
{
|
||||
if (line->GetCommand() == "Global")
|
||||
CLogger::GetInstancePointer()->Warn("Using Global is deprecated. Please use Level instead.\n");
|
||||
|
||||
g_unit = line->GetParam("unitScale")->AsFloat(4.0f);
|
||||
m_engine->SetTracePrecision(line->GetParam("traceQuality")->AsFloat(1.0f));
|
||||
m_shortCut = line->GetParam("shortcut")->AsBool(true);
|
||||
|
||||
m_missionType = line->GetParam("type")->AsMissionType(MISSION_NORMAL);
|
||||
m_globalMagnifyDamage = line->GetParam("magnifyDamage")->AsFloat(1.0f);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -6298,3 +6300,7 @@ void CRobotMain::RemoveFromSelectionHistory(CObject* object)
|
|||
m_selectionHistory.erase(it, m_selectionHistory.end());
|
||||
}
|
||||
|
||||
float CRobotMain::GetGlobalMagnifyDamage()
|
||||
{
|
||||
return m_globalMagnifyDamage;
|
||||
}
|
||||
|
|
|
@ -374,6 +374,9 @@ public:
|
|||
|
||||
void RemoveFromSelectionHistory(CObject* object);
|
||||
|
||||
//! Returns global magnifyDamage setting
|
||||
float GetGlobalMagnifyDamage();
|
||||
|
||||
protected:
|
||||
bool EventFrame(const Event &event);
|
||||
bool EventObject(const Event &event);
|
||||
|
@ -512,6 +515,8 @@ protected:
|
|||
int m_endingLostRank;
|
||||
bool m_winTerminate;
|
||||
|
||||
float m_globalMagnifyDamage;
|
||||
|
||||
bool m_exitAfterMission;
|
||||
|
||||
bool m_codeBattleInit;
|
||||
|
|
Loading…
Reference in New Issue