less alpha for building ghosts, 'X' key for highlighting, no camera move while highlighting
This commit is contained in:
parent
73919c860d
commit
0043511e0a
|
@ -43,6 +43,7 @@ HotKeyToggleOSMouseEnabled=/
|
|||
ChatTeamMode=H
|
||||
ToggleMusic=K
|
||||
SaveGUILayout=f10
|
||||
SetMarker=X
|
||||
ReloadINI=f5
|
||||
TogglePhotoMode=f8
|
||||
SwitchLanguage=L
|
||||
|
|
|
@ -80,6 +80,7 @@ Game::Game() : ProgramState(NULL) {
|
|||
gameOver=false;
|
||||
renderNetworkStatus=false;
|
||||
showFullConsole=false;
|
||||
setMarker=false;
|
||||
mouseMoved=false;
|
||||
scrollSpeed=0;
|
||||
camLeftButtonDown=false;
|
||||
|
@ -205,7 +206,7 @@ void Game::resetMembers() {
|
|||
renderNetworkStatus= false;
|
||||
speed= sNormal;
|
||||
showFullConsole= false;
|
||||
|
||||
setMarker = false;
|
||||
camLeftButtonDown=false;
|
||||
camRightButtonDown=false;
|
||||
camUpButtonDown=false;
|
||||
|
@ -2206,10 +2207,12 @@ void Game::mouseDownLeft(int x, int y) {
|
|||
}
|
||||
else
|
||||
{
|
||||
gameCamera.setPos(Vec2f(static_cast<float>(xCell), static_cast<float>(yCell)));
|
||||
if(!setMarker) {
|
||||
gameCamera.setPos(Vec2f(static_cast<float>(xCell), static_cast<float>(yCell)));
|
||||
}
|
||||
}
|
||||
|
||||
if(isKeyDown(vkShift)) {
|
||||
if(setMarker) {
|
||||
Vec2i surfaceCellPos = map->toSurfCoords(Vec2i(xCell,yCell));
|
||||
SurfaceCell *sc = map->getSurfaceCell(surfaceCellPos);
|
||||
Vec3f vertex = sc->getVertex();
|
||||
|
@ -2284,7 +2287,7 @@ void Game::mouseDownLeft(int x, int y) {
|
|||
else {
|
||||
gui.mouseDownLeftGraphics(x, y, false);
|
||||
|
||||
if(isKeyDown(vkShift)) {
|
||||
if(setMarker) {
|
||||
Vec2i targetPos;
|
||||
Vec2i screenPos(x,y-60);
|
||||
Renderer &renderer= Renderer::getInstance();
|
||||
|
@ -2620,7 +2623,9 @@ void Game::mouseMove(int x, int y, const MouseState *ms) {
|
|||
}
|
||||
else
|
||||
{
|
||||
gameCamera.setPos(Vec2f(static_cast<float>(xCell), static_cast<float>(yCell)));
|
||||
if(!setMarker) {
|
||||
gameCamera.setPos(Vec2f(static_cast<float>(xCell), static_cast<float>(yCell)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2777,6 +2782,9 @@ void Game::keyDown(SDL_KeyboardEvent key) {
|
|||
else if(isKeyPressed(configKeys.getSDLKey("ShowFullConsole"),key, false) == true) {
|
||||
showFullConsole= true;
|
||||
}
|
||||
else if(isKeyPressed(configKeys.getSDLKey("SetMarker"),key, false) == true) {
|
||||
setMarker= true;
|
||||
}
|
||||
//else if(key == configKeys.getCharKey("TogglePhotoMode")) {
|
||||
else if(isKeyPressed(configKeys.getSDLKey("TogglePhotoMode"),key, false) == true) {
|
||||
photoModeEnabled = !photoModeEnabled;
|
||||
|
@ -3022,6 +3030,9 @@ void Game::keyUp(SDL_KeyboardEvent key) {
|
|||
if(isKeyPressed(configKeys.getSDLKey("ShowFullConsole"),key) == true) {
|
||||
showFullConsole= false;
|
||||
}
|
||||
else if(isKeyPressed(configKeys.getSDLKey("SetMarker"),key) == true) {
|
||||
setMarker= false;
|
||||
}
|
||||
//else if(key == configKeys.getCharKey("CameraRotateLeft") ||
|
||||
// key == configKeys.getCharKey("CameraRotateRight")) {
|
||||
else if(isKeyPressed(configKeys.getSDLKey("CameraRotateLeft"),key) == true ||
|
||||
|
|
|
@ -96,6 +96,7 @@ private:
|
|||
bool gameOver;
|
||||
bool renderNetworkStatus;
|
||||
bool showFullConsole;
|
||||
bool setMarker;
|
||||
bool mouseMoved;
|
||||
float scrollSpeed;
|
||||
bool camLeftButtonDown;
|
||||
|
|
|
@ -4790,7 +4790,7 @@ void Renderer::renderUnitsToBuild(const int renderFps) {
|
|||
const UnitBuildInfo &buildUnit = qCache.visibleQuadUnitBuildList[visibleUnitIndex];
|
||||
//Vec4f modelColor= Vec4f(0.f, 1.f, 0.f, 0.5f);
|
||||
const Vec3f teamColor = buildUnit.unit->getFaction()->getTexture()->getPixmapConst()->getPixel3f(0,0);
|
||||
Vec4f modelColor= Vec4f(teamColor.x,teamColor.y,teamColor.z,0.2f);
|
||||
Vec4f modelColor= Vec4f(teamColor.x,teamColor.y,teamColor.z,0.4f);
|
||||
renderGhostModel(buildUnit.buildUnit, buildUnit.pos, buildUnit.facing, &modelColor);
|
||||
|
||||
//printf("Rendering to build unit index = %d\n",visibleUnitIndex);
|
||||
|
|
|
@ -1166,10 +1166,7 @@ void ServerInterface::dispatchPendingHighlightCellMessages(std::vector <string>
|
|||
this->setHighlightedCell(msg);
|
||||
|
||||
NetworkMessageHighlightCell networkMessageHighlightCell(msg.getTargetPos(),msg.getFactionIndex());
|
||||
printf("und jetzt für alle\n");
|
||||
broadcastMessage(&networkMessageHighlightCell, connectionSlot->getPlayerIndex(),i);
|
||||
|
||||
//if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] after broadcast chatTeamIndex = %d\n",__FILE__,__FUNCTION__,__LINE__,newChatTeamIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue