mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-12 08:00:55 +02:00
Fixed a bug were isometric units were placed at the wrong coords in the editor.
This commit is contained in:
@@ -1038,12 +1038,16 @@ int MapEditClass::Place_Object(void)
|
||||
** sub-position closest to the mouse & put him there
|
||||
*/
|
||||
if (PendingObject->What_Am_I() == RTTI_INFANTRYTYPE) {
|
||||
int isoMouseX, isoMouseY;
|
||||
isoMouseX = Get_Mouse_X();
|
||||
isoMouseY = Get_Mouse_Y();
|
||||
CellClass::ConvertIsoCoordsToScreen(isoMouseX, isoMouseY);
|
||||
|
||||
/*
|
||||
** Find cell sub-position
|
||||
*/
|
||||
if (Is_Spot_Free(Pixel_To_Coord(Get_Mouse_X(), Get_Mouse_Y()))) {
|
||||
obj_coord = Closest_Free_Spot(Pixel_To_Coord(Get_Mouse_X(), Get_Mouse_Y()));
|
||||
if (Is_Spot_Free(Pixel_To_Coord(isoMouseX, isoMouseY))) {
|
||||
obj_coord = Closest_Free_Spot(Pixel_To_Coord(isoMouseX, isoMouseY));
|
||||
} else {
|
||||
obj_coord = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user