public Model getAnimatedModel(int frame1Id, int frame2Id, boolean active) {
		Model model;
		if (active)
			model = getModel(modelTypeActive, modelIdActive);
		else
			model = getModel(modelTypeDefault, modelIdDefault);
		if (model == null)
			return null;
		if (frame2Id == -1 && frame1Id == -1 && model.triangleColours == null)
			return model;

		Model animatedModel = new Model(true, Animation.isNullFrame(frame2Id)
				& Animation.isNullFrame(frame1Id), false, model);
		if (frame2Id != -1 || frame1Id != -1)
			animatedModel.createBones();
		if (frame2Id != -1)
			animatedModel.applyTransformation(frame2Id);
		if (frame1Id != -1)
			animatedModel.applyTransformation(frame1Id);
		animatedModel.applyLighting(64, 768, -50, -10, -50, true);
		return animatedModel;
	}