Beispiel #1
0
void Area::getEntryLocation(float &posX, float &posY, float &posZ,
                            float &orientX, float &orientY, float &orientZ, float &orientAngle) const {

	DragonAge::Object *object = 0;

	object = ObjectContainer::toObject(_campaign->getFirstObjectByTag(_startPoint));
	if (!object)
		object = ObjectContainer::toObject(_campaign->getFirstObjectByType(kObjectTypeWaypoint));
	if (!object)
		object = ObjectContainer::toObject(_campaign->getFirstObject());

	if (object) {
		object->getPosition(posX, posY, posZ);
		object->getOrientation(orientX, orientY, orientZ, orientAngle);
		return;
	}

	posX = 0.0f;
	posY = 0.0f;
	posZ = 0.0f;

	orientX = 0.0f;
	orientY = 0.0f;
	orientZ = 0.0f;

	orientAngle = 0.0f;
}
Beispiel #2
0
void Functions::getPosition(Aurora::NWScript::FunctionContext &ctx) {
	ctx.getReturn().setVector(0.0f, 0.0f, 0.0f);

	DragonAge::Object *object = DragonAge::ObjectContainer::toObject(getParamObject(ctx, 0));
	if (!object)
		return;

	float x, y, z;
	object->getPosition(x, y, z);

	ctx.getReturn().setVector(x, y, z);
}