John Fernandez
bfde2144a2
Typo
2023-12-02 18:01:51 -05:00
John Fernandez
1787f4457b
Add safety to crusty old physics code
2023-12-02 18:01:51 -05:00
Sébastien Noel
f149c36b44
Fix a few typos ( #5598 )
2023-10-24 20:33:45 -04:00
Goober5000
06d9e02c34
sync up tokens
2023-10-15 13:48:23 -04:00
Asteroth
40233ae05f
use a constant for excess speed
2023-10-15 13:43:49 -04:00
Goober5000
d2031a476a
some fixes
2023-10-15 13:43:49 -04:00
Asteroth
6843d48358
add math for predicting warp in distance
2023-10-15 13:43:47 -04:00
Asteroth
219bcca23a
Implement gravity ( #4803 )
...
Adds gravity! Applies on a per-mission basis, and weapons, ships, debris, and asteroids now have a configurable "gravity const" which multiplies the effect of gravity on them, by default everything except debris is 0 (meaning no effect even when the mission has gravity). AI and the lead indicator will also lead for ballistic trajectories as well, given a gravity-affected weapon. No FRED support or gravity direction control yet, to come in later PRs.
2022-11-21 20:13:35 -05:00
Goober5000
5f54188e5b
add a few scripting dock functions ( #4839 )
...
* add a few scripting dock functions
Add setDocked, setUndocked, and jettison.
* address feedback
2022-11-01 21:45:49 +09:00
Asteroth
ef57ffc2f4
Add maneuvering thruster easing ( #4623 )
...
some thruster and comment clean up, and thruster easing
2022-09-09 18:36:04 -05:00
Goober5000
e67ea63121
use std::max
2022-08-25 21:36:40 -04:00
wookieejedi
4074cf4c9c
Fix False Null MOI warnings
...
In #4443 , `fl_near_zero` was set to use default epsilon values in the `IS_VEC_NULL` check. In this comparison, epsilon is the wrong threshold because it used to have a much smaller threshold. The fix restores the previous definitions of `IS_VEC_NULL` and `IS_VEC_NULL_SQ_SAFE` by exposing the epsilon value as an optional parameter (similar to how `IS_NEAR_ZERO` used to work. This PR also restores `IS_VEC_NULL_SQ_SAFE` where it was replaced by `IS_VEC_NULL.`
2022-08-13 09:59:10 -04:00
Goober5000
dfeb15f8e5
more cleanup in preparation for model translation ( #4443 )
...
* more cleanup in preparation for model translation
1) Clean up stepped rotation, fixing some logic, adding safeguards for invalid values, and allowing rotations to go in the opposite direction
2) Add more specific SEXP error checking for AWACS and rotating subsystems
3) Assorted refactoring and polishing
* address feedback, plus a bit of extra cleanup
2022-08-11 08:17:17 -04:00
Asteroth
622ae3ef2c
Fix some bugs with maneuvers ( #4483 )
...
* split ai_control_info_check and player-not-use-ai wipes maneuvers
* remove redundant flag upkeep and clarify logic
2022-07-13 00:08:08 -04:00
Asteroth
7fe62aabcd
Add some chase view Improvements ( #3571 )
...
* improve chase view cam
* fix comment
* comment description of acceleration
2021-08-05 11:09:08 -04:00
Joshua Glatt
144d484c85
Replace rand() calls with a Random class ( #3332 )
2021-05-04 18:26:06 -07:00
Baezon
0612a72c2f
fix FIT with set-object-facing
2021-03-11 15:41:55 -05:00
Baezon
60f20d055c
review changes
2020-09-24 01:00:21 -04:00
Baezon
82b8f1726e
travis cleanliness appeasement
2020-09-24 01:00:21 -04:00
Baezon
232035e45d
handle shockwaves and renaming
2020-09-24 01:00:21 -04:00
Baezon
7accd387a3
v2
2020-09-24 01:00:21 -04:00
Baezon
58ce531ec6
v1
...
V2
2020-09-24 01:00:21 -04:00
Baezon
f95f48448e
world coords for all whacks
2020-07-27 01:11:00 -04:00
Baezon
34b04b1ca8
PR review fixes
2020-07-18 22:28:51 -04:00
Baezon
06322bb977
better names and const fix
2020-07-17 20:07:09 -04:00
Baezon
1512e7c8c2
moar bugfix
2020-07-12 12:53:05 -04:00
Baezon
e0e74c8277
bugfix
2020-07-12 03:51:31 -04:00
Baezon
a5a41e8ea6
Review adjustments
2020-07-12 03:14:01 -04:00
Baezon
abe17c7885
comment fix
2020-07-11 02:01:17 -04:00
Baezon
17613e0612
Only one whack
...
re-factored so that only the 'dock root' is whacked, all other docked ships will adjust to match the root
2020-07-11 00:05:10 -04:00
Baezon
b6f1ceeabd
PR review changes
2020-07-11 00:05:10 -04:00
Baezon
eb64241355
Assert -> Assertion and made a bunch of them
2020-07-11 00:04:48 -04:00
Baezon
9b33685598
Fix physics whack for docked ships
...
Properly whacks all ships that are docked together when any are whacked, makes everything more consistent by calling ship_apply_whack instead of physics_apply_whack, whacking in general now unrotates its hit pos to get a world pos like physics whack was expecting and adds a few matrix helper functions.
2020-07-11 00:04:48 -04:00
Goober5000
3a4bd86153
fix an oversight with dont-clamp-max-velocity
2019-10-29 19:59:53 -04:00
Goober5000
5f8192d1ee
actually figure out instantaneous acceleration, and refactor a bit
2019-10-20 16:30:38 -04:00
Goober5000
ab3388f397
add sexp and script support for maneuvers with new CIF_ flags
2019-10-20 00:59:43 -04:00
Goober5000
a80e4ba56e
add some very useful control flags for ship maneuvers
2019-10-19 00:28:52 -04:00
FSCyborg
88d5bed064
Coverity 1093370
...
Copy paste error, I can think of no reason to compare Max y and Min z
2019-07-19 09:11:14 -04:00
CasparKielwein
ce335dbcc2
remove unused functions in physics
2018-12-29 16:45:47 +01:00
asarium
0b4ca71eba
Enable modernize-deprecated-headers
2018-04-25 11:12:41 +02:00
Fabian Woltermann
0591b7ef49
ai profile flags
2016-08-19 22:44:39 +02:00
asarium
1bcd5400d3
Move build system to CMake
2016-07-22 12:07:19 +02:00
The E
487f769064
Renaming vm_copy_transpose_matrix to vm_copy_transpose
2015-12-01 20:38:30 +01:00
The E
e0defd287a
Renaming vm_vec_crossprod to vm_vec_cross
2015-12-01 20:36:34 +01:00
The E
a413255728
Renaming vm_vec_dotprod to vm_vec_dot
2015-12-01 20:35:47 +01:00
MageKing17
048d65d3ca
Makes glide decay work even when not thrusting.
...
For any mods that might want to keep the old behavior, adds "$glide decay requires thrust:" AI profile flag.
2015-08-19 00:50:18 -07:00
Echelon9
c5493bb480
Scripted sort and uniq on (internal) project includes. Improves search time and as a by product removed a number of duplicative includes.
2015-06-22 20:24:30 +10:00
zookeeper
c13c35ec25
Fixed a FRED crash when using $Flight controls follow eyepoint orientation (patch by MageKing17).
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11163 387891d4-d844-0410-90c0-e4c51a9137d3
2014-10-29 18:47:04 +10:00
Goober5000
5f3600dc79
probably good to change the comment too
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11122 387891d4-d844-0410-90c0-e4c51a9137d3
2014-10-12 18:22:13 +10:00
Goober5000
f2d8277452
xt branch: additional optimizations using RAND_MAX_1f
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11121 387891d4-d844-0410-90c0-e4c51a9137d3
2014-10-12 18:22:12 +10:00