-Fix (#166): do not select unit's original location after issuing target. https://github.com/OpenDUNE/OpenDUNE/pull/166 The function we need to change is void GUI_ChangeSelectionType(uint16 selectionType);There's a switch statement that looks something like: switch (oldSelectionType) { case SELECTIONTYPE_TARGET: case SELECTIONTYPE_PLACE: Map_SetSelection(g_structureActivePosition); /* Fall-through */ case SELECTIONTYPE_STRUCTURE: g_cursorDefaultSpriteID = 0; GUI_DisplayText(NULL, -1); break; ...}In the OpenDUNE patch, I simply made the SELECTIONTYPE_TARGET case jump to the SELECTIONTYPE_STRUCTURE code block. This function used to be called f__B4E9_0050_003F_292A. It was converted to C here: https://github.com/OpenDUNE/OpenDUNE/commit/e6fc7edb83fe169ef61a374551542acd7ba51631 Near l__00BD: emu_ip = emu_get_memory16(emu_cs, emu_bx, 0x33B);switch (emu_ip) { case 0x00DA: goto l__00DA; /* case SELECTIONTYPE_TARGET, SELECTIONTYPE_PLACE */ case 0x00E4: goto l__00E4; /* case SELECTIONTYPE_STRUCTURE */ case 0x00FE: goto l__00FE; /* case SELECTIONTYPE_UNIT */ case 0x0133: goto l__0133; /* case SELECTIONTYPE_MENTAT */ default: /* In case we don't know the call point yet, call the dynamic call */ emu_last_cs = 0xB4E9; emu_last_ip = 0x00D5; emu_last_length = 0x001D; emu_last_c emu_call(); return;}Near l__00DA: you find the call to emu_Map_SetSelection. Near l__00E4: you find the call to emu_GUI_DisplayText. Anyway, it looks like it jumps an offset given by an array indexed by the old selection type. The selection types are: typedef enum SelectionType { SELECTIONTYPE_MENTAT = 0, SELECTIONTYPE_TARGET = 1, SELECTIONTYPE_PLACE = 2, SELECTIONTYPE_UNIT = 3, SELECTIONTYPE_STRUCTURE = 4, ...} SelectionType;I tried to patch up that array: 33 01 DA 00 DA 00 E4 00 FE 00 -> 33 01 FE 00 DA 00 E4 00 FE 00 But that doesn't seem to work by itself. It might be because after issuing the target and just before calling this function, the active unit is set to NULL (see GUI_Widget_Viewport_Click).