<commit_before>#include "game/city/vehicle.h"
#include "framework/logger.h"
#include "game/city/building.h"
#include "game/city/city.h"
#include "game/city/vehiclemission.h"
#include "game/city/vequipment.h"
#include "game/gamestate.h"
#include "game/organisation.h"
#include "game/rules/vequipment.h"
#include "game/tileview/tileobject_shadow.h"
#include "game/tileview/tileobject_vehicle.h"
#include "library/sp.h"

#include <limits>
#include <random>

namespace OpenApoc
{

class FlyingVehicleMover : public VehicleMover
{
  public:
	Vec3<float> goalPosition;
	FlyingVehicleMover(Vehicle &v, Vec3<float> initialGoal)
	    : VehicleMover(v), goalPosition(initialGoal)
	{
	}
	virtual void update(GameState &state, unsigned int ticks) override
	{
		LogWarning("Moving");
		float speed = vehicle.getSpeed();
		if (!vehicle.missions.empty())
		{
			vehicle.missions.front()->update(state, this->vehicle, ticks);
			auto vehicleTile = this->vehicle.tileObject;
			if (!vehicleTile)
			{
				return;
			}
			float distanceLeft = speed * ticks;
			distanceLeft /= TICK_SCALE;
			while (distanceLeft > 0)
			{
				Vec3<float> vectorToGoal = goalPosition - vehicleTile->getPosition();
				float distanceToGoal = glm::length(vectorToGoal * VELOCITY_SCALE);
				if (distanceToGoal <= distanceLeft)
				{<commit_msg>Remove unnecessary Warning every FlyingVehicleMover::update<commit_after>#include "game/city/vehicle.h"
#include "framework/logger.h"
#include "game/city/building.h"
#include "game/city/city.h"
#include "game/city/vehiclemission.h"
#include "game/city/vequipment.h"
#include "game/gamestate.h"
#include "game/organisation.h"
#include "game/rules/vequipment.h"
#include "game/tileview/tileobject_shadow.h"
#include "game/tileview/tileobject_vehicle.h"
#include "library/sp.h"

#include <limits>
#include <random>

namespace OpenApoc
{

class FlyingVehicleMover : public VehicleMover
{
  public:
	Vec3<float> goalPosition;
	FlyingVehicleMover(Vehicle &v, Vec3<float> initialGoal)
	    : VehicleMover(v), goalPosition(initialGoal)
	{
	}
	virtual void update(GameState &state, unsigned int ticks) override
	{
		float speed = vehicle.getSpeed();
		if (!vehicle.missions.empty())
		{
			vehicle.missions.front()->update(state, this->vehicle, ticks);
			auto vehicleTile = this->vehicle.tileObject;
			if (!vehicleTile)
			{
				return;
			}
			float distanceLeft = speed * ticks;
			distanceLeft /= TICK_SCALE;
			while (distanceLeft > 0)
			{
				Vec3<float> vectorToGoal = goalPosition - vehicleTile->getPosition();
				float distanceToGoal = glm::length(vectorToGoal * VELOCITY_SCALE);
				if (distanceToGoal <= distanceLeft)
				{
{'fraction_non_alphanumeric': 0.13249810174639332, 'fraction_numerical': 0.0030372057706909645, 'mean_word_length': 4.881696428571429, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7280997', 'n_tokens_mistral': 1016, 'n_tokens_neox': 906, 'n_words': 175}