浏览代码

Fix 2292. Fix chat on adventure map, increase maxOutputPerLine

ArseniyShestakov 10 年之前
父节点
当前提交
a49950e958
共有 4 个文件被更改,包括 12 次插入10 次删除
  1. 6 4
      client/CMT.cpp
  2. 3 3
      client/NetPacksClient.cpp
  3. 2 2
      client/windows/CAdvmapInterface.cpp
  4. 1 1
      config/resolutions.json

+ 6 - 4
client/CMT.cpp

@@ -529,8 +529,9 @@ void processCommand(const std::string &message)
 	std::string cn; //command name
 	readed >> cn;
 
-	if(LOCPLINT && LOCPLINT->cingconsole)
-		LOCPLINT->cingconsole->print(message);
+// Check mantis issue 2292 for details
+//	if(LOCPLINT && LOCPLINT->cingconsole)
+//		LOCPLINT->cingconsole->print(message);
 
 	if(ermInteractiveMode)
 	{
@@ -789,11 +790,12 @@ void processCommand(const std::string &message)
 		Settings session = settings.write["session"];
 		session["autoSkip"].Bool() = !session["autoSkip"].Bool();
 	}
-	else if(client && client->serv && client->serv->connected && LOCPLINT) //send to server
+	// Check mantis issue 2292 for details
+/* 	else if(client && client->serv && client->serv->connected && LOCPLINT) //send to server
 	{
 		boost::unique_lock<boost::recursive_mutex> un(*LOCPLINT->pim);
 		LOCPLINT->cb->sendMessage(message);
-	}
+	}*/
 }
 
 //plays intro, ends when intro is over or button has been pressed (handles events)

+ 3 - 3
client/NetPacksClient.cpp

@@ -819,10 +819,10 @@ void SaveGame::applyCl(CClient *cl)
 
 void PlayerMessage::applyCl(CClient *cl)
 {
-	std::ostringstream str;
-	str << "Player "<< player <<" sends a message: " << text;
+	logNetwork->debugStream() << "Player "<< player <<" sends a message: " << text;
 
-    logNetwork->debugStream() << str.str();
+	std::ostringstream str;
+	str << cl->getPlayer(player)->nodeName() <<": " << text;
 	if(LOCPLINT)
 		LOCPLINT->cingconsole->print(str.str());
 }

+ 2 - 2
client/windows/CAdvmapInterface.cpp

@@ -881,7 +881,7 @@ void CAdvMapInt::showAll(SDL_Surface * to)
 
 	statusbar.show(to);
 
-	LOCPLINT->cingconsole->showAll(to);
+	LOCPLINT->cingconsole->show(to);
 }
 
 bool CAdvMapInt::isHeroSleeping(const CGHeroInstance *hero)
@@ -958,7 +958,7 @@ void CAdvMapInt::show(SDL_Surface * to)
 		for(int i=0;i<4;i++)
 			blitAt(gems[i]->ourImages[LOCPLINT->playerID.getNum()].bitmap,ADVOPT.gemX[i],ADVOPT.gemY[i],to);
 		updateScreen=false;
-		LOCPLINT->cingconsole->showAll(to);
+		LOCPLINT->cingconsole->show(to);
 	}
 	else if (terrain.needsAnimUpdate())
 	{

+ 1 - 1
config/resolutions.json

@@ -3,7 +3,7 @@
 	[
 		{
 			"resolution": { "x": 800, "y": 600 },
-			"InGameConsole": { "maxInputPerLine": 60, "maxOutputPerLine": 39 },
+			"InGameConsole": { "maxInputPerLine": 60, "maxOutputPerLine": 60 },
 			"AdvMap": { "x": 7, "y": 7, "width": 594, "height": 546, "smoothMove": 1, "puzzleSepia": 1, "objectFading" : 1, "screenFading" : 1 },
 			"InfoBox": { "x": 605, "y": 389 },
 			"gem0": { "x": 6, "y": 508, "graphic": "agemLL.def" },