Adds snapping to edges for buildings

Allows to place buildings a bit faster and more perfectly aligned. Also
it helps to find a nearest placeable position in some cases.

Reviewed By: elexis
Comments By: Stan, wraitii
Differential Revision: https://code.wildfiregames.com/D2079
This was SVN commit r23330.
This commit is contained in:
vladislavbelov
2020-01-05 01:08:05 +00:00
parent cf7635f57b
commit a8f241da5d
13 changed files with 308 additions and 16 deletions
+2 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -298,6 +298,7 @@ template<> void ScriptInterface::ToJSVal<char[N]>(JSContext* cx, JS::MutableHand
ToJSVal(cx, ret, static_cast<const char*>(val)); \
}
TOJSVAL_CHAR(3)
TOJSVAL_CHAR(5)
TOJSVAL_CHAR(6)
TOJSVAL_CHAR(7)