mirror of
https://github.com/moparisthebest/minetest
synced 2024-12-22 23:58:48 -05: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;
|
pos.Y += stof(v_pos[1]) * (float) spacing.Y;
|
||||||
|
|
||||||
v2s32 geom;
|
v2s32 geom;
|
||||||
geom.X = stoi(v_geom[0]) * (float)imgsize.X;
|
geom.X = stof(v_geom[0]) * (float)imgsize.X;
|
||||||
geom.Y = stoi(v_geom[1]) * (float)imgsize.Y;
|
geom.Y = stof(v_geom[1]) * (float)imgsize.Y;
|
||||||
|
|
||||||
if(data->bp_set != 2)
|
if(data->bp_set != 2)
|
||||||
errorstream<<"WARNING: invalid use of item_image without a size[] element"<<std::endl;
|
errorstream<<"WARNING: invalid use of item_image without a size[] element"<<std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user