Skip to content

Commit

Permalink
Fix Lint Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kgd192 committed Aug 30, 2024
1 parent 8590eb8 commit 2ee6420
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
60 changes: 30 additions & 30 deletions game/state/city/vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "game/state/gametime.h"
#include <cstdlib>
#endif
#include "game/state/city/vehicle.h"
#include "framework/configfile.h"
#include "framework/framework.h"
#include "framework/logger.h"
Expand All @@ -13,6 +12,7 @@
#include "game/state/city/building.h"
#include "game/state/city/city.h"
#include "game/state/city/scenery.h"
#include "game/state/city/vehicle.h"
#include "game/state/city/vehiclemission.h"
#include "game/state/city/vequipment.h"
#include "game/state/gameevent.h"
Expand All @@ -33,13 +33,13 @@
#include "game/state/tilemap/tileobject_vehicle.h"
#include "game/ui/general/messagebox.h"
#include "library/sp.h"
#include <fstream>
#include <glm/glm.hpp>
#include <glm/gtx/vector_angle.hpp>
#include <iostream>
#include <limits>
#include <queue>
#include <random>
#include <fstream>
#include <iostream>

namespace OpenApoc
{
Expand Down Expand Up @@ -98,8 +98,8 @@ const UString &StateObject<Vehicle>::getId(const GameState &state, const sp<Vehi

class FlyingVehicleMover : public VehicleMover
{
public:
FlyingVehicleMover(Vehicle &v) : VehicleMover(v) {}
public:
FlyingVehicleMover(Vehicle &v) : VehicleMover(v) {}
// Vehicle is considered idle whenever it's at goal in its tile, even if it has missions to do
void updateIdle(GameState &state)
{
Expand Down Expand Up @@ -574,9 +574,9 @@ class FlyingVehicleMover : public VehicleMover
2.0f);
if (ticksToMove < vehicle.ticksToTurn)
{
vehicle.velocity *= std::abs(vehicle.angularVelocity) * TURNING_SLOW_DOWN_CORRECTION;
vehicle.velocity *=
std::abs(vehicle.angularVelocity) * TURNING_SLOW_DOWN_CORRECTION;
}

}
}
}
Expand Down Expand Up @@ -774,29 +774,29 @@ class GroundVehicleMover : public VehicleMover
vehicle.goalPosition.z = vehicle.position.z;
}
else
// If we're on flat surface then first move to midpoint then start
// to
// change Z
if (fromFlat)
{
vehicle.goalWaypoints.push_back(vehicle.goalPosition);
// Add midpoint waypoint at target z level
vehicle.goalPosition.x =
(vehicle.position.x + vehicle.goalPosition.x) / 2.0f;
vehicle.goalPosition.y =
(vehicle.position.y + vehicle.goalPosition.y) / 2.0f;
vehicle.goalPosition.z = vehicle.position.z;
}
// Else if we end on flat surface first change Z then move flat
else if (toFlat)
{
vehicle.goalWaypoints.push_back(vehicle.goalPosition);
// Add midpoint waypoint at current z level
vehicle.goalPosition.x =
(vehicle.position.x + vehicle.goalPosition.x) / 2.0f;
vehicle.goalPosition.y =
(vehicle.position.y + vehicle.goalPosition.y) / 2.0f;
}
// If we're on flat surface then first move to midpoint then start
// to
// change Z
if (fromFlat)
{
vehicle.goalWaypoints.push_back(vehicle.goalPosition);
// Add midpoint waypoint at target z level
vehicle.goalPosition.x =
(vehicle.position.x + vehicle.goalPosition.x) / 2.0f;
vehicle.goalPosition.y =
(vehicle.position.y + vehicle.goalPosition.y) / 2.0f;
vehicle.goalPosition.z = vehicle.position.z;
}
// Else if we end on flat surface first change Z then move flat
else if (toFlat)
{
vehicle.goalWaypoints.push_back(vehicle.goalPosition);
// Add midpoint waypoint at current z level
vehicle.goalPosition.x =
(vehicle.position.x + vehicle.goalPosition.x) / 2.0f;
vehicle.goalPosition.y =
(vehicle.position.y + vehicle.goalPosition.y) / 2.0f;
}
// If we're moving from nonflat to nonflat then we need no midpoint at
// all
}
Expand Down
4 changes: 2 additions & 2 deletions game/state/city/vehicle.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ static const int FV_SCRAPPED_COST_PERCENT = 25;
static const int FUEL_TICKS_PER_SECOND = 144;
// How much ticks is required to spend one unit of fuel
static const int FUEL_TICKS_PER_UNIT = 40000;
// Correction factor for turning slowdown mechanic, pure found by data analysis, could not establish any logical conclution
// Correction factor for turning slowdown mechanic, pure found by data analysis, could not establish
// any logical conclution
static const float TURNING_SLOW_DOWN_CORRECTION = 38.893f;


class Image;
class TileObjectVehicle;
class TileObjectShadow;
Expand Down

0 comments on commit 2ee6420

Please sign in to comment.