Fixed the move thing. The units moves to the right pixel now

This commit is contained in:
Ziver Koc 2007-04-15 19:09:56 +00:00
parent 59a7b0299f
commit 5d07cd2dee

View file

@ -52,9 +52,9 @@ public class Map {
* @param y y pos * @param y y pos
* @return The coordinate of the pos * @return The coordinate of the pos
*/ */
public Vector2f getPixelByPos(float x, float y){ public Vector2f getPixelByPos(int x, int y){
x = (int)(POS_SIZE*x*1.2f); x = (int)(POS_SIZE*x);
y = (int)(POS_SIZE*y*1.2f); y = (int)(POS_SIZE*y);
return new Vector2f((int)x,(int)y); return new Vector2f((int)x,(int)y);
} }