- Move the drawing of the system map pigui to a separate handler to
ensure that it will always be drawn strictly after the SystemView object
- Fix the setting of the m_colliding parameter of the ship during
deserialization
- Preparations:
Add method Ship:GetCargo
Add method Ship:GetDurationForDistance
Add method Ship:Create
Add method ui.treeNode & ui.treePop
Add method LuaObject::CreateInLua
Add functions for convenient selection of a random array element
Add some numerical utilites
Add a tool to easily draw a table from an array
Fix ui.Format.Number
Turn off the output when the ship changes frames
Reduce the detection range of hyperspace clouds
Remove the call LuaEvent::Emit immediately after exiting hyperspace
Split Tradeships.lua into 5 modules
- Tradeships
For current system, calculate all possible routes of tradeships,
durations, flows; arrange ships in space in such equilibrium state,
as if the have been flying about their business for a long time.
Calculate the average spawn interval for new ships, and parking
intervals, so that the stations are not overcrowded or empty.
Сreate a tab in the debug window with full information on
routes, ships, stations, remote systems.
Function description:
The ship rearranged from its current position to a given body in space, for a
given part of the path, as if it were flying in a straight line, consuming
fuel and changing speed. The ship's current speed is ignored and is
considered to be equal to target's.
This function changes the coordinates, the mass of fuel in the tank, and the
speed of the given ship.
This function will be used so that when the game starts, or the player
jump into the system, the NPC ships looked as if they had been moving on
their routes for a long time.
A one-dimensional case is considered, given the parameters of the ship
and the length of the path, a flight plan is calculated, which allows
determining the time, speed, and mass of the ship at any point on the
way.
Also added a simple simulator for testing purposes.
- Flatten the Scenegraph LoadNodes tree to avoid unneeded callgraph depth
- Remove several useless (and counterproductive) profiling points in tiny Lua bindings
- Add wall-clock time to profiler reports
- Fix bug in debug-compilation of Frame.cpp
Animation::Interpolate was getting called for all ships, and was
responsible for 1/3rd of the frame with 2500 ships.
Also stop profiling Frame::GetFrame, as the function is an order of
magnitude faster than the profiling overhead.
Add better profiling to identify frame slowdowns we have lots of ships (2000+)
Cache equipment capabilities between ship equipment updates
Improve Ship::StaticUpdate from 70mc to 40mc with 2500 ships
Only tick animations that are marked active.
More work needs to be done in Ship.cpp to support this,
but it should enable us to have far more ships in one system.
Sometimes surface ports move when terrain is generated because it is not
suitable for their original position. When serialized, the physical
body saves its changed position, but the system body does not.
Therefore, upon subsequent loading, the position of the system body and
the physical body may not coincide. In this commit, the same mechanism
is launched as during the initial generation of the relief, which
displaces the system bodies to the right position.
- add a "static" orbit for bodies that are not moving anywhere
- now bodies in a rotating frame and also in the spaceport frame have
such "static" orbits
- add display of the orbits of objects moving strictly to the star or
from the star
- fix compile warning for possibly uninitiated variable in
LuaSystemView.cpp
- fix an issue where smooth animation sometimes have a hard time
catching up with a newly selected object
Fixes#5062
In case the systembody does not have a jumpable parent.
This can happen if it revolves around several stars at once.
At the moment this situation leads to a segfault.
Fixes issues with directions being projected as positions.
Clean up several now-unused functions.
Move screen projection functions from Body to Engine where they belong.
This change drops the average savefile from 2MB to 500KB.
We're smarter about what data we actually need to serialize -
MatrixTransform is only ever positioned by animations, and we don't
(yet) need to know about every space station market in the system at once.