Adjust our customised pu.h to use snprintf, with correct buffer
size information. Also adjust includes so our custom version is used, ]
even when including the system puAux.h.
Allow modules to define an unload callback, and also drive
the 'loaded' property to false, to give modules the ability to clean
up when being unloaded. This makes reloading work without
errors for Canvas.
Additionaally, add some special code when creating the
Canvas module, to ensure the C++ defined pieces are loaded :
fortunately Canvas is the only module which needs this.
gcc on riscv64 is not able to compile natively atomic int, because of hw constraints, leading
to an additional to link external atomic libraries, making the code really slower to run.
Instead, using std::atomic<int> can be compiled and optimized natively without any additional -latomic linking.
Previously WS30 data from STG files - in particular road/rail/river
data - was kept permanently.
This change unloads it with the STG-level tile. This is the right
level to do so, as it will be reloaded from tile when the STG file
is loaded again.
Previously we were hardcoded to 2 database pager threads,
one for files and one for http.
This commit adds a new property /sim/rendering/database-pager/threads
to control the number of threads on startup.
It also re-orders the code to set the database pager so that such
a setting has an effect.
Change all constant numeric values with the defined constant.
Changed the wrong '*offset-m' properties and the 'rollspeed-ms' property.
Maybe the wrong offset properties hasnt popped up because no dev used
it. This value will not be used in any animation because its normally a
fixed value that doesnt change at runtime.
With this patch, the dev can set <max-compression-ft> or <max-compression-m> in the set-file (or another
xml-file that get included from the set-file).
The code calculates also 'compression-m' for every gear.
If the 'max-compression-*' property is omitted, the code behave as before ('compression-norm' is the same as 'compression-ft').
Some of the subsystems created in the fg_init fgCreateSubsystems() function were accidentally
shifted into the subsystem group SGSubsystemMgr::GENERAL, as these subsystems cannot be currently
registered with the subsystem manager and still have to use the non-templated subsystem manager
add() function.
Previously any missing WS30 tiles created multiple OSG WARN
messages from the file not being found. This change does a check
to ensure the file actually exists before put it on the queue for
loading.
AI models have rudimentary collision detection with submodels that performs two tests.
1. The height difference must be less than a defined amount
2. The centre point range must be less than a defined amount.
(2) above by itself would result in a spherical comparison; however (1) effectively modifies this to slice off the top and bottom of the sphere so that the sphere heigh is half of the value in (1).
Previously these heights and lengths were hardcoded - this change allows these to be defined in the xml instead using the <collision-length> and <collision-height> tags
e.g.
<entry>
<type>ship</type>
<collision-length type="double">50</collision-length>
<collision-height type="double">50</collision-height>
</entry>
Default values:
+---------------+-------------+------------+
| Type | Height(m) | Length(m) |
+---------------+-------------+------------+
| Null | 0 | 0 |
| Aircraft | 50 | 100 |
| Ship | 100 | 200 |
| Carrier | 250 | 750 |
| Ballistic | 0 | 0 |
| Rocket | 100 | 50 |
| Storm | 0 | 0 |
| Thermal | 0 | 0 |
| Static | 50 | 200 |
| Wingman | 50 | 100 |
| GroundVehicle | 20 | 40 |
| Escort | 100 | 200 |
| Multiplayer | 50 | 100 |
+---------------+-------------+------------+
This covers all instantiated SGSubsystem derived classes, i.e. those that are
not base classes, including subsystem groups. Both non-instanced and instanced
subsystem creation is tested. The tests for subsystems yet to be registered are
commented out.
Most subsystems are now created via the subsystem manager using the global
subsystem registrations.
The FGGlobals add_subsystem() and add_new_subsystem() methods have been removed
as the subsystem manager addition and creation function interface now exceeds
the functionality of these helper functions.