mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
K_CalculateTrackComplexity: format using fmt::format, to account for differences in size_t platform type
This commit is contained in:
parent
7dafacaf7d
commit
bd9cadbe8d
1 changed files with 6 additions and 3 deletions
|
|
@ -26,6 +26,8 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include <fmt/format.h>
|
||||||
|
|
||||||
// The number of sparkles per waypoint connection in the waypoint visualisation
|
// The number of sparkles per waypoint connection in the waypoint visualisation
|
||||||
static const UINT32 SPARKLES_PER_CONNECTION = 16U;
|
static const UINT32 SPARKLES_PER_CONNECTION = 16U;
|
||||||
|
|
||||||
|
|
@ -2574,8 +2576,8 @@ static INT32 K_CalculateTrackComplexity(void)
|
||||||
|
|
||||||
delta = FixedMul(delta, FixedMul(FixedMul(dist_factor, radius_factor), wall_factor));
|
delta = FixedMul(delta, FixedMul(FixedMul(dist_factor, radius_factor), wall_factor));
|
||||||
|
|
||||||
CONS_Printf(
|
std::string msg = fmt::format(
|
||||||
"TURN [%d]: r: %.2f, d: %.2f, w: %.2f, r*d*w: %.2f, DELTA: %d\n",
|
"TURN [{}]: r: {:.2f}, d: {:.2f}, w: {:.2f}, r*d*w: {:.2f}, DELTA: {}\n",
|
||||||
i,
|
i,
|
||||||
FixedToFloat(radius_factor),
|
FixedToFloat(radius_factor),
|
||||||
FixedToFloat(dist_factor),
|
FixedToFloat(dist_factor),
|
||||||
|
|
@ -2583,6 +2585,7 @@ static INT32 K_CalculateTrackComplexity(void)
|
||||||
FixedToFloat(FixedMul(FixedMul(dist_factor, radius_factor), wall_factor)),
|
FixedToFloat(FixedMul(FixedMul(dist_factor, radius_factor), wall_factor)),
|
||||||
(delta / FRACUNIT)
|
(delta / FRACUNIT)
|
||||||
);
|
);
|
||||||
|
CONS_Printf("%s", msg.c_str());
|
||||||
trackcomplexity += (delta / FRACUNIT);
|
trackcomplexity += (delta / FRACUNIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2663,7 +2666,7 @@ static INT32 K_CalculateTrackComplexity(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CONS_Printf("Num sneaker panel sets: %d\n", sneaker_panels.size());
|
CONS_Printf("%s", fmt::format("Num sneaker panel sets: {}\n", sneaker_panels.size()).c_str());
|
||||||
trackcomplexity -= sneaker_panels.size() * 1250;
|
trackcomplexity -= sneaker_panels.size() * 1250;
|
||||||
|
|
||||||
CONS_Printf(" ** COMPLEXITY: %d\n", trackcomplexity);
|
CONS_Printf(" ** COMPLEXITY: %d\n", trackcomplexity);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue