Skip to content

Commit 44494ed

Browse files
committed
clang format (ugh, it's fucking the spacing but eh)
1 parent 60eaa1c commit 44494ed

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed

Source/Entities/Scene.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ bool Scene::Area::HasNoArea() const {
141141

142142
bool Scene::Area::IsInside(const Vector& point) const {
143143
std::shared_lock<std::shared_mutex> guard(g_sceneAreaMutex);
144-
144+
145145
std::list<Box> wrappedBoxes;
146146
for (std::vector<Box>::const_iterator aItr = m_BoxList.begin(); aItr != m_BoxList.end(); ++aItr) {
147147
// Handle wrapped boxes properly

Source/Lua/LuaAdapterDefinitions.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,15 +301,15 @@ namespace RTE {
301301

302302
#pragma region Scene Lua Adapters
303303
struct LuaAdaptersScene {
304-
static int CalculatePath1(Scene* luaSelfObject, const Vector& start, const Vector& end, bool movePathToGround, float digStrength) {
305-
return CalculatePath(luaSelfObject, start, end, movePathToGround, digStrength, FLT_MAX, Activity::Teams::NoTeam);
304+
static int CalculatePath1(Scene* luaSelfObject, const Vector& start, const Vector& end, bool movePathToGround, float digStrength) {
305+
return CalculatePath(luaSelfObject, start, end, movePathToGround, digStrength, FLT_MAX, Activity::Teams::NoTeam);
306306
}
307307
static int CalculatePath2(Scene* luaSelfObject, const Vector& start, const Vector& end, bool movePathToGround, float digStrength, Activity::Teams team) {
308-
return CalculatePath(luaSelfObject, start, end, movePathToGround, digStrength, FLT_MAX, team);
308+
return CalculatePath(luaSelfObject, start, end, movePathToGround, digStrength, FLT_MAX, team);
309309
}
310310
static int CalculatePath(Scene* luaSelfObject, const Vector& start, const Vector& end, bool movePathToGround, float digStrength, float jumpHeight, Activity::Teams team);
311311

312-
static void CalculatePathAsync1(Scene* luaSelfObject, const luabind::object& callback, const Vector& start, const Vector& end, bool movePathToGround, float digStrength) {
312+
static void CalculatePathAsync1(Scene* luaSelfObject, const luabind::object& callback, const Vector& start, const Vector& end, bool movePathToGround, float digStrength) {
313313
return CalculatePathAsync(luaSelfObject, callback, start, end, movePathToGround, digStrength, FLT_MAX, Activity::Teams::NoTeam);
314314
}
315315
static void CalculatePathAsync2(Scene* luaSelfObject, const luabind::object& callback, const Vector& start, const Vector& end, bool movePathToGround, float digStrength, Activity::Teams team) {

Source/Menus/SceneEditorGUI.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,8 +1415,7 @@ void SceneEditorGUI::UpdateBrainSkyPathAndCost(Vector brainPos) {
14151415

14161416
Vector pos1 = orbitPos;
14171417
Vector pos2 = brainPos;
1418-
if (pos1.GetY() > pos2.GetY())
1419-
{
1418+
if (pos1.GetY() > pos2.GetY()) {
14201419
std::swap(pos1, pos2);
14211420
}
14221421

Source/System/PathFinder.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,10 @@ int PathFinder::CalculatePath(Vector start, Vector end, std::list<Vector>& pathR
154154
g_SceneMan.ForceBounds(end);
155155

156156
// Convert from absolute scene pixel coordinates to path node indices.
157-
int startNodeX = std::floor( start.m_X / static_cast<float>(m_NodeDimension));
157+
int startNodeX = std::floor(start.m_X / static_cast<float>(m_NodeDimension));
158158
int startNodeY = std::max(0.0F, std::floor((start.m_Y / static_cast<float>(m_NodeDimension) - 0.5f)));
159-
int endNodeX = std::floor( end.m_X / static_cast<float>(m_NodeDimension));
160-
int endNodeY = std::max(0.0F, std::floor((end.m_Y / static_cast<float>(m_NodeDimension) - 0.5f)));
159+
int endNodeX = std::floor(end.m_X / static_cast<float>(m_NodeDimension));
160+
int endNodeY = std::max(0.0F, std::floor((end.m_Y / static_cast<float>(m_NodeDimension) - 0.5f)));
161161

162162
// Clear out the results if it happens to contain anything
163163
pathResult.clear();
@@ -302,11 +302,11 @@ void PathFinder::AdjacentCost(void* state, std::vector<micropather::StateCost>*
302302
// We do a little trick here, where we radiate out a little percentage of our average cost in all directions.
303303
// This encourages the AI to generally try to give hard surfaces some berth when pathing, so we don't get too close and get stuck.
304304
const float costRadiationMultiplier = 0.2F;
305-
float radiatedCost = 0.0F; //GetNodeAverageTransitionCost(*node) * costRadiationMultiplier;
305+
float radiatedCost = 0.0F; // GetNodeAverageTransitionCost(*node) * costRadiationMultiplier;
306306

307307
bool isInNoGrav = g_SceneMan.IsPointInNoGravArea(node->Pos);
308308
bool allowDiagonal = !isInNoGrav; // We don't allow diagonals in nograv to improve automover behaviour
309-
309+
310310
if (node->Down && node->Down->m_Navigatable) {
311311
adjCost.cost = 1.0F + GetMaterialTransitionCost(*node->DownMaterial) + radiatedCost;
312312
adjCost.state = static_cast<void*>(node->Down);
@@ -508,10 +508,10 @@ std::vector<int> PathFinder::GetNodeIdsInBox(Box box) {
508508
box.Unflip();
509509

510510
// Get the extents of the box's potential influence on PathNodes and their connecting edges.
511-
int firstX = static_cast<int>(std::floor( (box.m_Corner.m_X / static_cast<float>(m_NodeDimension)) + 0.5F) - 1);
512-
int lastX = static_cast<int>(std::floor(((box.m_Corner.m_X + box.m_Width) / static_cast<float>(m_NodeDimension)) + 0.5F) + 1);
513-
int firstY = static_cast<int>(std::floor( (box.m_Corner.m_Y / static_cast<float>(m_NodeDimension)) + 0.5F) - 1);
514-
int lastY = static_cast<int>(std::floor(((box.m_Corner.m_Y + box.m_Height) / static_cast<float>(m_NodeDimension)) + 0.5F) + 1);
511+
int firstX = static_cast<int>(std::floor((box.m_Corner.m_X / static_cast<float>(m_NodeDimension)) + 0.5F) - 1);
512+
int lastX = static_cast<int>(std::floor(((box.m_Corner.m_X + box.m_Width) / static_cast<float>(m_NodeDimension)) + 0.5F) + 1);
513+
int firstY = static_cast<int>(std::floor((box.m_Corner.m_Y / static_cast<float>(m_NodeDimension)) + 0.5F) - 1);
514+
int lastY = static_cast<int>(std::floor(((box.m_Corner.m_Y + box.m_Height) / static_cast<float>(m_NodeDimension)) + 0.5F) + 1);
515515

516516
// Only iterate through the grid where the box overlaps any edges.
517517
for (int nodeX = firstX; nodeX <= lastX; ++nodeX) {

0 commit comments

Comments
 (0)