bool Action::configureEvent(const pugi::xml_node& node)
{
	pugi::xml_attribute allowFarUseAttr = node.attribute("allowfaruse");
	if (allowFarUseAttr) {
		setAllowFarUse(allowFarUseAttr.as_bool());
	}

	pugi::xml_attribute blockWallsAttr = node.attribute("blockwalls");
	if (blockWallsAttr) {
		setCheckLineOfSight(blockWallsAttr.as_bool());
	}
	return true;
}
Beispiel #2
0
bool Action::configureEvent(xmlNodePtr p)
{
	int32_t intValue;
	if(readXMLInteger(p, "allowfaruse", intValue))
	{
		if(intValue != 0)
			setAllowFarUse(true);
	}

	if(readXMLInteger(p, "blockwalls", intValue))
	{
		if(intValue == 0)
			setCheckLineOfSight(false);
	}
	return true;
}