Age | Commit message (Collapse) | Author |
|
I have added a conditional to the code so that if the player
tries to lock onto the 2nd star and they are very far away, >1e8,
then the game will not allow the star to be locked.
This is a temporary workaround since if a distance of farther
then this is attempted then the view will be throw way off
and the stars will not be shown locking onto correctly.
I've also made the locking functions return booleans so I can
determine the success of the lockings.
This is a partial fix for #9961.
|
|
|
|
|
|
|
|
The code was preventing the position and view from changing
when the distance between the current and new position for
a marked auto mover was zero. This happens if you lock the
2nd or 3rd star and then unlock and relock again.
It was prevented this with asserts and if statement checks
and I removed them all.
This section of code isn't doing any inverses based on the
reciprocal of the distance so theres no issue with allowing
transition speeds/distances of zero.
Fixes #10148.
|
|
|
|
|
|
TITANIC: CStarCamera Refactoring and CStarCrosshairs logic fix
|
|
|
|
|
|
|
|
|
|
When you dispense a chicken, but don't pick it up and leave, the
chicken is returned to the dispensor. But previously you couldn't
then get another chicken, though you should be able to get one.
|
|
Originally, if you unlocked a star when you had 2 or 3 stars
locked and then relocked without changing views then the game
crashed.
This was because it was trying to transition a distance of zero
and this failed an assert (to normalize the length to be the distance).
The transition is no longer done so the crash does not happen.
Fixes #10147.
|
|
Before the normalization function was asserting if it couldn't
normalize now the caller can determine what to do with a failed
normalization.
|
|
If you want to remove locked stars you can do so using the D key,
but previously, you could also deselect a currently locked star
via the skymap and it would crash.
It previously crashed if:
1. You had 2 stars locked on and you tried to remove the 1st
2. Had 1 locked and 1 unlocked and you tried to unlock the 1st
3. Had 2 locked and 1 unlocked and you tried to unlock any of
the other two locked stars.
Refactoring would allow quicker comprehension of the logic of
this section of code.
Fixes #10126.
|
|
|
|
|
|
Before it was add/remove row so the new name is more informative.
|
|
|
|
|
|
|
|
This involved removing header files and forward declaring when possible.
I also reorded the header include files to be local to gloabal.
E.x., in the class implementation the class header file
would be the first included.
This is a first pass of header reduction for star_control/ files
|
|
|
|
|
|
|
|
TITANIC: Daffine and FMatrix work
|
|
|
|
|
|
|
|
|
|
Was doing 3x3 inverse now it is doing a transpose.
Also named the function.
|
|
Replace rotation inverse with transpose.
inv(R)=tranpose(R) for rotation matrices.
|
|
|
|
Changing the fpose Y axis rotations flipped some of the keys (z,x)
so I added in negatives to fix that.
Also before slash was looking up and comma was looking down.
This is the same as the original, but I think thats less
intuitive so I have reversed that. It also makes those keys
now correct in the readme.
|
|
|
|
Add negatives to star camera turning rotations so view turns correctly
when no stars are marked and 1 star is marked.
|
|
|
|
|
|
|
|
|
|
TITANIC: DAffine refactor
|
|
|
|
TITANIC: FMatrix refactoring
|
|
|
|
|
|
The X and Z rotation already follow the convention given in wikipedia,
but the Y axis rotation doesn't (its the negative angle) so I switched
that and updated where that was used.
This allowed stray negatives for angle calls to this function (for Y
rotations) to be removed from other parts of the code (dvector).
In theory this was a non-functional change. In dvector the code was taking
the negative of the angle so it was essentially doing the negative of the
negative, but when it was used once in star_camera it was not
(when it should of been). So That was changed. That part of the code
was used for locking onto the third star after the 2nd was already locked.
I can't tell if the star control puzzle has improved after this change.
It can still have issues locking onto the 2nd star and also not.
Also added lots of todos for things to check.
|
|
The matrix product doesn't change anything about the class so it
doesn't need to be a member function.
This way other functions can do multiplication of matrices.
|
|
Changed the left and right matrix product to use the matrix
product function with the matrix order reversed.
|
|
renamed fn2->MatRProd and fn3->MatLProd.
They do post (R) and pre (L) multiplication.
|