Revert "Added option to disable LLWind"

This reverts commit 0677acc8e3.
This commit is contained in:
Hazim Gazov
2010-04-17 00:18:34 -03:00
parent 0677acc8e3
commit 22b9bd1c2e
10 changed files with 148 additions and 209 deletions

View File

@@ -12692,16 +12692,5 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>UseLLWind</key>
<map>
<key>Comment</key>
<string>Disables LLWind's methods and returns nothing if enabled (saves FPS)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
</map>
</llsd>

View File

@@ -394,17 +394,6 @@
max_attachment_offset="2.0"
visible_in_first_person="true" />
<attachment_point
id="128"
group="8"
name="Jay Griff"
joint="mScreen"
position="0 0 0"
rotation="0 0 0"
hud="true"
max_attachment_offset="0.0"
visible_in_first_person="true" />
<param
id="32"
group="1"

View File

@@ -191,7 +191,6 @@
#include "llagentlanguage.h"
#include "llsocks5.h"
#include "jcfloaterareasearch.h"
#include "llwind.h"
#if LL_WINDOWS
#include "llwindebug.h"
@@ -2435,7 +2434,6 @@ bool idle_startup()
//---------------------------------------------------------------------
if (STATE_WORLD_INIT == LLStartUp::getStartupState())
{
gUseLLWind = gSavedSettings.getBOOL("UseLLWind");
set_startup_status(0.40f, LLTrans::getString("LoginInitializingWorld"), gAgent.mMOTD);
display_startup();
// We should have an agent id by this point.

View File

@@ -131,9 +131,6 @@ BOOL LLToolBar::postBuild()
childSetAction("radar_list_btn", onClickRadarList, this);
childSetControlName("radar_list_btn", "RadarListBtnState");
childSetAction("fly_btn", onClickFly, this);
childSetControlName("fly_btn", "FlyBtnState");
childSetAction("sit_btn", onClickSit, this);
childSetControlName("sit_btn", "SitBtnState");

View File

@@ -347,7 +347,7 @@ BOOL LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
return TRUE;
}
if (gSavedSettings.getBOOL("RenderAnimateTrees") && gUseLLWind)
if (gSavedSettings.getBOOL("RenderAnimateTrees"))
{
F32 mass_inv;
@@ -390,7 +390,7 @@ BOOL LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
}
}
if (!gSavedSettings.getBOOL("RenderAnimateTrees") || !gUseLLWind)
if (!gSavedSettings.getBOOL("RenderAnimateTrees"))
{
if (mReferenceBuffer.isNull())
{

View File

@@ -54,7 +54,6 @@
const F32 CLOUD_DIVERGENCE_COEF = 0.5f;
BOOL gUseLLWind;
//////////////////////////////////////////////////////////////////////
@@ -105,7 +104,7 @@ void LLWind::init()
void LLWind::decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp)
{
if (!mCloudDensityp || !gUseLLWind)
if (!mCloudDensityp)
{
return;
}
@@ -182,200 +181,172 @@ void LLWind::decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp)
LLVector3 LLWind::getAverage()
{
if(gUseLLWind)
// Returns in average_wind the average wind velocity
LLVector3 average(0.0f, 0.0f, 0.0f);
S32 i, grid_count;
grid_count = mSize * mSize;
for (i = 0; i < grid_count; i++)
{
// Returns in average_wind the average wind velocity
LLVector3 average(0.0f, 0.0f, 0.0f);
S32 i, grid_count;
grid_count = mSize * mSize;
for (i = 0; i < grid_count; i++)
{
average.mV[VX] += mVelX[i];
average.mV[VY] += mVelY[i];
}
average.mV[VX] += mVelX[i];
average.mV[VY] += mVelY[i];
}
average *= 1.f/((F32)(grid_count)) * WIND_SCALE_HACK;
return average;
}
else
{
return LLVector3(0, 0, 0);
}
average *= 1.f/((F32)(grid_count)) * WIND_SCALE_HACK;
return average;
}
LLVector3 LLWind::getVelocityNoisy(const LLVector3 &pos_region, const F32 dim)
{
if(gUseLLWind)
// Resolve a value, using fractal summing to perturb the returned value
LLVector3 r_val(0,0,0);
F32 norm = 1.0f;
if (dim == 8)
{
// Resolve a value, using fractal summing to perturb the returned value
LLVector3 r_val(0,0,0);
F32 norm = 1.0f;
if (dim == 8)
{
norm = 1.875;
}
else if (dim == 4)
{
norm = 1.75;
}
else if (dim == 2)
{
norm = 1.5;
}
norm = 1.875;
}
else if (dim == 4)
{
norm = 1.75;
}
else if (dim == 2)
{
norm = 1.5;
}
F32 temp_dim = dim;
while (temp_dim >= 1.0)
{
LLVector3 pos_region_scaled(pos_region * temp_dim);
r_val += getVelocity(pos_region_scaled) * (1.0f/temp_dim);
temp_dim /= 2.0;
}
return r_val * (1.0f/norm) * WIND_SCALE_HACK;
}
else
F32 temp_dim = dim;
while (temp_dim >= 1.0)
{
return LLVector3(0, 0, 0);
LLVector3 pos_region_scaled(pos_region * temp_dim);
r_val += getVelocity(pos_region_scaled) * (1.0f/temp_dim);
temp_dim /= 2.0;
}
return r_val * (1.0f/norm) * WIND_SCALE_HACK;
}
LLVector3 LLWind::getVelocity(const LLVector3 &pos_region)
{
if(gUseLLWind)
llassert(mSize == 16);
// Resolves value of wind at a location relative to SW corner of region
//
// Returns wind magnitude in X,Y components of vector3
LLVector3 r_val;
F32 dx,dy;
S32 k;
LLVector3 pos_clamped_region(pos_region);
F32 region_width_meters = LLWorld::getInstance()->getRegionWidthInMeters();
if (pos_clamped_region.mV[VX] < 0.f)
{
llassert(mSize == 16);
// Resolves value of wind at a location relative to SW corner of region
//
// Returns wind magnitude in X,Y components of vector3
LLVector3 r_val;
F32 dx,dy;
S32 k;
LLVector3 pos_clamped_region(pos_region);
F32 region_width_meters = LLWorld::getInstance()->getRegionWidthInMeters();
if (pos_clamped_region.mV[VX] < 0.f)
{
pos_clamped_region.mV[VX] = 0.f;
}
else if (pos_clamped_region.mV[VX] >= region_width_meters)
{
pos_clamped_region.mV[VX] = (F32) fmod(pos_clamped_region.mV[VX], region_width_meters);
}
if (pos_clamped_region.mV[VY] < 0.f)
{
pos_clamped_region.mV[VY] = 0.f;
}
else if (pos_clamped_region.mV[VY] >= region_width_meters)
{
pos_clamped_region.mV[VY] = (F32) fmod(pos_clamped_region.mV[VY], region_width_meters);
}
S32 i = llfloor(pos_clamped_region.mV[VX] * mSize / region_width_meters);
S32 j = llfloor(pos_clamped_region.mV[VY] * mSize / region_width_meters);
k = i + j*mSize;
dx = ((pos_clamped_region.mV[VX] * mSize / region_width_meters) - (F32) i);
dy = ((pos_clamped_region.mV[VY] * mSize / region_width_meters) - (F32) j);
if ((i < mSize-1) && (j < mSize-1))
{
// Interior points, no edges
r_val.mV[VX] = mVelX[k]*(1.0f - dx)*(1.0f - dy) +
mVelX[k + 1]*dx*(1.0f - dy) +
mVelX[k + mSize]*dy*(1.0f - dx) +
mVelX[k + mSize + 1]*dx*dy;
r_val.mV[VY] = mVelY[k]*(1.0f - dx)*(1.0f - dy) +
mVelY[k + 1]*dx*(1.0f - dy) +
mVelY[k + mSize]*dy*(1.0f - dx) +
mVelY[k + mSize + 1]*dx*dy;
}
else
{
r_val.mV[VX] = mVelX[k];
r_val.mV[VY] = mVelY[k];
}
r_val.mV[VZ] = 0.f;
return r_val * WIND_SCALE_HACK;
pos_clamped_region.mV[VX] = 0.f;
}
else
else if (pos_clamped_region.mV[VX] >= region_width_meters)
{
return LLVector3(0, 0, 0);
pos_clamped_region.mV[VX] = (F32) fmod(pos_clamped_region.mV[VX], region_width_meters);
}
if (pos_clamped_region.mV[VY] < 0.f)
{
pos_clamped_region.mV[VY] = 0.f;
}
else if (pos_clamped_region.mV[VY] >= region_width_meters)
{
pos_clamped_region.mV[VY] = (F32) fmod(pos_clamped_region.mV[VY], region_width_meters);
}
S32 i = llfloor(pos_clamped_region.mV[VX] * mSize / region_width_meters);
S32 j = llfloor(pos_clamped_region.mV[VY] * mSize / region_width_meters);
k = i + j*mSize;
dx = ((pos_clamped_region.mV[VX] * mSize / region_width_meters) - (F32) i);
dy = ((pos_clamped_region.mV[VY] * mSize / region_width_meters) - (F32) j);
if ((i < mSize-1) && (j < mSize-1))
{
// Interior points, no edges
r_val.mV[VX] = mVelX[k]*(1.0f - dx)*(1.0f - dy) +
mVelX[k + 1]*dx*(1.0f - dy) +
mVelX[k + mSize]*dy*(1.0f - dx) +
mVelX[k + mSize + 1]*dx*dy;
r_val.mV[VY] = mVelY[k]*(1.0f - dx)*(1.0f - dy) +
mVelY[k + 1]*dx*(1.0f - dy) +
mVelY[k + mSize]*dy*(1.0f - dx) +
mVelY[k + mSize + 1]*dx*dy;
}
else
{
r_val.mV[VX] = mVelX[k];
r_val.mV[VY] = mVelY[k];
}
r_val.mV[VZ] = 0.f;
return r_val * WIND_SCALE_HACK;
}
LLVector3 LLWind::getCloudVelocity(const LLVector3 &pos_region)
{
if(gUseLLWind)
llassert(mSize == 16);
// Resolves value of wind at a location relative to SW corner of region
//
// Returns wind magnitude in X,Y components of vector3
LLVector3 r_val;
F32 dx,dy;
S32 k;
LLVector3 pos_clamped_region(pos_region);
F32 region_width_meters = LLWorld::getInstance()->getRegionWidthInMeters();
if (pos_clamped_region.mV[VX] < 0.f)
{
llassert(mSize == 16);
// Resolves value of wind at a location relative to SW corner of region
//
// Returns wind magnitude in X,Y components of vector3
LLVector3 r_val;
F32 dx,dy;
S32 k;
LLVector3 pos_clamped_region(pos_region);
F32 region_width_meters = LLWorld::getInstance()->getRegionWidthInMeters();
if (pos_clamped_region.mV[VX] < 0.f)
{
pos_clamped_region.mV[VX] = 0.f;
}
else if (pos_clamped_region.mV[VX] >= region_width_meters)
{
pos_clamped_region.mV[VX] = (F32) fmod(pos_clamped_region.mV[VX], region_width_meters);
}
if (pos_clamped_region.mV[VY] < 0.f)
{
pos_clamped_region.mV[VY] = 0.f;
}
else if (pos_clamped_region.mV[VY] >= region_width_meters)
{
pos_clamped_region.mV[VY] = (F32) fmod(pos_clamped_region.mV[VY], region_width_meters);
}
S32 i = llfloor(pos_clamped_region.mV[VX] * mSize / region_width_meters);
S32 j = llfloor(pos_clamped_region.mV[VY] * mSize / region_width_meters);
k = i + j*mSize;
dx = ((pos_clamped_region.mV[VX] * mSize / region_width_meters) - (F32) i);
dy = ((pos_clamped_region.mV[VY] * mSize / region_width_meters) - (F32) j);
if ((i < mSize-1) && (j < mSize-1))
{
// Interior points, no edges
r_val.mV[VX] = mCloudVelX[k]*(1.0f - dx)*(1.0f - dy) +
mCloudVelX[k + 1]*dx*(1.0f - dy) +
mCloudVelX[k + mSize]*dy*(1.0f - dx) +
mCloudVelX[k + mSize + 1]*dx*dy;
r_val.mV[VY] = mCloudVelY[k]*(1.0f - dx)*(1.0f - dy) +
mCloudVelY[k + 1]*dx*(1.0f - dy) +
mCloudVelY[k + mSize]*dy*(1.0f - dx) +
mCloudVelY[k + mSize + 1]*dx*dy;
}
else
{
r_val.mV[VX] = mCloudVelX[k];
r_val.mV[VY] = mCloudVelY[k];
}
r_val.mV[VZ] = 0.f;
return r_val * WIND_SCALE_HACK;
pos_clamped_region.mV[VX] = 0.f;
}
else
else if (pos_clamped_region.mV[VX] >= region_width_meters)
{
return LLVector3(0, 0, 0);
pos_clamped_region.mV[VX] = (F32) fmod(pos_clamped_region.mV[VX], region_width_meters);
}
if (pos_clamped_region.mV[VY] < 0.f)
{
pos_clamped_region.mV[VY] = 0.f;
}
else if (pos_clamped_region.mV[VY] >= region_width_meters)
{
pos_clamped_region.mV[VY] = (F32) fmod(pos_clamped_region.mV[VY], region_width_meters);
}
S32 i = llfloor(pos_clamped_region.mV[VX] * mSize / region_width_meters);
S32 j = llfloor(pos_clamped_region.mV[VY] * mSize / region_width_meters);
k = i + j*mSize;
dx = ((pos_clamped_region.mV[VX] * mSize / region_width_meters) - (F32) i);
dy = ((pos_clamped_region.mV[VY] * mSize / region_width_meters) - (F32) j);
if ((i < mSize-1) && (j < mSize-1))
{
// Interior points, no edges
r_val.mV[VX] = mCloudVelX[k]*(1.0f - dx)*(1.0f - dy) +
mCloudVelX[k + 1]*dx*(1.0f - dy) +
mCloudVelX[k + mSize]*dy*(1.0f - dx) +
mCloudVelX[k + mSize + 1]*dx*dy;
r_val.mV[VY] = mCloudVelY[k]*(1.0f - dx)*(1.0f - dy) +
mCloudVelY[k + 1]*dx*(1.0f - dy) +
mCloudVelY[k + mSize]*dy*(1.0f - dx) +
mCloudVelY[k + mSize + 1]*dx*dy;
}
else
{
r_val.mV[VX] = mCloudVelX[k];
r_val.mV[VY] = mCloudVelY[k];
}
r_val.mV[VZ] = 0.f;
return r_val * WIND_SCALE_HACK;
}

View File

@@ -42,7 +42,6 @@ class LLVector3;
class LLBitPack;
class LLGroupHeader;
extern BOOL gUseLLWind;
class LLWind
{
@@ -59,7 +58,6 @@ public:
void setCloudDensityPointer(F32 *densityp);
void setOriginGlobal(const LLVector3d &origin_global);
private:
S32 mSize;
F32 * mVelX;

View File

@@ -26,13 +26,12 @@
label_selected="Radar" left="0" name="radar_list_btn"
tool_tip="View a list of nearby avatars."
width="50" follows="left|right" user_resize="false"/>
<button bottom="0" font="SansSerif" height="24" label="Fly"
image_overlay="icn_toolbar_fly.tga" image_overlay_alignment="left"
<button bottom="0" font="SansSerif" height="24" label="Snapshot" left="0"
image_overlay="icn_toolbar_snapshot.tga" image_overlay_alignment="left"
image_selected="toolbar_btn_selected.tga"
image_unselected="toolbar_btn_enabled.tga"
image_disabled="toolbar_btn_disabled.tga" scale_image="true"
label_selected="Stop Flying" left="0" name="fly_btn"
tool_tip="Start flying. Use E/C or PgUp/PgDn to fly up and down."
name="snapshot_btn" tool_tip="Save a screen shot to disk or inventory."
width="50" follows="left|right" user_resize="false"/>
<button bottom="0" font="SansSerif" height="24" label="Search" left="0"
image_overlay="icn_toolbar_search.tga" image_overlay_alignment="left"

View File

@@ -740,13 +740,11 @@ class LinuxManifest(ViewerManifest):
try:
# --numeric-owner hides the username of the builder for
# security etc.
#I don't really care about this right now, disable it for a bit
# self.run_command("tar -C '%(dir)s' --numeric-owner -cjf "
# "'%(inst_path)s.tar.bz2' %(inst_name)s" % {
# 'dir': self.get_build_prefix(),
# 'inst_name': installer_name,
# 'inst_path':self.build_path_of(installer_name)})
print ''
self.run_command("tar -C '%(dir)s' --numeric-owner -cjf "
"'%(inst_path)s.tar.bz2' %(inst_name)s" % {
'dir': self.get_build_prefix(),
'inst_name': installer_name,
'inst_path':self.build_path_of(installer_name)})
finally:
self.run_command("mv '%(inst)s' '%(dst)s'" % {
'dst': self.get_dst_prefix(),