No more crashes when hyperjumping#4907
Conversation
|
Apparently, this PR should wait for #4908 to merge. |
|
Not necessarily, but I'd much prefer seeing: a) the frame-switching logic moved to ShipViewController instead of duplicating it in the (soon-to-be-deprecated) CameraController subclasses, and b) the logic related to reacting to a change in frames attached to the Player ship or, more efficiently, in the ShipViewController (a simple check once per frame to compare FrameIds is literally a single cycle, something we can well afford compared to adding 16+ bytes and an irrelevant signal handler call to every single ship's datum in the world.) If we have another impending use-case for an |
|
@Web-eWorks I touched the frames in this PR, because there was a crash in hyperspace, as a result of calling function |
261544f to
c65c5b6
Compare
Fixes pioneerspacesim#4901 System map: add a check to see if we are in hyperspace Sector map: - move the drawing of the player's indicator from DrawNearSector up to Draw3D - calculate the interpolated position of the player's indicator during a hyperjump - don't display current system during hyperjump (lua-side) - fix selected system indicator (green circle), it pointed not to the the selected system, but to the current system Also: - add easing function into utils.cpp to smooth the movement of the player indicator - move fuel reduction from the start of the hyperjump to the end - force handling of lua events immediately after entering system
4afbc01 to
0057619
Compare
Commits
Notify the camera when the ship changes the frame
Since the camera is not tied to the ship, but to the frame of the ship, when the frame changes, the information in the camera becomes irrelevant. If the worldview is active, it is quickly updated, but if the worldview is not active, an accident occurs.
This patch fixes a crash when hyper jumping with an open info screen.
Rename CameraContext vars to cameraContext (optional)
Many variables of type CameraContext are called camera, and this seems to be confusing because there is also a type Camera, and variables of this type, also called "camera" or something like that.
The problem with info screens was resolved in #4941
Fix crashes when hyperjump with a map opened
Fixes #4901
System map: add a check to see if we are in hyperspace
Sector map:
DrawNearSectorup toDraw3DAlso:
utils.cppto smooth the movement of the player indicatorIndent hyperjump-planner.lua
TODO: