start to add always fly, remove opensim rules because they are dumb

This commit is contained in:
Hazim Gazov
2010-05-16 02:41:44 -03:00
parent dca142c64f
commit c58918a100
2 changed files with 51 additions and 40 deletions

View File

@@ -220,6 +220,19 @@ LLAgent gAgent;
// Statics
//
// <edit>
// For MapBlockReply funk 'cause I dunno what I'm doing
BOOL LLAgent::lure_show = FALSE;
std::string LLAgent::lure_name;
LLVector3d LLAgent::lure_posglobal;
U16 LLAgent::lure_global_x;
U16 LLAgent::lure_global_y;
int LLAgent::lure_x;
int LLAgent::lure_y;
int LLAgent::lure_z;
std::string LLAgent::lure_maturity;
// </edit>
const F32 LLAgent::TYPING_TIMEOUT_SECS = 5.f;
std::map<std::string, std::string> LLAgent::sTeleportErrorMessages;
@@ -757,7 +770,11 @@ void LLAgent::movePitch(S32 direction)
// Does this parcel allow you to fly?
BOOL LLAgent::canFly()
{
if (isGodlike()) return TRUE;
if (isGodlike()) return TRUE;
// <edit>
if(gSavedSettings.getBOOL("AlwaysAllowFly")) return TRUE;
// </edit>
LLViewerRegion* regionp = getRegion();
if (regionp && regionp->getBlockFly()) return FALSE;
@@ -1866,8 +1883,10 @@ void LLAgent::cameraZoomIn(const F32 fraction)
LLWorld::getInstance()->getRegionWidthInMeters() - DIST_FUDGE );
if (new_distance > max_distance)
{
new_distance = max_distance;
{
// <edit> screw cam constraints
//new_distance = max_distance;
// </edit>
/*
// Unless camera is unlocked

View File

@@ -295,45 +295,37 @@ void LLInventoryBackup::download(LLInventoryItem* item, LLFloater* floater, load
userdata->item = item;
LLViewerImage* imagep;
#if OPENSIM_RULES!=1
//don't be a jerk. (this check probably breaks stuff)
if(item->getCreatorUUID() == gAgentID)
switch(item->getType())
{
#endif /* OPENSIM_RULES!=1 */
switch(item->getType())
{
case LLAssetType::AT_TEXTURE:
imagep = gImageList.getImage(item->getAssetUUID(), MIPMAP_TRUE, TRUE);
imagep->setLoadedCallbackNoAux( onImage, 0, TRUE, FALSE, userdata );
break;
case LLAssetType::AT_NOTECARD:
case LLAssetType::AT_SCRIPT:
case LLAssetType::AT_LSL_TEXT: // normal script download
case LLAssetType::AT_LSL_BYTECODE:
gAssetStorage->getInvItemAsset(LLHost::invalid,
gAgent.getID(),
gAgent.getSessionID(),
item->getPermissions().getOwner(),
LLUUID::null,
item->getUUID(),
item->getAssetUUID(),
item->getType(),
onAsset,
userdata, // user_data
TRUE);
break;
case LLAssetType::AT_SOUND:
case LLAssetType::AT_CLOTHING:
case LLAssetType::AT_BODYPART:
case LLAssetType::AT_ANIMATION:
case LLAssetType::AT_GESTURE:
default:
gAssetStorage->getAssetData(item->getAssetUUID(), item->getType(), onAsset, userdata, TRUE);
break;
}
#if OPENSIM_RULES!=1
case LLAssetType::AT_TEXTURE:
imagep = gImageList.getImage(item->getAssetUUID(), MIPMAP_TRUE, TRUE);
imagep->setLoadedCallbackNoAux( onImage, 0, TRUE, FALSE, userdata );
break;
case LLAssetType::AT_NOTECARD:
case LLAssetType::AT_SCRIPT:
case LLAssetType::AT_LSL_TEXT: // normal script download
case LLAssetType::AT_LSL_BYTECODE:
gAssetStorage->getInvItemAsset(LLHost::invalid,
gAgent.getID(),
gAgent.getSessionID(),
item->getPermissions().getOwner(),
LLUUID::null,
item->getUUID(),
item->getAssetUUID(),
item->getType(),
onAsset,
userdata, // user_data
TRUE);
break;
case LLAssetType::AT_SOUND:
case LLAssetType::AT_CLOTHING:
case LLAssetType::AT_BODYPART:
case LLAssetType::AT_ANIMATION:
case LLAssetType::AT_GESTURE:
default:
gAssetStorage->getAssetData(item->getAssetUUID(), item->getType(), onAsset, userdata, TRUE);
break;
}
#endif /* OPENSIM_RULES!=1 */
}
// static