Land impact shows 0 for low-weight mesh (truncation instead of the server's rounding) #781

Closed
opened 2026-10-15 07:07:05 +00:00 by sky_line · 0 comments
Owner

Owner saw a mesh road piece showing 0 land impact in the Edit window. Land impact is always a whole number on the server, so a 0 for a real object means the viewer's display rounding is wrong (or the value wasn't retrieved yet).

Cause (display)

Both displays truncate instead of rounding:

  • indra/newview/llfloatertools.cpp:663 -- selection_args["LAND_IMPACT"] = llformat("%.1d", (S32)link_cost);
  • indra/newview/llfloaterobjectweights.cpp:276 -- mSelectedOnLand->setText(llformat("%.1d", (S32)prim_equiv));

A cost of e.g. 0.7 displays as 0. (Inherited from LL's viewer.)

To decide before fixing

Match the server's rule exactly: rounding to nearest vs rounding up / a minimum of 1. Check with a low-weight mesh object: compare its Object Weights (download / physics / server, shown to 0.1) with the change in World > About Land > Objects when one copy is rezzed or deleted. Then use the same rule in both displays (and anywhere else that shows LI -- check the build floater's selection summary, the object weights floater, inventory/upload previews).

Also confirm the 0 isn't a not-yet-received cost (ObjectCost / resource cost fetch pending) shown as 0 rather than "...".

Owner saw a mesh road piece showing **0 land impact** in the Edit window. Land impact is always a whole number on the server, so a 0 for a real object means the viewer's display rounding is wrong (or the value wasn't retrieved yet). ## Cause (display) Both displays truncate instead of rounding: - `indra/newview/llfloatertools.cpp:663` -- `selection_args["LAND_IMPACT"] = llformat("%.1d", (S32)link_cost);` - `indra/newview/llfloaterobjectweights.cpp:276` -- `mSelectedOnLand->setText(llformat("%.1d", (S32)prim_equiv));` A cost of e.g. 0.7 displays as 0. (Inherited from LL's viewer.) ## To decide before fixing Match the server's rule exactly: rounding to nearest vs rounding up / a minimum of 1. Check with a low-weight mesh object: compare its Object Weights (download / physics / server, shown to 0.1) with the change in World > About Land > Objects when one copy is rezzed or deleted. Then use the same rule in both displays (and anywhere else that shows LI -- check the build floater's selection summary, the object weights floater, inventory/upload previews). Also confirm the 0 isn't a not-yet-received cost (ObjectCost / resource cost fetch pending) shown as 0 rather than "...".
sky_line added this to the Slipstream project 2026-10-15 07:07:05 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#781
No description provided.