mirror of
https://github.com/minetest/minetest.git
synced 2024-12-23 22:52:25 +01:00
Permit non-integer sizes for item_image[]
This commit is contained in:
parent
aebbcbf398
commit
07f444ed85
@ -621,8 +621,8 @@ void GUIFormSpecMenu::parseItemImage(parserData* data,std::string element)
|
||||
pos.Y += stof(v_pos[1]) * (float) spacing.Y;
|
||||
|
||||
v2s32 geom;
|
||||
geom.X = stoi(v_geom[0]) * (float)imgsize.X;
|
||||
geom.Y = stoi(v_geom[1]) * (float)imgsize.Y;
|
||||
geom.X = stof(v_geom[0]) * (float)imgsize.X;
|
||||
geom.Y = stof(v_geom[1]) * (float)imgsize.Y;
|
||||
|
||||
if(data->bp_set != 2)
|
||||
errorstream<<"WARNING: invalid use of item_image without a size[] element"<<std::endl;
|
||||
|
Loading…
Reference in New Issue
Block a user