Пример #1
0
U64 LLPanelRegionTools::getRegionFlags() const
{
	U64 flags = 0x0;
	flags = getChild<LLUICtrl>("check prelude")->getValue().asBoolean()  
					? set_prelude_flags(flags)
					: unset_prelude_flags(flags);

	// override prelude
	if (getChild<LLUICtrl>("check fixed sun")->getValue().asBoolean())
	{
		flags |= REGION_FLAGS_SUN_FIXED;
	}
	if (getChild<LLUICtrl>("check reset home")->getValue().asBoolean())
	{
		flags |= REGION_FLAGS_RESET_HOME_ON_TELEPORT;
	}
	if (getChild<LLUICtrl>("check visible")->getValue().asBoolean())
	{
		flags |= REGION_FLAGS_EXTERNALLY_VISIBLE;
	}
	if (getChild<LLUICtrl>("check damage")->getValue().asBoolean())
	{
		flags |= REGION_FLAGS_ALLOW_DAMAGE;
	}
	if (getChild<LLUICtrl>("block terraform")->getValue().asBoolean())
	{
		flags |= REGION_FLAGS_BLOCK_TERRAFORM;
	}
	if (getChild<LLUICtrl>("block dwell")->getValue().asBoolean())
	{
		flags |= REGION_FLAGS_BLOCK_DWELL;
	}
	if (getChild<LLUICtrl>("is sandbox")->getValue().asBoolean())
	{
		flags |= REGION_FLAGS_SANDBOX;
	}
	return flags;
}
Пример #2
0
U32 LLPanelRegionTools::getRegionFlagsMask() const
{
	U32 flags = 0xffffffff;
	flags = childGetValue("check prelude").asBoolean()
				? set_prelude_flags(flags)
				: unset_prelude_flags(flags);

	if (!childGetValue("check fixed sun").asBoolean())
	{
		flags &= ~REGION_FLAGS_SUN_FIXED;
	}
	if (!childGetValue("check reset home").asBoolean())
	{
		flags &= ~REGION_FLAGS_RESET_HOME_ON_TELEPORT;
	}
	if (!childGetValue("check visible").asBoolean())
	{
		flags &= ~REGION_FLAGS_EXTERNALLY_VISIBLE;
	}
	if (!childGetValue("check damage").asBoolean())
	{
		flags &= ~REGION_FLAGS_ALLOW_DAMAGE;
	}
	if (!childGetValue("block terraform").asBoolean())
	{
		flags &= ~REGION_FLAGS_BLOCK_TERRAFORM;
	}
	if (!childGetValue("block dwell").asBoolean())
	{
		flags &= ~REGION_FLAGS_BLOCK_DWELL;
	}
	if (!childGetValue("is sandbox").asBoolean())
	{
		flags &= ~REGION_FLAGS_SANDBOX;
	}
	return flags;
}