aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/scripts
diff options
context:
space:
mode:
authorJan <sentrycraft123@gmail.com>2023-07-25 16:31:02 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2023-07-25 16:40:19 +0200
commitb6738a8a49c40fc638394408e8cd4a37b36c5648 (patch)
tree4af2663b3a0a8b06d25e3253bfb1cff02c8ef42a /NorthstarDLL/scripts
parentd3fb76f889101f024f410c194a66f0f4a2f6c4a0 (diff)
downloadNorthstarLauncher-b6738a8a49c40fc638394408e8cd4a37b36c5648.tar.gz
NorthstarLauncher-b6738a8a49c40fc638394408e8cd4a37b36c5648.zip
Remove Vector3 Constructor (#494)
- Packing was enabled because the compiler may add padding which we don't want. - Constructors were removed because they were either rather primitive or broken (the `pRawFloats` one). - Use of constructor was replaced with a simple cast, which works just as well. (cherry picked from commit ddb4670354a5f29e6ebd08f625edb2576de700e6)
Diffstat (limited to 'NorthstarDLL/scripts')
-rw-r--r--NorthstarDLL/scripts/scriptdatatables.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/NorthstarDLL/scripts/scriptdatatables.cpp b/NorthstarDLL/scripts/scriptdatatables.cpp
index 8aa52fdb..532624f3 100644
--- a/NorthstarDLL/scripts/scriptdatatables.cpp
+++ b/NorthstarDLL/scripts/scriptdatatables.cpp
@@ -765,8 +765,8 @@ std::string DataTableToString(Datatable* datatable)
case DatatableType::VECTOR:
{
- Vector3 pVector((float*)pUntypedVal);
- sCSVString += fmt::format("<{},{},{}>", pVector.x, pVector.y, pVector.z);
+ Vector3* pVector = (Vector3*)(pUntypedVal);
+ sCSVString += fmt::format("<{},{},{}>", pVector->x, pVector->y, pVector->z);
break;
}