mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
Merge pull request #16067 from SandPoot/bad-math
Fixes hud rendering issues from math inaccuracies.
This commit is contained in:
@@ -108,7 +108,8 @@
|
|||||||
#define TORADIANS(degrees) ((degrees) * 0.0174532925)
|
#define TORADIANS(degrees) ((degrees) * 0.0174532925)
|
||||||
|
|
||||||
/// Gets shift x that would be required the bitflag (1<<x)
|
/// Gets shift x that would be required the bitflag (1<<x)
|
||||||
#define TOBITSHIFT(bit) ( log(2, bit) )
|
/// We need the round because log has floating-point inaccuracy, and if we undershoot at all on list indexing we'll get the wrong index.
|
||||||
|
#define TOBITSHIFT(bit) ( round(log(2, bit), 1) )
|
||||||
|
|
||||||
// Will filter out extra rotations and negative rotations
|
// Will filter out extra rotations and negative rotations
|
||||||
// E.g: 540 becomes 180. -180 becomes 180.
|
// E.g: 540 becomes 180. -180 becomes 180.
|
||||||
|
|||||||
@@ -231,7 +231,7 @@
|
|||||||
static_inventory += using
|
static_inventory += using
|
||||||
|
|
||||||
inv_box = new /atom/movable/screen/inventory()
|
inv_box = new /atom/movable/screen/inventory()
|
||||||
inv_box.name = "i_clothing"
|
inv_box.name = "uniform"
|
||||||
inv_box.icon = ui_style
|
inv_box.icon = ui_style
|
||||||
inv_box.slot_id = ITEM_SLOT_ICLOTHING
|
inv_box.slot_id = ITEM_SLOT_ICLOTHING
|
||||||
inv_box.icon_state = "uniform"
|
inv_box.icon_state = "uniform"
|
||||||
@@ -239,7 +239,7 @@
|
|||||||
toggleable_inventory += inv_box
|
toggleable_inventory += inv_box
|
||||||
|
|
||||||
inv_box = new /atom/movable/screen/inventory()
|
inv_box = new /atom/movable/screen/inventory()
|
||||||
inv_box.name = "o_clothing"
|
inv_box.name = "suit"
|
||||||
inv_box.icon = ui_style
|
inv_box.icon = ui_style
|
||||||
inv_box.slot_id = ITEM_SLOT_OCLOTHING
|
inv_box.slot_id = ITEM_SLOT_OCLOTHING
|
||||||
inv_box.icon_state = "suit"
|
inv_box.icon_state = "suit"
|
||||||
@@ -295,7 +295,7 @@
|
|||||||
static_inventory += inv_box
|
static_inventory += inv_box
|
||||||
|
|
||||||
inv_box = new /atom/movable/screen/inventory()
|
inv_box = new /atom/movable/screen/inventory()
|
||||||
inv_box.name = "storage1"
|
inv_box.name = "left pocket"
|
||||||
inv_box.icon = ui_style
|
inv_box.icon = ui_style
|
||||||
inv_box.icon_state = "pocket"
|
inv_box.icon_state = "pocket"
|
||||||
inv_box.screen_loc = ui_storage1
|
inv_box.screen_loc = ui_storage1
|
||||||
@@ -303,7 +303,7 @@
|
|||||||
static_inventory += inv_box
|
static_inventory += inv_box
|
||||||
|
|
||||||
inv_box = new /atom/movable/screen/inventory()
|
inv_box = new /atom/movable/screen/inventory()
|
||||||
inv_box.name = "storage2"
|
inv_box.name = "right pocket"
|
||||||
inv_box.icon = ui_style
|
inv_box.icon = ui_style
|
||||||
inv_box.icon_state = "pocket"
|
inv_box.icon_state = "pocket"
|
||||||
inv_box.screen_loc = ui_storage2
|
inv_box.screen_loc = ui_storage2
|
||||||
|
|||||||
Reference in New Issue
Block a user