diff --git a/desktop_version/src/Logic.cpp b/desktop_version/src/Logic.cpp index 645c6a12..8771f178 100644 --- a/desktop_version/src/Logic.cpp +++ b/desktop_version/src/Logic.cpp @@ -1689,6 +1689,7 @@ void gamelogic() ghost.x = obj.entities[i].xp; ghost.y = obj.entities[i].yp; ghost.col = obj.entities[i].colour; + ghost.realcol = obj.entities[i].realcol; ghost.frame = obj.entities[i].drawframe; } ed.ghosts.push_back(ghost); diff --git a/desktop_version/src/editor.cpp b/desktop_version/src/editor.cpp index ded07952..5397dfe2 100644 --- a/desktop_version/src/editor.cpp +++ b/desktop_version/src/editor.cpp @@ -2889,7 +2889,7 @@ void editorrender() point tpoint; tpoint.x = ed.ghosts[i].x; tpoint.y = ed.ghosts[i].y; - graphics.setcol(ed.ghosts[i].col); + graphics.setcolreal(ed.ghosts[i].realcol); Uint32 alpha = graphics.ct.colour & graphics.backBuffer->format->Amask; Uint32 therest = graphics.ct.colour & 0x00FFFFFF; alpha = (3 * (alpha >> 24) / 4) << 24; @@ -3621,6 +3621,19 @@ void editorlogic() if (game.ghostsenabled) { + for (size_t i = 0; i < ed.ghosts.size(); i++) + { + GhostInfo& ghost = ed.ghosts[i]; + + if ((int) i > ed.currentghosts || ghost.rx != ed.levx || ghost.ry != ed.levy) + { + continue; + } + + graphics.setcol(ghost.col); + ghost.realcol = graphics.ct.colour; + } + if (ed.currentghosts + 1 < (int)ed.ghosts.size()) { ed.currentghosts++; if (ed.zmod) ed.currentghosts++; diff --git a/desktop_version/src/editor.h b/desktop_version/src/editor.h index 7e1a7dcf..44a1ebea 100644 --- a/desktop_version/src/editor.h +++ b/desktop_version/src/editor.h @@ -82,6 +82,7 @@ struct GhostInfo { int x; // .xp int y; // .yp int col; // .colour + Uint32 realcol; int frame; // .drawframe };