Fixed invradar cheat code.
Replaced CRobotMain::GetCheatRadar with CRobotMain::GetRadar. Changed logger level of "invalid m_motion" messages.dev-ui
parent
b46dc3850f
commit
c36d0c8ed2
|
@ -7524,7 +7524,7 @@ bool CObject::GetTraceDown()
|
|||
CMotionVehicle* mv = dynamic_cast<CMotionVehicle*>(m_motion);
|
||||
if (mv == nullptr)
|
||||
{
|
||||
GetLogger()->Warn("GetTraceDown() invalid m_motion class!\n");
|
||||
GetLogger()->Debug("GetTraceDown() invalid m_motion class!\n");
|
||||
return false;
|
||||
}
|
||||
return mv->GetTraceDown();
|
||||
|
@ -7536,7 +7536,7 @@ void CObject::SetTraceDown(bool bDown)
|
|||
CMotionVehicle* mv = dynamic_cast<CMotionVehicle*>(m_motion);
|
||||
if (mv == nullptr)
|
||||
{
|
||||
GetLogger()->Warn("SetTraceDown() invalid m_motion class!\n");
|
||||
GetLogger()->Debug("SetTraceDown() invalid m_motion class!\n");
|
||||
return;
|
||||
}
|
||||
mv->SetTraceDown(bDown);
|
||||
|
@ -7548,7 +7548,7 @@ int CObject::GetTraceColor()
|
|||
CMotionVehicle* mv = dynamic_cast<CMotionVehicle*>(m_motion);
|
||||
if (mv == nullptr)
|
||||
{
|
||||
GetLogger()->Warn("GetTraceColor() invalid m_motion class!\n");
|
||||
GetLogger()->Debug("GetTraceColor() invalid m_motion class!\n");
|
||||
return 0;
|
||||
}
|
||||
return mv->GetTraceColor();
|
||||
|
@ -7560,7 +7560,7 @@ void CObject::SetTraceColor(int color)
|
|||
CMotionVehicle* mv = dynamic_cast<CMotionVehicle*>(m_motion);
|
||||
if (mv == nullptr)
|
||||
{
|
||||
GetLogger()->Warn("SetTraceColor() invalid m_motion class!\n");
|
||||
GetLogger()->Debug("SetTraceColor() invalid m_motion class!\n");
|
||||
return;
|
||||
}
|
||||
mv->SetTraceColor(color);
|
||||
|
@ -7572,7 +7572,7 @@ float CObject::GetTraceWidth()
|
|||
CMotionVehicle* mv = dynamic_cast<CMotionVehicle*>(m_motion);
|
||||
if (mv == nullptr)
|
||||
{
|
||||
GetLogger()->Warn("GetTraceWidth() invalid m_motion class!\n");
|
||||
GetLogger()->Debug("GetTraceWidth() invalid m_motion class!\n");
|
||||
return 0.0f;
|
||||
}
|
||||
return mv->GetTraceWidth();
|
||||
|
@ -7584,7 +7584,7 @@ void CObject::SetTraceWidth(float width)
|
|||
CMotionVehicle* mv = dynamic_cast<CMotionVehicle*>(m_motion);
|
||||
if (mv == nullptr)
|
||||
{
|
||||
GetLogger()->Warn("SetTraceWidth() invalid m_motion class!\n");
|
||||
GetLogger()->Debug("SetTraceWidth() invalid m_motion class!\n");
|
||||
return;
|
||||
}
|
||||
mv->SetTraceWidth(width);
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "common/event.h"
|
||||
#include "common/global.h"
|
||||
#include "common/iman.h"
|
||||
#include "common/logger.h"
|
||||
#include "common/misc.h"
|
||||
#include "common/profile.h"
|
||||
#include "common/restext.h"
|
||||
|
@ -795,6 +796,8 @@ CRobotMain::CRobotMain(CInstanceManager* iMan, CApplication* app)
|
|||
CBotProgram::DefineNum("FilterOnlyLanding", FILTER_ONLYLANDING);
|
||||
CBotProgram::DefineNum("FilterOnlyFliying", FILTER_ONLYFLYING);
|
||||
|
||||
CBotProgram::DefineNum("PolskiPortalColobota", 1337);
|
||||
|
||||
CBotClass* bc;
|
||||
|
||||
// Add the class Point.
|
||||
|
@ -1799,6 +1802,20 @@ void CRobotMain::ExecuteCmd(char *cmd)
|
|||
object->SetRange(object->GetRange()*10.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcmp(cmd, "\155\157\157") == 0)
|
||||
{
|
||||
// VGhpcyBpcyBlYXN0ZXItZWdnIGFuZCBzbyBpdCBzaG91bGQgYmUgb2JmdXNjYXRlZCEgRG8gbm90
|
||||
// IGNsZWFuLXVwIHRoaXMgY29kZSEK
|
||||
GetLogger()->Info(" _________________________\n");
|
||||
GetLogger()->Info("< \x50\x6F\x6C\x73\x6B\x69 \x50\x6F\x72\x74\x61\x6C C\x6F\x6C\x6F\x62\x6F\x74\x61! \x3E\n");
|
||||
GetLogger()->Info(" -------------------------\n");
|
||||
GetLogger()->Info(" \x5C\x20\x20\x20\x5E\x5F\x5F\x5E\n");
|
||||
GetLogger()->Info(" \x20\x5C\x20\x20\x28\x6F\x6F\x29\x5C\x5F\x5F\x5F\x5F\x5F\x5F\x5F\n");
|
||||
GetLogger()->Info(" \x28\x5F\x5F\x29\x5C \x20\x20\x20\x20\x29\x5C\x2F\x5C\n");
|
||||
GetLogger()->Info(" \x20\x20\x20\x20\x7C|\x2D\x2D\x2D\x2D\x77\x20\x7C\n");
|
||||
GetLogger()->Info(" \x20\x20 \x7C\x7C\x20\x20\x20\x20 ||\n");
|
||||
}
|
||||
|
||||
if (strcmp(cmd, "fullpower") == 0)
|
||||
{
|
||||
|
@ -6510,9 +6527,21 @@ bool CRobotMain::GetShowAll()
|
|||
return m_showAll;
|
||||
}
|
||||
|
||||
bool CRobotMain::GetCheatRadar()
|
||||
bool CRobotMain::GetRadar()
|
||||
{
|
||||
return m_cheatRadar;
|
||||
if (m_cheatRadar)
|
||||
return true;
|
||||
|
||||
for (int i = 0; i < 1000000; i++)
|
||||
{
|
||||
CObject* obj = static_cast<CObject*>(m_iMan->SearchInstance(CLASS_OBJECT, i));
|
||||
if (obj == 0) break;
|
||||
|
||||
ObjectType type = obj->GetType();
|
||||
if (type == OBJECT_RADAR)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
const char* CRobotMain::GetSavegameDir()
|
||||
|
|
|
@ -294,7 +294,7 @@ public:
|
|||
bool GetShowSoluce();
|
||||
bool GetSceneSoluce();
|
||||
bool GetShowAll();
|
||||
bool GetCheatRadar();
|
||||
bool GetRadar();
|
||||
const char* GetSavegameDir();
|
||||
const char* GetPublicDir();
|
||||
const char* GetFilesDir();
|
||||
|
|
|
@ -1117,7 +1117,7 @@ void CMap::FlushObject()
|
|||
|
||||
m_totalFix = 0; // object index fixed
|
||||
m_totalMove = MAPMAXOBJECT-2; // moving vehicles index
|
||||
//m_bRadar = m_main->GetCheatRadar(); // no radar
|
||||
m_bRadar = m_main->GetRadar();
|
||||
|
||||
for ( i=0 ; i<MAPMAXOBJECT ; i++ )
|
||||
{
|
||||
|
@ -1154,12 +1154,7 @@ void CMap::UpdateObject(CObject* pObj)
|
|||
pos.z = ppos.y;
|
||||
dir += m_angle;
|
||||
}
|
||||
|
||||
if ( type == OBJECT_RADAR )
|
||||
{
|
||||
m_bRadar = true; // radar exists
|
||||
}
|
||||
|
||||
|
||||
color = MAPCOLOR_NULL;
|
||||
if ( type == OBJECT_BASE )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue