Fix colobot-lint warnings
parent
1c2bdc9cab
commit
e964d3e48c
|
@ -44,6 +44,7 @@ CSettings::CSettings()
|
|||
m_fontSize = 19.0f;
|
||||
m_windowPos = Math::Point(0.15f, 0.17f);
|
||||
m_windowDim = Math::Point(0.70f, 0.66f);
|
||||
m_windowMax = false;
|
||||
|
||||
m_IOPublic = false;
|
||||
m_IODim = Math::Point(320.0f/640.0f, (121.0f+18.0f*8)/480.0f);
|
||||
|
|
|
@ -146,6 +146,7 @@ CEngine::CEngine(CApplication *app, CSystemUtils* systemUtils)
|
|||
m_showStats = false;
|
||||
|
||||
m_focus = 0.75f;
|
||||
m_hfov = 2.0f * atan((640.f/480.f) * tan(m_focus / 2.0f));
|
||||
|
||||
m_rankView = 0;
|
||||
|
||||
|
|
|
@ -518,7 +518,8 @@ void CPlayerProfile::LoadScene(std::string dir)
|
|||
CLevelParserLine* line = levelParser.Get("Mission");
|
||||
cat = GetLevelCategoryFromDir(line->GetParam("base")->AsString());
|
||||
|
||||
if (dir == "../../crashsave") LoadFinishedLevels(cat);
|
||||
if (dir == "../../crashsave")
|
||||
LoadFinishedLevels(cat);
|
||||
|
||||
rank = line->GetParam("rank")->AsInt();
|
||||
if (cat == LevelCategory::CustomLevels)
|
||||
|
|
|
@ -221,6 +221,8 @@ CRobotMain::CRobotMain()
|
|||
m_resetCreate = false;
|
||||
m_shortCut = true;
|
||||
|
||||
m_commandHistoryIndex = -1;
|
||||
|
||||
m_movieInfoIndex = -1;
|
||||
|
||||
m_tooltipPos = Math::Point(0.0f, 0.0f);
|
||||
|
@ -4970,7 +4972,8 @@ Error CRobotMain::ProcessEndMissionTake()
|
|||
text,
|
||||
details,
|
||||
false, true,
|
||||
[&]() {
|
||||
[&]()
|
||||
{
|
||||
ChangePhase(PHASE_WIN);
|
||||
}
|
||||
);
|
||||
|
@ -5972,12 +5975,12 @@ bool CRobotMain::GetDebugCrashSpheres()
|
|||
return m_debugCrashSpheres;
|
||||
}
|
||||
|
||||
void CRobotMain::PushToCommandHistory(std::string str)
|
||||
void CRobotMain::PushToCommandHistory(std::string cmd)
|
||||
{
|
||||
if (!m_commandHistory.empty() && m_commandHistory.front() == str) // already in history
|
||||
if (!m_commandHistory.empty() && m_commandHistory.front() == cmd) // already in history
|
||||
return;
|
||||
|
||||
m_commandHistory.push_front(str);
|
||||
m_commandHistory.push_front(cmd);
|
||||
|
||||
if (m_commandHistory.size() > 50) // to avoid infinite growth
|
||||
m_commandHistory.pop_back();
|
||||
|
|
|
@ -528,7 +528,7 @@ protected:
|
|||
void UpdateDebugCrashSpheres();
|
||||
|
||||
//! Adds element to the beginning of command history
|
||||
void PushToCommandHistory(std::string obj);
|
||||
void PushToCommandHistory(std::string cmd);
|
||||
//! Returns next/previous element from command history and updates index
|
||||
//@{
|
||||
std::string GetNextFromCommandHistory();
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
#include "common/restext.h"
|
||||
#include "common/stringutils.h"
|
||||
|
||||
#include "level/parser/parserline.h"
|
||||
|
||||
#include "level/robotmain.h"
|
||||
|
||||
#include "level/parser/parserline.h"
|
||||
|
||||
#include "object/object.h"
|
||||
|
||||
#include "ui/displaytext.h"
|
||||
|
|
|
@ -115,7 +115,7 @@ public:
|
|||
|
||||
void AddPoints(int team, int points);
|
||||
int GetScore(int team);
|
||||
void SetScore(int team, int score);
|
||||
void SetScore(int team, int points);
|
||||
|
||||
private:
|
||||
std::vector<std::unique_ptr<CScoreboardKillRule>> m_rulesKill = {};
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "object/object_create_params.h"
|
||||
#include "object/object_interface_type.h"
|
||||
#include "object/object_type.h"
|
||||
|
||||
#include "object/interface/destroyable_object.h"
|
||||
|
||||
#include <map>
|
||||
|
|
|
@ -138,6 +138,7 @@ COldObject::COldObject(int id)
|
|||
m_virusTime = 0.0f;
|
||||
m_lastVirusParticle = 0.0f;
|
||||
m_damaging = false;
|
||||
m_damageTime = 0.0f;
|
||||
m_dying = DeathType::Alive;
|
||||
m_bFlat = false;
|
||||
m_gunGoalV = 0.0f;
|
||||
|
|
Loading…
Reference in New Issue