Commit Graph
294 Commits
Author SHA1 Message Date
Goober5000 97952d6b6c refactoring in preparation for model translation
Mostly renaming of fields and functions, and moving some modelread sections into functions.  This reorganization will put the code on a better footing for the model translation feature.  No model translation code is included yet, and there should be no change in functionality.
2022-01-29 15:53:21 -05:00
Asteroth 32cca98349 dont do passive lightning on destroyed subsystems (#3771) 2021-11-19 23:26:43 -05:00
Goober5000 d634ce6b62 Merge pull request #3786 from Goober5000/submodel_turn_accel
refactor submodel flags and add $rotate_accel
2021-11-17 22:16:25 -05:00
Goober5000 9d6eec939c refactor submodel flags and add $rotate_accel
1) Changes the submodel flags to use a flagset instead of several booleans
2) Adds `rotate_accel` to allow submodel rotation acceleration to be specified

Submodel acceleration can now be instant; dumb-rotating submodels always instantly accelerate (and have always done so)
2021-11-17 21:45:01 -05:00
Asteroth 98749e19b3 add flag for toggling ship passive lightning (#3772) 2021-11-16 14:18:26 -05:00
Asteroth bc24ac3ebc Add 'passive' lightning arcs to ships (#3733)
* add passive lightning arcs

* fixes and cache submodel number

* range based loop
2021-10-19 12:51:05 +09:00
Goober5000 ae63f02829 rename intrinsic rotation to intrinsic motion 2021-10-13 19:39:16 -04:00
Baezon 3863d9b5a9 dont use generic debris for subsystems 2021-07-17 20:20:54 -04:00
Goober5000 3c553665aa remove the 'main' argument from obj_snd_assign 2021-06-05 17:40:58 -04:00
Joshua Glatt 144d484c85 Replace rand() calls with a Random class (#3332) 2021-05-04 18:26:06 -07:00
Baezon d463db3742 Merge remote-tracking branch 'upstream/master' into generic-debris-enhancement 2021-02-21 21:31:59 -05:00
Baezon 89a8cbcbae review tweaks 2021-01-29 01:04:15 -05:00
Baezon 61931520d1 Merge remote-tracking branch 'upstream/master' into generic-debris-enhancement 2021-01-27 23:06:45 -05:00
Baezon 229dd4c63c clean up 2021-01-27 20:59:01 -05:00
Goober5000 020f14fb51 allow rotating submodels to rotate around an arbitrary axis 2021-01-13 14:01:28 -05:00
Goober5000 043466309a de-parent live debris
It appears that live debris is not supposed to have a parent submodel; see the retail NTF Boadicea.  This removes the parent from any live debris that might have it.

This should fix #3078.
2021-01-07 00:02:49 -05:00
Goober5000 c18b1b63fd another model to model_instance refactor
Remove arc information from bsp_info and move it to submodel_instance.  Add a model instance to each debris chunk to keep track of it.
2020-12-20 14:51:05 -05:00
Goober5000 efe2d8476a 1) it's no longer necessary to call model_clear_instance before collision detection
2) call appropriate functions in collision detection because models might have instances
2020-12-18 13:46:49 -05:00
Goober5000 88c1d8a02a consolidate model instance code 2020-12-18 01:32:43 -05:00
Baezon c65ae50b81 version 1 of generic debris enhancements 2020-12-17 01:58:00 -05:00
Goober5000 7c92dd9f7c hoist model_get and model_get_instance out of a bunch of functions 2020-12-16 11:55:31 -05:00
Goober5000 c457f24d67 fix two more crashes 2020-12-15 19:46:12 -05:00
Goober5000 b90fc2b3ad numeric to boolean 2020-12-08 19:54:31 -05:00
Goober5000 f0799d245e tweaks 2020-12-08 19:54:24 -05:00
Goober5000 3fdc5a3784 cur_turn_rate -> current_turn_rate 2020-12-08 12:33:29 -05:00
Baezon 69c86c4733 more travis 2020-11-20 12:02:13 -05:00
Baezon 9959d8a671 travis 2020-11-20 12:02:13 -05:00
Baezon aa8849f4e5 improved warp collision 2020-11-20 12:02:13 -05:00
Baezon cf270771f0 re enable muzzle flashes flag 2020-09-25 13:59:15 -04:00
Baezon 3cf9bc250a v1 2020-09-25 13:58:07 -04:00
Baezon 2efe876fbd #define -> const float, and adjusted_progress for stage 3 2020-09-23 13:15:46 -04:00
Baezon 8d7536855b fix HW warp orient (always follows the ship's) 2020-09-23 01:49:53 -04:00
Baezon 9cbbb96880 timing re-adjusted for MAXIMUM accuracy 2020-09-23 01:21:41 -04:00
Baezon d9913d5b9e v1 2020-09-22 23:26:14 -04:00
Goober5000 2dec0af410 add code to tell if debris is one of those tiny models
make Debris dynamic, and use a soft limit at 64 pieces (the old MAX)
add per-class specification of death roll sounds
2020-08-12 23:51:39 -04:00
Fabian Woltermann 0c9bbe5223 Fix a bug in the debris deletion code introduced by the lab explosion feature commit. This also makes the debris code use the new flag system to mark debris pieces as nondeleteable instead of relying on a magic lifeleft value. 2020-05-26 16:55:45 +02:00
wookieejedi e42ed47c61 Previously if a ship's glowmaps were deactivated via sexp, then the glowmaps would reaactivie at the ship's final explosinos. This PR fixes that by carrying that flag into the ship explosion FX code.
Previously if a ship's glowmaps were deactivated via sexp, then the glowmaps would reaactivie at the ship's final explosinos. This PR fixes that by carrying that flag into the ship explosion FX code.
2020-05-03 23:36:42 -04:00
JohnAFernandez fe8ce74037 Use a constant for declaring angles with no measure 2020-04-25 09:54:40 -04:00
asarium 1c12349990 Add extended scripting hook system
This moves towards defining the hooks in the code module that executes
them. Also provides the API necessary for better documentation of hooks.
This only covers a few hooks as a test and demonstration of the new API.
If no issues are found with this it can be extended in the future.
2020-04-13 14:45:19 +02:00
wookieejedi 539cad66e7 change placement and add reset values 2020-01-20 12:31:18 -05:00
wookieejedi 8a36fc138c Allows Modders to Actually Use Engine Wash Intensity
Previously, Engine Wash Intensity didn't actually do anything in the code. This adds a game table setting that let's modders specify to the game to actually take the intensity value into account when calculating engine wash effects.
2020-01-19 16:54:58 -05:00
wookieejedi da05fa18c5 use nullptr 2020-01-07 12:58:42 -05:00
wookieejedi 89576232a5 Few additional cleanups to hyperspace warpins with initial velocity 2020-01-07 11:08:06 -05:00
wookieejedi 15b494b765 Cleanup Remaing Issues with Initial Velocity
This PR tidies up the comments in the initial velocity setting, properly sets the player's throttle, and cleans up issues with initial velocity setting and hyperspace warpin types.

Note the removed code block for hyperspace warpin ending was removed becuase it is not needed, as physics calculatios already handles that. Also the calculations that were there did not properly account for initial ship velocity setting.
2020-01-06 11:29:09 -05:00
Fabian Woltermann 6c356692b2 Merge pull request #2152 from FSCyborg/Fix-The-Pirates
Bring Pirates of the FSO Back by
2019-11-23 11:30:18 +01:00
FSCyborg 4c2a3450f8 Fix 1992
Send the ship to the actual initial position once the engine knows where the ship should end up.
2019-11-18 22:16:33 -05:00
FSCyborg 51d362e447 Bring Pirates of the FSO Back by
Preventing a nullptr deep within shipfx_warpin_start()

Add Assertions to check for nullptr Warp Effect
2019-11-18 21:40:16 -05:00
wookieejedi 7b1f407c22 Fix blown_off bug for good
Thanks for @SamuelCho for telling me what to put to fix this bug for good. This PR fixes #2046 (for good it seems!).
2019-06-28 15:33:29 -04:00
SamuelCho 816d8e5415 Make sure various model rendering/collision code reference submodel instances instead of the prototype data. 2019-06-25 22:33:52 -07:00
Goober5000 34b38f63fa remove unneeded function 2019-05-17 14:31:15 -04:00