|
|
@@ -14,6 +14,7 @@
|
|
|
#include "IMapRendererContext.h"
|
|
|
#include "mapHandler.h"
|
|
|
|
|
|
+#include "../CPlayerInterface.h"
|
|
|
#include "../CServerHandler.h"
|
|
|
#include "../GameInstance.h"
|
|
|
#include "../Client.h"
|
|
|
@@ -601,11 +602,6 @@ MapRendererOverlay::MapRendererOverlay()
|
|
|
, imageGrail(ENGINE->renderHandler().loadAnimation(AnimationPath::builtin("AVZgrail"), EImageBlitMode::COLORKEY)->getImage(0))
|
|
|
, grailPos(GAME->server().client->gameState().getMap().grailPos)
|
|
|
{
|
|
|
- int humanPlayer = 0;
|
|
|
- for (const auto & pi : GAME->server().client->gameState().getStartInfo()->playerInfos)
|
|
|
- if(pi.second.isControlledByHuman())
|
|
|
- humanPlayer++;
|
|
|
- isSinglePlayer = humanPlayer < 2;
|
|
|
}
|
|
|
|
|
|
void MapRendererOverlay::renderTile(IMapRendererContext & context, Canvas & target, const int3 & coordinates)
|
|
|
@@ -613,7 +609,7 @@ void MapRendererOverlay::renderTile(IMapRendererContext & context, Canvas & targ
|
|
|
if(context.showGrid())
|
|
|
target.draw(imageGrid, Point(0,0));
|
|
|
|
|
|
- if(context.showVisitable() || context.showBlocked() || context.showInvisible())
|
|
|
+ if(GAME->interface()->cb->getStartInfo()->extraOptionsInfo.cheatsAllowed && (context.showVisitable() || context.showBlocked() || context.showInvisible()))
|
|
|
{
|
|
|
bool blocking = false;
|
|
|
bool visitable = false;
|
|
|
@@ -622,10 +618,10 @@ void MapRendererOverlay::renderTile(IMapRendererContext & context, Canvas & targ
|
|
|
{
|
|
|
const auto * object = context.getObject(objectID);
|
|
|
|
|
|
- if(object->ID == Obj::EVENT && context.showInvisible() && isSinglePlayer)
|
|
|
+ if(object->ID == Obj::EVENT && context.showInvisible())
|
|
|
target.draw(imageEvent, Point(0,0));
|
|
|
|
|
|
- if(grailPos == coordinates && context.showInvisible() && isSinglePlayer)
|
|
|
+ if(grailPos == coordinates && context.showInvisible())
|
|
|
target.draw(imageGrail, Point(0,0));
|
|
|
|
|
|
if(context.objectTransparency(objectID, coordinates) > 0 && !context.isActiveHero(object))
|