Commit Graph
1089 Commits
Author SHA1 Message Date
Asteroth 0f168ecc5b warn on mismatched turret objects (#4458) 2022-07-04 21:55:55 -04:00
Goober5000 bf05cadd14 split subsystem warning display checks
Since "No subsystems found" and "Not all subsystems have a record in ships.tbl" are different warnings, they should have different flags.  Follow-up to #4408.
2022-06-16 00:21:39 -04:00
Asteroth 2e4a568e2b update the swap bsp functions 2022-05-07 17:12:00 -04:00
Asteroth 326a0c32d0 fix memory leak and use tmap verts directly 2022-05-07 16:43:23 -04:00
wookieejedi fff19927e7 Add Subsystem Flag to Hide Turrets from Ship Loadout Stats (#4235)
* Add Subsystem Flag to Hide Turrets from Ship Loadout Stats

The statistics summary window in the ship loadout editor shows various aspects and stats of the selected ship. These can be toggled and customized through the ships table, but one line is actually autogenerated, `+Turrets`. This is unideal for certain ships, especially those which use turrets on ships in non-standard ways (for example having an AI controlled turret which shoots bombs). In these cases, the turrets are not actual turrets, and it is confusing for players seeing that there is a turret on the ship in the loadout editor. (I can give more detailed examples using FotG if needed).

This PR adds a subsystem flag which allows the modders to hide a turret subsystem so it is not counted in the auto generation of the `Turrets` summary line. (As a slight cleanup I also removed cleaned up the whitespace formatting on a nearby, but unrelated line).

* sync names

* fix renaming
2022-05-01 17:10:56 -04:00
Tyler Blount a2f6f791e4 Forgot some magic numbers 2022-04-27 15:22:07 -07:00
Tyler Blount 33c53198a6 Update model typecast macros, add safe casts, clean up mistakes and unused function 2022-04-26 21:55:43 -07:00
Tyler Blount 64a213c667 Cleanup magic numbers and vertex loading for TMAPs 2022-04-26 18:35:48 -07:00
EatThePath c636ea5659 Remove light filtering data (#3737)
Removed useless light_ignore_objnum and affected_objnum lighting data, light_add_point_unique() subsequently removed as well, and cleaned up unused parameters.
2022-04-24 17:12:46 -05:00
Asteroth 8a188c56f6 add a doxy 2022-04-20 15:37:04 -04:00
Asteroth 3e2030bf01 clean up 2022-04-20 15:21:42 -04:00
Asteroth 2e4a657b57 more clean up and removing dead code 2022-04-18 18:05:46 -04:00
Asteroth 13a465825e swap tmap_num and nverts 2022-04-18 17:59:08 -04:00
Asteroth 943e5c395b first version of bsp space optimizations 2022-04-18 17:12:01 -04:00
Tyler Blount 75cdc8efa2 Some extra feedback changes and documentation 2022-04-15 20:36:54 -07:00
Tyler Blount 10b1fa89cf Style and review changes 2022-04-15 15:38:55 -07:00
Tyler Blount a804d21764 Error reports for TMAP2 2022-04-14 20:03:17 -07:00
Tyler Blount 61a0973ad4 Clang tidy fix #3 2022-04-13 12:14:33 -07:00
Tyler Blount a387fdeb36 Another clang tidy fix 2022-04-13 12:00:51 -07:00
Tyler Blount e742920c93 Clang tidy fixes 2022-04-13 11:26:16 -07:00
Tyler Blount 8066ac02cc Fix CI warnings 2022-04-13 11:26:16 -07:00
Tyler Blount 30e7747d6e More signed to unsigned conversions 2022-04-13 11:26:16 -07:00
Asteroth 38e02566c7 remove center and radius fields 2022-04-13 11:26:16 -07:00
Tyler Blount 60c39c698a Initial changes required to bump per-subobject vertex limit 2022-04-13 11:26:16 -07:00
Goober5000 798eecdadf Merge pull request #4139 from BMagnu/anim_techroom
Fix techroom turret lookup and make animations more robust
2022-04-03 23:46:46 -04:00
BMagnu e2504bd162 Add 'pause on reverse' animation flag (#4084) 2022-04-04 10:39:02 +09:00
Birk Magnussen abfa4b8fb5 Make Animations more Robust and fix techroom turret lookup 2022-04-04 10:36:26 +09:00
wookieejedi 063d7afcfe Fix destroyed submodels showing in techroom (#4138)
The check to not show `-destroyed` submodels is within `model_replicate_submodel_instance`, and that was only called for moveable submodels in the lab. This PR runs it for all submodels now. Tested and fix works as expected.
2022-04-04 09:32:07 +09:00
Goober5000 827c00cf40 Merge pull request #4091 from BMagnu/moveable_sexp_match
Fix Moveable SEXP Matching
2022-03-23 23:31:53 -04:00
Birk Magnussen 3bf67572cb Fix updating rotation moveables 2022-03-23 12:45:26 +09:00
Birk Magnussen d13268e78d Fix Moveable SEXP matching 2022-03-23 11:36:13 +09:00
BMagnu 2ca4616f37 Fix the Initial animations not properly setting prev_orient (#4082) 2022-03-19 11:47:32 -04:00
BMagnu 8c976a174f Improve Performance of Global to Local functions (#4080)
* Improve Performance of global to local point

* Improve Performance of global to local point dir

* Adapt Tests
2022-03-18 02:04:15 +00:00
BMagnu e2e689d454 Properly set canonical_prev_orient and exclude turrets (#4070) 2022-03-12 17:46:14 -05:00
Asteroth d86ebd5eb2 Remove new assert in model_instance_local_to_global_dir (#4069)
* remove assert and clarify hit_normal

* remove other asserts too
2022-03-12 11:55:29 +09:00
Goober5000 26417e2154 Merge pull request #4064 from Baezon/fix-target-bracket
Targeting brackets should use the header's bounding box, not detail0's
2022-03-09 23:45:09 -05:00
BMagnu 222f3e00a7 Fix moving submodel collision speed calculation (#4067) 2022-03-10 01:35:34 +09:00
BMagnuandGoober5000 9ab7a4626a Fix nested and animated submodel collisions (#4065)
* Calculate per-frame rotation axis

* function prototypes

* Add new submodel localization functions

* Fix collision detection for moving submodels

* Remove offending assert

* Add safeguard for stopped animations

* Fix last frame speed calc

* Fix childs with parent submodel rotations

* Fix Warnings

* Clang Bug Workaround

* clang tidy

* Incorporate Feedback

Co-authored-by: Goober5000 <[email protected]>
2022-03-09 23:49:11 +09:00
Asteroth 5f3dc91a24 use header's bbox, not detail0's 2022-03-07 20:15:52 -05:00
Taylor Richards 3e2008c23c swap bsp data before alignment
Changing endianess of bsp data must be done before any other
bsp processing
2022-03-07 08:25:37 -05:00
Shivansps 5235f14473 dont try to read chunk size if chunk type is 0
Chunk type 0 is EOF and lacks the following int indicating the total chunk size.
2022-02-23 19:07:19 -03:00
BMagnu 0b0f323091 Fixed incoherent case sensitivity for animation submodels (#4047) 2022-02-22 18:03:41 +00:00
Goober5000 a1d92251cb prevent Assert with glowpoints
It's legal for glowpoints to have a zero vector as a normal, apparently, so test for this.
2022-02-19 19:23:48 -05:00
Goober5000 237787c256 add some new scan features
1. Add custom scan times per subsystem
2. Add scanning time and range multipliers for player ships

Resolves #4027
2022-02-18 22:39:04 -05:00
Goober5000 57705db466 add scripting support for submodels
Allow scripts to reference submodels, submodel instances, and model instances.  Currently just a few properties (like Orientation and Radius) can be accessed, but this can be easily expanded in the future.

Also add relevant functions to calculate real-world positions and orientations of rotated submodels.
2022-02-16 21:45:23 -05:00
Goober5000 e2f63a2340 rename and document several model coordinate functions 2022-02-15 20:59:24 -05:00
Goober5000 f0371cdb0c clean up model point/dir/normal/orient functions
Consolidated these functions and replaced the `find_submodel_point_*` functions with their closest `world_find_` counterparts.  (One of those functions may not have actually worked correctly.)  Also use the correct coordinate logic when returning normals from collision info in scripting.

Related to #3985 although not yet a fix for it.
2022-02-14 23:46:43 -05:00
Birk Magnussen 478edf50f6 Fix Aix Rotation Moveable 2022-02-12 16:52:39 +09:00
BMagnu e7d9f5a555 fix absolute moveable (#3995) 2022-02-01 05:08:39 +00:00
Goober5000 64724f8cc2 regression fix for rotating submodels
The POF format relies on some of the IDs being the values they are, so this change restores the original numbers.
2022-01-30 21:51:31 -05:00