30 Commits
Author SHA1 Message Date
Goober5000 6bdd80bed3 fix ship:warpIn() behavior for docked ships
As described in #6445, the `warpIn()` script function did not work correctly for docked ships because the dock leader flag was not set.  So, set the flag, but make sure to set it only for the first ship for which `warpIn()` is called.  And make sure the flag is removed after the ship finishes arriving.

Also remove an `Int3()` in `shipfx_warpin_start()`.  (This Int3() was not actually in the original Volition source code release.)

Fixes #6445.
2024-11-29 21:32:04 -05:00
Goober5000 31a86e3f3d all the consts!
Some experimentation resulted in a lot of const-cascading.  This PR applies `const` to a large number of functions.
2024-11-07 23:33:13 -05:00
Baezon 34b04b1ca8 PR review fixes 2020-07-18 22:28:51 -04:00
Baezon 6e7908833a more fix 2020-07-17 23:40:51 -04:00
Baezon c49cf7fd6a bugfix 2020-07-17 21:00:26 -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 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
niffiwan 37f2c8249d Fix issues with docked ships warping
There's a number of issues fixed here:
* Radar blips of docked ships were the wrong colour in stage 1
* You could target docked ships in stage 1
* Docked ships thrusters were visible in stage 1
* Hyperspace warptype ship could initially appear at their
warp-destination, then spring back to the correct location to complete
the rest of their warpin (because a docked ship had higher speed than
the dock leader)

There may also be a number of other subtle bugs with docked warpin;
e.g. I suspect (but haven't tested) that AI turrets could fire on
docked ships during warpin
These should also be fixed

Lastly, fixes issue #1867
2019-02-24 09:20:57 +10:00
CasparKielwein e622d81e89 remove unused functions and defines in object/code 2018-12-29 16:45:47 +01:00
Goober5000 cf7706eb1c might as well add the extents functionality too 2018-11-20 13:49:50 -05:00
Goober5000 86f67c3c84 warp should be pretty much working correctly now
precalculate warp values before beginning warp, and use them throughout the warp instead of recalculating in every function
standardize on always using the entire docked assembly for length and half-length calculation, instead of some places the assembly and some places just the dock leader
consolidate and simplify the compute_warpout* functions in light of the above
2018-11-20 13:49:49 -05:00
z64555 4129551341 Fixes pointer access violation when docked ships warp out by moving dock_undock_all call to red_alert_delete.
It was previously thought that dock_undock_all() was supposed to be within ship_cleanup() and was safe to do so. Nope.

dock_evaluate_all_docked_objects makes the assumption that the dock_list is still valid, so if the function called by it happens to nuke the dock_list (like with ship_cleanup) then it'll work with invalid pointer values.
2017-02-04 22:12:14 -06:00
z64555 944ed03553 Added undock_all routines. Added asserts to public methods. 2017-02-01 01:34:29 -06:00
Echelon9 29faabdfb3 Simplify duplicative object/ includes. 2015-06-22 20:24:31 +10:00
Goober5000 b7db596f12 change dock_function_info to a class
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10074 387891d4-d844-0410-90c0-e4c51a9137d3
2013-11-17 20:24:42 +10:00
Goober5000 6b97f368e8 sync functions for freeing dock instances
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10059 387891d4-d844-0410-90c0-e4c51a9137d3
2013-11-17 20:24:42 +10:00
Goober5000 d310647bfe clear dock lists when objects are deleted, and redundantly clear them between missions and when object instances are destroyed (Mantis #2952)
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10058 387891d4-d844-0410-90c0-e4c51a9137d3
2013-11-17 20:24:42 +10:00
Goober5000 5aa3bddf70 change object from a struct to a class, since it contains the objsnd_num field :-/
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@9995 387891d4-d844-0410-90c0-e4c51a9137d3
2013-11-10 18:28:55 +10:00
Echelon9 93622a3748 PVS-Studio fix: V802 On 32-bit platform, structure size can be reduced from 40 to 32 bytes by rearranging the fields according to their sizes in decreasing order. 2011-08-28 07:00:38 +00:00
portej05 719825f80d The big CVS comment removal. This chops approx. 3.5mb off a full checkout.
I've tested this through compiling and through hand checking. 
Normalises line endings in ALL files to \n.
2009-06-20 08:08:20 +00:00
taylor f09c7e2d03 fix things that strict compiling balked at (from compiling with -ansi and -pedantic) 2006-09-08 06:14:44 +00:00
Goober5000 e27dfe36ea add another method for calculating dimensions of docked objects, plus improve an existing one
--Goober5000
2006-07-21 05:41:10 +00:00
Goober5000 7e41877b7b proper capitalization according to Volition 2006-04-20 06:32:30 +00:00
Goober5000 2394e9801b remove PreProcDefine #includes in FS2
--Goober5000
2005-07-13 03:35:36 +00:00
Goober5000 3475444eee moved some prototypes that WMC put in the header file back to the implementation file
--Goober5000
2005-05-27 03:37:53 +00:00
Goober5000 7441e76428 hmm, rolled back to 2.3
--Goober5000
2005-05-27 03:36:20 +00:00
Goober5000 5188f6ca9b removed some old unnecessary prototypes WMC had added
--Goober5000
2005-05-27 02:37:29 +00:00
taylor 7f786136a6 s/vector/vec3d/g, better support for different compilers (Jens Granseuer) 2005-04-05 05:53:25 +00:00
wmcoolmon 02e75ddd49 Merge of WMC's codebase. "Features and bugs, making Goober say "Grr!", as release would be stalled now for two months for sure" 2005-03-03 06:05:32 +00:00
Goober5000 099d2700d0 multiple ship docking :)
don't tell anyone yet... check the SCP internal
--Goober500
2005-01-11 21:38:51 +00:00