summaryrefslogtreecommitdiff
path: root/ai/trolly/pathfinder.c
diff options
context:
space:
mode:
Diffstat (limited to 'ai/trolly/pathfinder.c')
-rw-r--r--ai/trolly/pathfinder.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/ai/trolly/pathfinder.c b/ai/trolly/pathfinder.c
index aa44014f9..126e0cd41 100644
--- a/ai/trolly/pathfinder.c
+++ b/ai/trolly/pathfinder.c
@@ -506,9 +506,5 @@ static int32 AyStar_AiPathFinder_CalculateG(AyStar *aystar, AyStarNode *current,
}
}
- // Res should never be below zero.. if so, make it zero!
- if (res < 0) { res = 0; }
-
- // Return our value
- return res;
+ return (res < 0) ? 0 : res;
}