PATH-199: Alert the user if he/she attempts to terraform while in Frozen mode.
parent
8208e4708f
commit
b76f036bf6
|
|
@ -52,6 +52,7 @@
|
|||
#include "llworld.h"
|
||||
#include "llappviewer.h"
|
||||
#include "llparcel.h"
|
||||
#include "llpathfindingmanager.h"
|
||||
|
||||
#include "llglheaders.h"
|
||||
|
||||
|
|
@ -244,6 +245,12 @@ void LLToolBrushLand::modifyLandInSelectionGlobal()
|
|||
alertNoTerraform(regionp);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!LLPathfindingManager::getInstance()->isAllowAlterPermanent())
|
||||
{
|
||||
alertNoTerraformWhileFrozen();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for(region_list_t::iterator iter = mLastAffectedRegions.begin();
|
||||
|
|
@ -382,6 +389,12 @@ BOOL LLToolBrushLand::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
if (!LLPathfindingManager::getInstance()->isAllowAlterPermanent())
|
||||
{
|
||||
alertNoTerraformWhileFrozen();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
LLVector3 pos_region = region_position.getPositionRegion();
|
||||
U32 grids = regionp->getLand().mGridsPerEdge;
|
||||
S32 i = llclamp( (S32)pos_region.mV[VX], 0, (S32)grids );
|
||||
|
|
@ -671,6 +684,12 @@ void LLToolBrushLand::alertNoTerraform(LLViewerRegion* regionp)
|
|||
|
||||
}
|
||||
|
||||
// static
|
||||
void LLToolBrushLand::alertNoTerraformWhileFrozen()
|
||||
{
|
||||
LLNotificationsUtil::add("RegionNoTerraformingWhileFrozen");
|
||||
}
|
||||
|
||||
///============================================================================
|
||||
/// Local function definitions
|
||||
///============================================================================
|
||||
|
|
|
|||
|
|
@ -86,6 +86,9 @@ protected:
|
|||
// Modal dialog that you can't terraform the region
|
||||
void alertNoTerraform(LLViewerRegion* regionp);
|
||||
|
||||
// Modal dialog that you can't terraform in frozen mode
|
||||
void alertNoTerraformWhileFrozen();
|
||||
|
||||
protected:
|
||||
F32 mStartingZ;
|
||||
S32 mMouseX;
|
||||
|
|
|
|||
|
|
@ -1276,6 +1276,14 @@ The region [REGION] does not allow terraforming.
|
|||
<tag>fail</tag>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="RegionNoTerraformingWhileFrozen"
|
||||
type="alertmodal">
|
||||
You cannot terraform land while in Frozen mode. Please switch to Unfrozen mode from the menu option Build->Pathfinding->Basic Setup.
|
||||
<tag>fail</tag>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="CannotCopyWarning"
|
||||
|
|
|
|||
Loading…
Reference in New Issue