#150: Loading and saving a model in the Model Editor changes decimal digits:
incorrect round-trip conversions
---------------------+----------------------
Reporter: Carsten | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: other | Version: svn-head
Keywords: | Platform:
---------------------+----------------------
When a weapon model (e.g. `Shotgun_v.cmdl`) is loaded in the Model Editor
and immediately saved again without any changes, the resulting `.cmdl`
file is different from the original: some floating-point numbers are
converted to a slightly different decimal string as before.
This happens despite our careful efforts to avoid exactly this problem; in
fact, the related `assert(prec <= MAX_DIGITS10)` in function `serialize()`
in file `Libs/Models/Model_cmdl.cpp` triggers.
The attached test case reproduces this problem.
At this time, it looks as if this is a platform- or compiler-specific
issue: I have not been able to reproduce the issue with g++ under Ubuntu
14.04, but reliably with '''Visual C++ 2012''' (Express Edition).
--
Ticket URL: <
http://trac.cafu.de/ticket/150>
Cafu 3D Game and Graphics Engine <
http://www.cafu.de>
The open-source game engine and graphics engine for multiplayer, cross-platform, real-time 3D action.