summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorKelly Washington <kelly@lindenlab.com>2008-04-03 22:50:22 +0000
committerKelly Washington <kelly@lindenlab.com>2008-04-03 22:50:22 +0000
commitdc48f1c7417f0f49ad1bd32330845ce17a29eece (patch)
tree8772aff5f32c1702228b7ca7e324fbd077269854 /indra/newview
parentb5936a4b1d8780b5b8cd425998eacd2c64ffa693 (diff)
svn merge -r83872:83893 linden/branches/Branch_1-20-0-Server to linden/release
HAVOK4 IN TEH HOUSE!!11!!ONE!! If it is broken blame Joel for not fixing the loginassetdatabaseinventorygroupIM server instead of working on this. QAR-448
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/keywords.ini2
-rw-r--r--[-rwxr-xr-x]indra/newview/linux_tools/handle_secondlifeprotocol.sh0
-rw-r--r--[-rwxr-xr-x]indra/newview/linux_tools/register_secondlifeprotocol.sh0
-rw-r--r--indra/newview/llagent.cpp6
-rw-r--r--indra/newview/llagent.h4
-rw-r--r--indra/newview/llappviewer.cpp13
-rw-r--r--indra/newview/llflexibleobject.cpp2
-rw-r--r--indra/newview/llglsandbox.cpp2
-rw-r--r--indra/newview/llhudeffect.cpp2
-rw-r--r--indra/newview/llhudeffectbeam.cpp2
-rw-r--r--indra/newview/llhudeffectlookat.cpp2
-rw-r--r--indra/newview/llmanipscale.cpp16
-rw-r--r--indra/newview/llmaniptranslate.cpp2
-rw-r--r--indra/newview/llpanelobject.cpp7
-rw-r--r--indra/newview/llstartup.cpp73
-rw-r--r--indra/newview/llviewercamera.cpp2
-rw-r--r--indra/newview/llviewerjoint.cpp2
-rw-r--r--indra/newview/llviewermenu.cpp6
-rw-r--r--indra/newview/llviewermessage.cpp18
-rw-r--r--indra/newview/llviewerobject.cpp61
-rw-r--r--indra/newview/llviewerobject.h2
-rw-r--r--indra/newview/llviewerpartsim.cpp2
-rw-r--r--indra/newview/llviewerstats.h8
-rw-r--r--indra/newview/llviewerwindow.cpp2
-rw-r--r--indra/newview/llvotextbubble.cpp2
-rw-r--r--indra/newview/llvovolume.cpp6
-rw-r--r--indra/newview/llvowater.cpp1
-rw-r--r--indra/newview/llworld.cpp5
-rw-r--r--indra/newview/llworld.h2
-rw-r--r--indra/newview/macview_Prefix.h2
30 files changed, 168 insertions, 86 deletions
diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini
index 961e86c6cb..9a8b1f7537 100644
--- a/indra/newview/app_settings/keywords.ini
+++ b/indra/newview/app_settings/keywords.ini
@@ -339,7 +339,7 @@ PRIM_FLEXIBLE Sets primitive flexibility to TRUE or FALSE
PRIM_POINT_LIGHT Sets light emission to TRUE or FALSE
PRIM_TEMP_ON_REZ Sets temporay on rez to TRUE or FALSE
PRIM_PHANTOM Sets phantom to TRUE or FALSE
-PRIM_CAST_SHADOWS Enables or disables shadow casting for the primitive
+PRIM_CAST_SHADOWS DEPRECATED. Takes 1 parameter, an integer, but has no effect when set and always returns 0 if used in llGetPrimitiveParams.
PRIM_POSITION Sets primitive position to a vector position
PRIM_SIZE Sets primitive size to a vector size
PRIM_ROTATION Sets primitive rotation
diff --git a/indra/newview/linux_tools/handle_secondlifeprotocol.sh b/indra/newview/linux_tools/handle_secondlifeprotocol.sh
index 7ff86d1b93..7ff86d1b93 100755..100644
--- a/indra/newview/linux_tools/handle_secondlifeprotocol.sh
+++ b/indra/newview/linux_tools/handle_secondlifeprotocol.sh
diff --git a/indra/newview/linux_tools/register_secondlifeprotocol.sh b/indra/newview/linux_tools/register_secondlifeprotocol.sh
index 4ab96f97d6..4ab96f97d6 100755..100644
--- a/indra/newview/linux_tools/register_secondlifeprotocol.sh
+++ b/indra/newview/linux_tools/register_secondlifeprotocol.sh
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index d00dfef478..2f5589a966 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -92,7 +92,7 @@
#include "llquantize.h"
#include "llselectmgr.h"
#include "llsky.h"
-#include "llsphere.h"
+#include "llrendersphere.h"
#include "llstatusbar.h"
#include "llimview.h"
#include "lltool.h"
@@ -1907,7 +1907,7 @@ void LLAgent::cameraOrbitIn(const F32 meters)
if( CAMERA_MODE_CUSTOMIZE_AVATAR == getCameraMode() )
{
- llclamp( new_distance, APPEARANCE_MIN_ZOOM, APPEARANCE_MAX_ZOOM );
+ new_distance = llclamp( new_distance, APPEARANCE_MIN_ZOOM, APPEARANCE_MAX_ZOOM );
}
// Compute new camera offset
@@ -6891,7 +6891,7 @@ void LLAgent::sendAgentSetAppearance()
msg->addUUIDFast(_PREHASH_AgentID, getID());
msg->addUUIDFast(_PREHASH_SessionID, getSessionID());
- // correct for the collisiton tolerance (to make it look like the
+ // correct for the collision tolerance (to make it look like the
// agent is actually walking on the ground/object)
// NOTE -- when we start correcting all of the other Havok geometry
// to compensate for the COLLISION_TOLERANCE ugliness we will have
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 50830a75f0..1a7d239288 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -181,7 +181,7 @@ public:
void updateCamera(); // call once per frame to update camera location/orientation
void resetCamera(); // slam camera into its default position
void setupSitCamera();
- void setCameraCollidePlane(LLVector4 &plane) { mCameraCollidePlane = plane; }
+ void setCameraCollidePlane(const LLVector4 &plane) { mCameraCollidePlane = plane; }
void changeCameraToDefault();
void changeCameraToMouselook(BOOL animate = TRUE);
@@ -428,7 +428,7 @@ public:
U32 getControlFlags();
void setControlFlags(U32 mask); // performs bitwise mControlFlags |= mask
- void clearControlFlags(U32 mask); // performs bitwise mControlFlags &= mask
+ void clearControlFlags(U32 mask); // performs bitwise mControlFlags &= ~mask
BOOL controlFlagsDirty() const;
void enableControlFlagReset();
void resetControlFlags();
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 502160716e..fc092e5cba 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -32,6 +32,7 @@
#include "llviewerprecompiledheaders.h"
#include "llappviewer.h"
+#include "llprimitive.h"
#include "llversionviewer.h"
#include "llfeaturemanager.h"
@@ -1207,10 +1208,12 @@ bool LLAppViewer::cleanup()
gLcdScreen = NULL;
#endif
- if (!gVolumeMgr->cleanup())
+ LLVolumeMgr* volume_manager = LLPrimitive::getVolumeManager();
+ if (!volume_manager->cleanup())
{
llwarns << "Remaining references in the volume manager!" << llendflush;
}
+ LLPrimitive::cleanupVolumeManager();
LLViewerParcelMgr::cleanupGlobals();
@@ -1219,7 +1222,8 @@ bool LLAppViewer::cleanup()
//end_messaging_system();
LLFollowCamMgr::cleanupClass();
- LLVolumeMgr::cleanupClass();
+ //LLVolumeMgr::cleanupClass();
+ LLPrimitive::cleanupVolumeManager();
LLWorldMapView::cleanupClass();
LLUI::cleanupClass();
@@ -1766,7 +1770,10 @@ bool LLAppViewer::initConfiguration()
LLSplashScreen::show();
LLSplashScreen::update(splash_msg.str().c_str());
- LLVolumeMgr::initClass();
+ //LLVolumeMgr::initClass();
+ LLVolumeMgr* volume_manager = new LLVolumeMgr();
+ volume_manager->useMutex(); // LLApp and LLMutex magic must be manually enabled
+ LLPrimitive::setVolumeManager(volume_manager);
// Note: this is where we used to initialize LLFeatureManager::getInstance()->.
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index b700faeccc..c18dc069a4 100644
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -36,7 +36,7 @@
#include "llface.h"
#include "llflexibleobject.h"
#include "llglheaders.h"
-#include "llsphere.h"
+#include "llrendersphere.h"
#include "llviewerobject.h"
#include "llimagegl.h"
#include "llagent.h"
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index a29136214c..493b69f99e 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -53,7 +53,7 @@
#include "lltoolmgr.h"
#include "llselectmgr.h"
#include "llhudmanager.h"
-#include "llsphere.h"
+#include "llrendersphere.h"
#include "llviewerobjectlist.h"
#include "lltoolselectrect.h"
#include "llviewerwindow.h"
diff --git a/indra/newview/llhudeffect.cpp b/indra/newview/llhudeffect.cpp
index 1385141bd0..83fdb66fe5 100644
--- a/indra/newview/llhudeffect.cpp
+++ b/indra/newview/llhudeffect.cpp
@@ -36,7 +36,7 @@
#include "message.h"
#include "llgl.h"
#include "llagent.h"
-#include "llsphere.h"
+#include "llrendersphere.h"
#include "llimagegl.h"
#include "llviewerobjectlist.h"
diff --git a/indra/newview/llhudeffectbeam.cpp b/indra/newview/llhudeffectbeam.cpp
index 613a234ba5..9fae0e3387 100644
--- a/indra/newview/llhudeffectbeam.cpp
+++ b/indra/newview/llhudeffectbeam.cpp
@@ -43,7 +43,7 @@
#include "llglheaders.h"
#include "llhudrender.h"
#include "llimagegl.h"
-#include "llsphere.h"
+#include "llrendersphere.h"
#include "llviewercamera.h"
#include "llvoavatar.h"
#include "llviewercontrol.h"
diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp
index 920a1caaf3..613f310b08 100644
--- a/indra/newview/llhudeffectlookat.cpp
+++ b/indra/newview/llhudeffectlookat.cpp
@@ -40,7 +40,7 @@
#include "llvoavatar.h"
#include "lldrawable.h"
#include "llviewerobjectlist.h"
-#include "llsphere.h"
+#include "llrendersphere.h"
#include "llselectmgr.h"
#include "llglheaders.h"
diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp
index cd9cd83968..a2d6909b28 100644
--- a/indra/newview/llmanipscale.cpp
+++ b/indra/newview/llmanipscale.cpp
@@ -962,8 +962,8 @@ void LLManipScale::dragCorner( S32 x, S32 y )
mInSnapRegime = FALSE;
}
- F32 max_scale_factor = MAX_OBJECT_SCALE / MIN_OBJECT_SCALE;
- F32 min_scale_factor = MIN_OBJECT_SCALE / MAX_OBJECT_SCALE;
+ F32 max_scale_factor = DEFAULT_MAX_PRIM_SCALE / MIN_PRIM_SCALE;
+ F32 min_scale_factor = MIN_PRIM_SCALE / DEFAULT_MAX_PRIM_SCALE;
// find max and min scale factors that will make biggest object hit max absolute scale and smallest object hit min absolute scale
for (LLObjectSelection::iterator iter = mObjectSelection->begin();
@@ -975,10 +975,10 @@ void LLManipScale::dragCorner( S32 x, S32 y )
{
const LLVector3& scale = selectNode->mSavedScale;
- F32 cur_max_scale_factor = llmin( MAX_OBJECT_SCALE / scale.mV[VX], MAX_OBJECT_SCALE / scale.mV[VY], MAX_OBJECT_SCALE / scale.mV[VZ] );
+ F32 cur_max_scale_factor = llmin( DEFAULT_MAX_PRIM_SCALE / scale.mV[VX], DEFAULT_MAX_PRIM_SCALE / scale.mV[VY], DEFAULT_MAX_PRIM_SCALE / scale.mV[VZ] );
max_scale_factor = llmin( max_scale_factor, cur_max_scale_factor );
- F32 cur_min_scale_factor = llmax( MIN_OBJECT_SCALE / scale.mV[VX], MIN_OBJECT_SCALE / scale.mV[VY], MIN_OBJECT_SCALE / scale.mV[VZ] );
+ F32 cur_min_scale_factor = llmax( MIN_PRIM_SCALE / scale.mV[VX], MIN_PRIM_SCALE / scale.mV[VY], MIN_PRIM_SCALE / scale.mV[VZ] );
min_scale_factor = llmax( min_scale_factor, cur_min_scale_factor );
}
}
@@ -1270,7 +1270,7 @@ void LLManipScale::stretchFace( const LLVector3& drag_start_agent, const LLVecto
F32 denom = axis * dir_local;
F32 desired_delta_size = is_approx_zero(denom) ? 0.f : (delta_local_mag / denom); // in meters
- F32 desired_scale = llclamp(selectNode->mSavedScale.mV[axis_index] + desired_delta_size, MIN_OBJECT_SCALE, MAX_OBJECT_SCALE);
+ F32 desired_scale = llclamp(selectNode->mSavedScale.mV[axis_index] + desired_delta_size, MIN_PRIM_SCALE, DEFAULT_MAX_PRIM_SCALE);
// propagate scale constraint back to position offset
desired_delta_size = desired_scale - selectNode->mSavedScale.mV[axis_index]; // propagate constraint back to position
@@ -1968,7 +1968,7 @@ F32 LLManipScale::partToMaxScale( S32 part, const LLBBox &bbox ) const
max_extent = bbox_extents.mV[i];
}
}
- max_scale_factor = bbox_extents.magVec() * MAX_OBJECT_SCALE / max_extent;
+ max_scale_factor = bbox_extents.magVec() * DEFAULT_MAX_PRIM_SCALE / max_extent;
if (getUniform())
{
@@ -1983,7 +1983,7 @@ F32 LLManipScale::partToMinScale( S32 part, const LLBBox &bbox ) const
{
LLVector3 bbox_extents = unitVectorToLocalBBoxExtent( partToUnitVector( part ), bbox );
bbox_extents.abs();
- F32 min_extent = MAX_OBJECT_SCALE;
+ F32 min_extent = DEFAULT_MAX_PRIM_SCALE;
for (U32 i = VX; i <= VZ; i++)
{
if (bbox_extents.mV[i] > 0.f && bbox_extents.mV[i] < min_extent)
@@ -1991,7 +1991,7 @@ F32 LLManipScale::partToMinScale( S32 part, const LLBBox &bbox ) const
min_extent = bbox_extents.mV[i];
}
}
- F32 min_scale_factor = bbox_extents.magVec() * MIN_OBJECT_SCALE / min_extent;
+ F32 min_scale_factor = bbox_extents.magVec() * MIN_PRIM_SCALE / min_extent;
if (getUniform())
{
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index 9856b47830..c55f9f806a 100644
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -53,7 +53,7 @@
#include "llhudrender.h"
#include "llresmgr.h"
#include "llselectmgr.h"
-#include "llsphere.h"
+#include "llrendersphere.h"
#include "llstatusbar.h"
#include "lltoolmgr.h"
#include "llviewercamera.h"
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index 83f72160e1..d6ac5908dc 100644
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -1666,15 +1666,8 @@ void LLPanelObject::sendPosition()
mObject->setPositionEdit(newpos);
}
LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_POSITION);
- //mRootObject->sendPositionUpdate();
LLSelectMgr::getInstance()->updateSelectionCenter();
-
-// llinfos << "position sent" << llendl;
- }
- else
- {
-// llinfos << "position not changed" << llendl;
}
}
else
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 331d13d85d..fb692d257b 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -3263,6 +3263,41 @@ void init_stat_view()
stat_barp->mDisplayBar = FALSE;
stat_barp->mDisplayMean = FALSE;
+ LLStatView *phys_details_viewp;
+ phys_details_viewp = new LLStatView("phys detail view", "Physics Details", "", rect);
+ sim_statviewp->addChildAtEnd(phys_details_viewp);
+
+ stat_barp = phys_details_viewp->addStat("Pinned Objects", &(LLViewerStats::getInstance()->mPhysicsPinnedTasks));
+ stat_barp->mPrecision = 0;
+ stat_barp->mMinBar = 0.f;
+ stat_barp->mMaxBar = 500.f;
+ stat_barp->mTickSpacing = 10.f;
+ stat_barp->mLabelSpacing = 40.f;
+ stat_barp->mPerSec = FALSE;
+ stat_barp->mDisplayBar = FALSE;
+ stat_barp->mDisplayMean = FALSE;
+
+ stat_barp = phys_details_viewp->addStat("Low LOD Objects", &(LLViewerStats::getInstance()->mPhysicsLODTasks));
+ stat_barp->mPrecision = 0;
+ stat_barp->mMinBar = 0.f;
+ stat_barp->mMaxBar = 500.f;
+ stat_barp->mTickSpacing = 10.f;
+ stat_barp->mLabelSpacing = 40.f;
+ stat_barp->mPerSec = FALSE;
+ stat_barp->mDisplayBar = FALSE;
+ stat_barp->mDisplayMean = FALSE;
+
+ stat_barp = phys_details_viewp->addStat("Memory Allocated", &(LLViewerStats::getInstance()->mPhysicsMemoryAllocated));
+ stat_barp->setUnitLabel(" MB");
+ stat_barp->mPrecision = 0;
+ stat_barp->mMinBar = 0.f;
+ stat_barp->mMaxBar = 1024.f;
+ stat_barp->mTickSpacing = 128.f;
+ stat_barp->mLabelSpacing = 256.f;
+ stat_barp->mPerSec = FALSE;
+ stat_barp->mDisplayBar = FALSE;
+ stat_barp->mDisplayMean = FALSE;
+
stat_barp = sim_statviewp->addStat("Agent Updates/Sec", &(LLViewerStats::getInstance()->mSimAgentUPS));
stat_barp->mPrecision = 1;
stat_barp->mMinBar = 0.f;
@@ -3424,6 +3459,44 @@ void init_stat_view()
stat_barp->mDisplayBar = FALSE;
stat_barp->mDisplayMean = FALSE;
+ LLStatView *physics_time_viewp;
+ physics_time_viewp = new LLStatView("physics perf view", "Physics Details (ms)", "", rect);
+ sim_time_viewp->addChildAtEnd(physics_time_viewp);
+ {
+ stat_barp = physics_time_viewp->addStat("Physics Step", &(LLViewerStats::getInstance()->mSimSimPhysicsStepMsec));
+ stat_barp->setUnitLabel("ms");
+ stat_barp->mPrecision = 1;
+ stat_barp->mMinBar = 0.f;
+ stat_barp->mMaxBar = 40.f;
+ stat_barp->mTickSpacing = 10.f;
+ stat_barp->mLabelSpacing = 20.f;
+ stat_barp->mPerSec = FALSE;
+ stat_barp->mDisplayBar = FALSE;
+ stat_barp->mDisplayMean = FALSE;
+
+ stat_barp = physics_time_viewp->addStat("Update Shapes", &(LLViewerStats::getInstance()->mSimSimPhysicsShapeUpdateMsec));
+ stat_barp->setUnitLabel("ms");
+ stat_barp->mPrecision = 1;
+ stat_barp->mMinBar = 0.f;
+ stat_barp->mMaxBar = 40.f;
+ stat_barp->mTickSpacing = 10.f;
+ stat_barp->mLabelSpacing = 20.f;
+ stat_barp->mPerSec = FALSE;
+ stat_barp->mDisplayBar = FALSE;
+ stat_barp->mDisplayMean = FALSE;
+
+ stat_barp = physics_time_viewp->addStat("Other", &(LLViewerStats::getInstance()->mSimSimPhysicsOtherMsec));
+ stat_barp->setUnitLabel("ms");
+ stat_barp->mPrecision = 1;
+ stat_barp->mMinBar = 0.f;
+ stat_barp->mMaxBar = 40.f;
+ stat_barp->mTickSpacing = 10.f;
+ stat_barp->mLabelSpacing = 20.f;
+ stat_barp->mPerSec = FALSE;
+ stat_barp->mDisplayBar = FALSE;
+ stat_barp->mDisplayMean = FALSE;
+ }
+
stat_barp = sim_time_viewp->addStat("Sim Time (Other)", &(LLViewerStats::getInstance()->mSimSimOtherMsec));
stat_barp->setUnitLabel("ms");
stat_barp->mPrecision = 1;
diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp
index 517a02b4ad..8657f59ccb 100644
--- a/indra/newview/llviewercamera.cpp
+++ b/indra/newview/llviewercamera.cpp
@@ -168,7 +168,7 @@ void LLViewerCamera::calcProjection(const F32 far_distance) const
f = 1/tan(fov_y*0.5f);
- mProjectionMatrix.zero();
+ mProjectionMatrix.setZero();
mProjectionMatrix.mMatrix[0][0] = f/aspect;
mProjectionMatrix.mMatrix[1][1] = f;
mProjectionMatrix.mMatrix[2][2] = (z_far + z_near)/(z_near - z_far);
diff --git a/indra/newview/llviewerjoint.cpp b/indra/newview/llviewerjoint.cpp
index 04de6bed92..b1cad86a61 100644
--- a/indra/newview/llviewerjoint.cpp
+++ b/indra/newview/llviewerjoint.cpp
@@ -40,7 +40,7 @@
#include "llglimmediate.h"
#include "llmath.h"
#include "llglheaders.h"
-#include "llsphere.h"
+#include "llrendersphere.h"
#include "llvoavatar.h"
#include "pipeline.h"
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 4d7ef5e2fd..4234d4862c 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -1193,7 +1193,6 @@ void init_debug_ui_menu(LLMenuGL* menu)
menu->append(new LLMenuItemCallGL( "Dump SelectMgr", &dump_select_mgr));
menu->append(new LLMenuItemCallGL( "Dump Inventory", &dump_inventory));
menu->append(new LLMenuItemCallGL( "Dump Focus Holder", &handle_dump_focus, NULL, NULL, 'F', MASK_ALT | MASK_CONTROL));
- menu->append(new LLMenuItemCallGL( "Dump VolumeMgr", &dump_volume_mgr, NULL, NULL));
menu->append(new LLMenuItemCallGL( "Print Selected Object Info", &print_object_info, NULL, NULL, 'P', MASK_CONTROL|MASK_SHIFT ));
menu->append(new LLMenuItemCallGL( "Print Agent Info", &print_agent_nvpairs, NULL, NULL, 'P', MASK_SHIFT ));
menu->append(new LLMenuItemCallGL( "Texture Memory Stats", &output_statistics, NULL, NULL, 'M', MASK_SHIFT | MASK_ALT | MASK_CONTROL));
@@ -5219,11 +5218,6 @@ void dump_select_mgr(void*)
LLSelectMgr::getInstance()->dump();
}
-void dump_volume_mgr(void*)
-{
- gVolumeMgr->dump();
-}
-
void dump_inventory(void*)
{
gInventory.dumpInventory();
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 938034a009..439063e439 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -3490,6 +3490,24 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data)
case LL_SIM_STAT_TOTAL_UNACKED_BYTES:
LLViewerStats::getInstance()->mSimTotalUnackedBytes.addValue(stat_value / 1024.f);
break;
+ case LL_SIM_STAT_PHYSICS_PINNED_TASKS:
+ LLViewerStats::getInstance()->mPhysicsPinnedTasks.addValue(stat_value);
+ break;
+ case LL_SIM_STAT_PHYSICS_LOD_TASKS:
+ LLViewerStats::getInstance()->mPhysicsLODTasks.addValue(stat_value);
+ break;
+ case LL_SIM_STAT_SIMPHYSICSSTEPMS:
+ LLViewerStats::getInstance()->mSimSimPhysicsStepMsec.addValue(stat_value);
+ break;
+ case LL_SIM_STAT_SIMPHYSICSSHAPEMS:
+ LLViewerStats::getInstance()->mSimSimPhysicsShapeUpdateMsec.addValue(stat_value);
+ break;
+ case LL_SIM_STAT_SIMPHYSICSOTHERMS:
+ LLViewerStats::getInstance()->mSimSimPhysicsOtherMsec.addValue(stat_value);
+ break;
+ case LL_SIM_STAT_SIMPHYSICSMEMORY:
+ LLViewerStats::getInstance()->mPhysicsMemoryAllocated.addValue(stat_value);
+ break;
default:
// llwarns << "Unknown stat id" << stat_id << llendl;
break;
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index d32eb6414c..30668172f1 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -67,7 +67,7 @@
#include "llfollowcam.h"
#include "llnetmap.h"
#include "llselectmgr.h"
-#include "llsphere.h"
+#include "llrendersphere.h"
#include "lltooldraganddrop.h"
#include "llviewercamera.h"
#include "llviewerimagelist.h"
@@ -202,7 +202,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
{
llassert(mRegionp);
- LLPrimitive::init(pcode);
+ LLPrimitive::init_primitive(pcode);
// CP: added 12/2/2005 - this was being initialised to 0, not the current frame time
mLastInterpUpdateSecs = LLFrameTimer::getElapsedSeconds();
@@ -723,6 +723,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
LLVector3 new_vel;
LLVector3 new_acc;
LLVector3 new_angv;
+ LLVector3 old_angv = getAngularVelocity();
LLQuaternion new_rot;
LLVector3 new_scale = getScale();
@@ -1857,7 +1858,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
}
}
- if (new_rot != mLastRot)
+ if (new_rot != mLastRot
+ || new_angv != old_angv)
{
mLastRot = new_rot;
setChanged(ROTATED | SILHOUETTE);
@@ -1974,7 +1976,7 @@ BOOL LLViewerObject::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
F32 dt_raw = (F32)(time - mLastInterpUpdateSecs);
F32 dt = mTimeDilation * dt_raw;
- if (!mUserSelected && !mJointInfo)
+ if (!mJointInfo)
{
applyAngularVelocity(dt);
}
@@ -2060,9 +2062,9 @@ BOOL LLViewerObject::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
else
{
// linear motion
- // HAVOK_TIMESTEP is used below to correct for the fact that the velocity in object
+ // PHYSICS_TIMESTEP is used below to correct for the fact that the velocity in object
// updates represents the average velocity of the last timestep, rather than the final velocity.
- // the time dilation above should guarrantee that dt is never less than HAVOK_TIMESTEP, theoretically
+ // the time dilation above should guarantee that dt is never less than PHYSICS_TIMESTEP, theoretically
//
// There is a problem here if dt is negative. . .
@@ -2074,7 +2076,7 @@ BOOL LLViewerObject::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
if (!(accel.isExactlyZero() && vel.isExactlyZero()))
{
- LLVector3 pos = (vel + (0.5f * (dt-HAVOK_TIMESTEP)) * accel) * dt;
+ LLVector3 pos = (vel + (0.5f * (dt-PHYSICS_TIMESTEP)) * accel) * dt;
// region local
setPositionRegion(pos + getPositionRegion());
@@ -3526,36 +3528,21 @@ void LLViewerObject::sendRotationUpdate() const
gMessageSystem->sendReliable( regionp->getHost() );
}
-// formerly send_object_position_global
-void LLViewerObject::sendPositionUpdate() const
-{
- gMessageSystem->newMessageFast(_PREHASH_ObjectPosition);
- gMessageSystem->nextBlockFast(_PREHASH_AgentData);
- gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
- gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
- gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, mLocalID );
- gMessageSystem->addVector3Fast(_PREHASH_Position, getPositionRegion());
- LLViewerRegion* regionp = getRegion();
- gMessageSystem->sendReliable(regionp->getHost());
-}
-
-
-//formerly send_object_scale
-void LLViewerObject::sendScaleUpdate()
-{
- gMessageSystem->newMessageFast(_PREHASH_ObjectScale);
- gMessageSystem->nextBlockFast(_PREHASH_AgentData);
- gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
- gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
- gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, mLocalID );
- gMessageSystem->addVector3Fast(_PREHASH_Scale, (getScale()));
-
- LLViewerRegion *regionp = getRegion();
- gMessageSystem->sendReliable(regionp->getHost() );
-}
-
+/* Obsolete, we use MultipleObjectUpdate instead
+//// formerly send_object_position_global
+//void LLViewerObject::sendPositionUpdate() const
+//{
+// gMessageSystem->newMessageFast(_PREHASH_ObjectPosition);
+// gMessageSystem->nextBlockFast(_PREHASH_AgentData);
+// gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
+// gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+// gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
+// gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, mLocalID );
+// gMessageSystem->addVector3Fast(_PREHASH_Position, getPositionRegion());
+// LLViewerRegion* regionp = getRegion();
+// gMessageSystem->sendReliable(regionp->getHost());
+//}
+*/
//formerly send_object_shape(LLViewerObject *object)
void LLViewerObject::sendShapeUpdate()
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 06cf2b2266..20616b32d6 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -268,7 +268,6 @@ public:
void setPositionAgent(const LLVector3 &pos_agent, BOOL damped = FALSE);
void setPositionParent(const LLVector3 &pos_parent, BOOL damped = FALSE);
void setPositionAbsoluteGlobal( const LLVector3d &pos_global, BOOL damped = FALSE );
- void sendPositionUpdate() const;
virtual const LLMatrix4& getWorldMatrix(LLXformMatrix* xform) const { return xform->getWorldMatrix(); }
@@ -303,7 +302,6 @@ public:
void sendTEUpdate() const; // Sends packed representation of all texture entry information
virtual void setScale(const LLVector3 &scale, BOOL damped = FALSE);
- void sendScaleUpdate();
void sendShapeUpdate();
diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp
index 6cfef5b18f..ccf7a5d1d7 100644
--- a/indra/newview/llviewerpartsim.cpp
+++ b/indra/newview/llviewerpartsim.cpp
@@ -243,7 +243,7 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt)
S32 i;
F32 dt;
- LLVector3 gravity(0.f, 0.f, -9.8f);
+ LLVector3 gravity(0.f, 0.f, GRAVITY);
LLViewerRegion *regionp = getRegion();
S32 end = (S32) mParticles.size();
diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h
index 819438832d..bd16e61149 100644
--- a/indra/newview/llviewerstats.h
+++ b/indra/newview/llviewerstats.h
@@ -69,6 +69,11 @@ public:
LLStat mSimNetMsec;
LLStat mSimSimOtherMsec;
LLStat mSimSimPhysicsMsec;
+
+ LLStat mSimSimPhysicsStepMsec;
+ LLStat mSimSimPhysicsShapeUpdateMsec;
+ LLStat mSimSimPhysicsOtherMsec;
+
LLStat mSimAgentMsec;
LLStat mSimImagesMsec;
LLStat mSimScriptMsec;
@@ -86,6 +91,9 @@ public:
LLStat mSimPendingLocalUploads;
LLStat mSimTotalUnackedBytes;
+ LLStat mPhysicsPinnedTasks;
+ LLStat mPhysicsLODTasks;
+ LLStat mPhysicsMemoryAllocated;
/*
LLStat mSimCPUUsageStat;
LLStat mSimMemTotalStat;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 5c3128b8e0..697aea8582 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -131,7 +131,7 @@
#include "llresmgr.h"
#include "llrootview.h"
#include "llselectmgr.h"
-#include "llsphere.h"
+#include "llrendersphere.h"
#include "llstartup.h"
#include "llstatusbar.h"
#include "llstatview.h"
diff --git a/indra/newview/llvotextbubble.cpp b/indra/newview/llvotextbubble.cpp
index 775b1ec61d..b48a5a989c 100644
--- a/indra/newview/llvotextbubble.cpp
+++ b/indra/newview/llvotextbubble.cpp
@@ -36,7 +36,7 @@
#include "imageids.h"
#include "llviewercontrol.h"
#include "llprimitive.h"
-#include "llsphere.h"
+#include "llrendersphere.h"
#include "llagent.h"
#include "llbox.h"
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index a1b3c32e01..2b8cf93b2d 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -83,8 +83,8 @@ LLVOVolume::LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *re
mVolumeImpl(NULL)
{
mTexAnimMode = 0;
- mRelativeXform.identity();
- mRelativeXformInvTrans.identity();
+ mRelativeXform.setIdentity();
+ mRelativeXformInvTrans.setIdentity();
mLOD = MIN_LOD;
mTextureAnimp = NULL;
@@ -326,7 +326,7 @@ void LLVOVolume::animateTextures()
}
LLMatrix4& tex_mat = *facep->mTextureMatrix;
- tex_mat.identity();
+ tex_mat.setIdentity();
tex_mat.translate(LLVector3(-0.5f, -0.5f, 0.f));
tex_mat.rotate(quat);
diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp
index 8755a5ae4a..3cc834d323 100644
--- a/indra/newview/llvowater.cpp
+++ b/indra/newview/llvowater.cpp
@@ -67,7 +67,6 @@ const U32 N_RES_HALF = (N_RES >> 1);
const U32 WIDTH = (N_RES * WAVE_STEP); //128.f //64 // width of wave tile, in meters
const F32 WAVE_STEP_INV = (1. / WAVE_STEP);
-const F32 g = 9.81f; // gravitational constant (m/s^2)
LLVOWater::LLVOWater(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
: LLStaticViewerObject(id, LL_VO_WATER, regionp)
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 923b45fc5a..ca947bed97 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -527,6 +527,11 @@ F32 LLWorld::resolveStepHeightGlobal(const LLVOAvatar* avatarp, const LLVector3d
intersection.mdV[VZ] -= norm_dist_from_plane * segment_length;
intersection_normal = foot_plane_normal;
}
+ else
+ {
+ intersection = land_intersection;
+ intersection_normal = resolveLandNormalGlobal(land_intersection);
+ }
}
return normalized_land_distance;
diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h
index cb6102268e..9dd90480b6 100644
--- a/indra/newview/llworld.h
+++ b/indra/newview/llworld.h
@@ -113,7 +113,7 @@ public:
// region X and Y size in meters
F32 getRegionWidthInMeters() const { return mWidthInMeters; }
F32 getRegionMinHeight() const { return -mWidthInMeters; }
- F32 getRegionMaxHeight() const { return 3.f*mWidthInMeters; }
+ F32 getRegionMaxHeight() const { return MAX_OBJECT_Z; }
void updateRegions(F32 max_update_time);
void updateVisibilities();
diff --git a/indra/newview/macview_Prefix.h b/indra/newview/macview_Prefix.h
index ac19cd924e..b6dcc1d127 100644
--- a/indra/newview/macview_Prefix.h
+++ b/indra/newview/macview_Prefix.h
@@ -82,7 +82,7 @@
#include "llmoveview.h"
#include "llselectmgr.h"
#include "llsky.h"
-#include "llsphere.h"
+#include "llrendersphere.h"
#include "llstatusbar.h"
#include "lltalkview.h"
#include "lltool.h"