瀏覽代碼

Better positioning of the melee cursors.

OnionKnight 16 年之前
父節點
當前提交
ce86e88fa3
共有 1 個文件被更改,包括 30 次插入0 次删除
  1. 30 0
      client/CCursorHandler.cpp

+ 30 - 0
client/CCursorHandler.cpp

@@ -47,6 +47,36 @@ void CCursorHandler::draw1()
 	{
 		x-=16;
 		y-=16;
+
+		// Properly align the melee attack cursors.
+		if (mode == 1) {
+			switch (number) {
+				case 7: // Bottom left
+					x -= 6;
+					y += 16;
+					break;
+				case 8: // Left
+					x -= 16;
+					y += 11;
+					break;
+				case 9: // Top left
+					x -= 6;
+					y -= 6;
+					break;
+				case 10: // Top right
+					x += 16;
+					y -= 6;
+					break;
+				case 11: // Right
+					x += 16;
+					y += 11;
+					break;
+				case 12: // Bottom right
+					x += 16;
+					y += 16;
+					break;
+			}
+		}
 	}
 	else if(mode==0 && number>0)
 	{