mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-01 00:45:26 +02:00
* working pathfinder
* drawing paths * new command "P X1 Y1 Z1 X2 Y2 Z2" - draws path between given points * borders handling rewritten * minor stuff
This commit is contained in:
@ -1,7 +1,11 @@
|
||||
#include "CConsoleHandler.h"
|
||||
#include "stdafx.h"
|
||||
#include "CConsoleHandler.h"
|
||||
#include "CAdvmapInterface.h"
|
||||
#include "SDL.h"
|
||||
#include "SDL_thread.h"
|
||||
#include "CGameInfo.h"
|
||||
#include "global.h"
|
||||
#include <sstream>
|
||||
|
||||
int internalFunc(void * nothingUsed)
|
||||
{
|
||||
@ -10,7 +14,21 @@ int internalFunc(void * nothingUsed)
|
||||
while(true)
|
||||
{
|
||||
std::cin.getline(usersMessage, 500);
|
||||
readed = std::string(usersMessage);
|
||||
std::istringstream readed;
|
||||
std::string pom(usersMessage);
|
||||
readed.str(pom);
|
||||
std::string cn; //command name
|
||||
readed >> cn;
|
||||
switch (*cn.c_str())
|
||||
{
|
||||
case 'P':
|
||||
std::cout<<"Policzyc sciezke."<<std::endl;
|
||||
int3 src, dst;
|
||||
readed>>src>>dst;
|
||||
LOCPLINT->adventureInt->terrain.currentPath = CGI->pathf->getPath(src,dst,CGI->heroh->heroInstances[0]);
|
||||
break;
|
||||
}
|
||||
//SDL_Delay(100);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user