Make use of mesh cost functions

This commit is contained in:
UbitUmarov
2012-09-17 15:37:05 +01:00
parent f79de2232e
commit 5915dfc26f
2 changed files with 13 additions and 24 deletions

View File

@@ -27,9 +27,6 @@ namespace OpenSim.Region.ClientStack.Linden
{
float ModelMinCost = 5.0f; // try to favor small meshs versus sculpts
// scale prices relative to basic cost
const float ModelCostScale = 1.0f;
const float primCreationCost = 0.01f; // 256 prims cost extra 2.56
// weigthed size to money convertion
@@ -70,7 +67,7 @@ namespace OpenSim.Region.ClientStack.Linden
{
totalcost = 0;
error = string.Empty;
if (resources == null ||
resources.instance_list == null ||
resources.instance_list.Array.Count == 0)
@@ -184,7 +181,8 @@ namespace OpenSim.Region.ClientStack.Linden
if (meshsfee < ModelMinCost)
meshsfee = ModelMinCost;
meshsfee *= ModelCostScale;
// scale cost with basic cost changes relative to 10
meshsfee *= (float)basicCost / 10.0f;
meshsfee += 0.5f; // rounding
totalcost += (int)meshsfee;