Commit Graph
245 Commits
Author SHA1 Message Date
BMagnu 9930d435a2 Animation Rework Phase 3 - Fixes for Multi (#3846)
* Switch Multimsg to use netsig for animations

* Unique-ify animation ID's

* Clang Tidy

* Implement first suggestions

* Implement suggestions 2

* Add get model instance safeguard
2021-12-25 03:01:13 +09:00
BMagnu 79283d9002 Animation Rework: Phase 3 (#3793)
* Refactor submodel handling by animation code

* Add Animation Flags

* Add Codeowner for animations

* Add new Animation Table

* Time Fix

* Weapon Launched trigger + bugfixes

* cleanup rebase artifact

* Add WeaponFired triggers

* Table deprec

* Allow multiple animations on the same trigger

* Add Translation segment

* Integrate new Animation workflow

* Small Fixes

* Submodel not found safety

* Add Pause

* Also allow dockport name

* Update Animation SEXP/Scripting + fix change ship class issue

* Multi fix + disable old animation sexp

* Weapon Scripting Function

* Fix bugs and replace bind

* Add onspawn trigger type

* Fix issue on ship death

* Fix Absolute Rotation

* Fix erroneous application of animation, add random start phase

* Disable Translation

* Fix Clang

* Incorporate feedback

* Incorporate feedback 2
2021-12-10 14:44:13 +09:00
Asteroth 375e1caca9 Remove 'stream' weapon handling (#3720)
* remove stream handling

* unused variable

* turn stream' into an unused flag

* yes really whitespace changes just for clang tidy
2021-10-22 16:15:56 +09:00
BMagnu 12be7576f7 Animation Overhaul: Phase 2 (#3609)
* Add Generic Rotation Segment

* SEXPd rotations work

* Fully replace old animation system

* Add sound segment

* Fixes

* Trigger Hangarbay doors for lone player without AI

* Address Warnings

* Fix Docking ANimations + some bugs

* Fix sound issue + docking bug

* fix bugs, add multi handling

* Change direction into enum class

* Address feedback

* Futher clean aicode

* Address feedback

* Add Multi packet constexprs

* Fix multi constexprs

* Clarify AIS_DOCK comments

* Address multi issues

* Clang somehow detects issues where there are none...
2021-10-06 08:50:58 +09:00
Goober5000 30d4455417 patch up scripted kills
When a ship is killed via scripting, the killer should be credited for the kill in the mission log and the correct hull percentage should be used.  Also, the script should work with either the ship or its weapon passed as the killer parameter.
2021-09-29 01:41:36 -04:00
Asteroth e4661b00b1 Add Type 5 beams (#2817)
* wip

* basics are working

* turret case is handled

* better fighter beam handling

* missing commit?

* handle missile spawn

* clean up, commenting and ssb handling

* random in sphere and per burst rot counts for "share random" flag

* clean up, clarity and comments

* accidental whitespace changes

* bugfix

* NULL -> nullptr

* more efficiency/clarity

* review tweaks and bugfixes
2021-06-09 18:53:53 -04:00
JohnAFernandez 9d7acbcc9d Update Function Name and comment to describe what it actually is (#3451)
Change find_player_id to find_player_index, since that is what it does
2021-05-29 19:21:36 -04:00
JohnAFernandez 89d2d6ed46 Fix missile indicators not going away
Add the should be dead flag, in order to properly make the missiles go away, and not just detonate.
2021-03-23 20:31:04 -04:00
JohnAFernandez 06f198afc1 Forgot one 2021-03-23 20:31:04 -04:00
JohnAFernandez 19a289539a More Whitepsace and Dealing with Crazy old CI 2021-03-23 20:31:04 -04:00
JohnAFernandez c14653b391 Whitespace Adjustments 2021-03-23 20:31:04 -04:00
JohnAFernandez 42c19cdfee Fix Missile Syncing Between Server and Client 2021-03-23 20:31:04 -04:00
JohnAFernandez 420c7ec171 Play directive completion sounds for clients (#2900)
* Allow Text to show failure on Clients

Function was accidentally returning false before sending an update on failure.

* Play directive sounds for clients

This adds a short client version of the function that initiates the directive completion sound.

* forgot to remove a failed experiment
2021-03-19 05:39:05 -04:00
Baezon ce1907c52a flak should use normal mflash methods 2021-03-15 18:30:47 -04:00
Goober5000 c067651498 add send-message-chain
Implements send-message-chain as described in issue #3185.  Also fixes the default argument for message priority, and mirrors the default argument fix to qtFRED.
2021-02-14 00:23:57 -05:00
Goober5000 020f14fb51 allow rotating submodels to rotate around an arbitrary axis 2021-01-13 14:01:28 -05:00
JohnAFernandez 521430fb9a Fix the support ship refilling ships to the wrong secondary capacity 2020-12-30 23:37:49 -05:00
JohnAFernandez d41d397e33 Keep nullptrs from crashing the fire flak packet. 2020-12-27 01:36:10 -05:00
JohnAFernandez b8e9b3c0ec Prevent Fire_turret from using null values 2020-12-27 01:36:10 -05:00
Taylor Richards 5f7b7ef702 fix issues discovered during beam test
- fix incorrect assertions for fighter beams
 - fix subsystem handling for spawned/floating beams
2020-12-24 09:45:17 -05:00
Taylor Richards 80d68ccc27 address issues raised during code review 2020-12-24 09:45:17 -05:00
Taylor Richards ff5cb3cdf8 update turret_fired_packet() and flak_fired_packet()
- send pitch and heading as floats
 - use proper weapon id rather than guessing (fixes #2877)
2020-12-24 09:45:07 -05:00
Taylor Richards 5d410416c9 fix issues with client_update_packet()
- use correct macro for player_id
 - support more subsystems
 - optimize size of secondary weapon info
 - handle future compatibility issues with secondary ammo
2020-12-24 09:42:05 -05:00
Taylor Richards 5395cabdb3 support larger number of subsystems in various packets
secondary_fired_packet()
 turret_fired_packet()
 player_order_packet()
 homing_weapon_info()
 flak_fired_packet()
2020-12-24 09:41:59 -05:00
Taylor Richards 0e55c36877 update netgame_descript_packet()
(based on PR 2109 by Cyborg17)

 - support compaign descriptions (Mantis 1826)
 - allow sending multiple packets to get entire description
 - update description of selected game on join screen if needed
2020-12-24 09:38:23 -05:00
Taylor Richards 9b97821616 optimize sexp_packet()
- chnage op count data type to short
   (can't have more space than that anyway)
 - get rid of some loops in favor of plain memcpy()
 - fewer magic numbers
 - use SEXP_MAX_PACKET_SIZE to fix packet size discrepancy
2020-12-24 09:38:23 -05:00
Taylor Richards f989cf2c3a update beam_fired_packet()
- add bfi_flags
 - add proper bank/point data for fighters
 - allow for more than 255 subsystems
 - add data for targeted subsystem
 - add support for TARGETING_COORDS flag
 - add support for FLOATING_BEAM flag
 - add fire method
 - add initial packet support for type F beams
2020-12-24 09:38:23 -05:00
Taylor Richards dc1128d327 fix issues with wss_slots_data_packet()
- don't depend on hard-coded limits
 - store weapon and counts together
 - fix incorrect ship_class assignment
2020-12-24 09:38:23 -05:00
Taylor Richards 88e8d61816 optimize size of wss_update_packet() 2020-12-24 09:38:23 -05:00
Taylor Richards 3de39b6274 tweak stats block packet to handle certain limits better 2020-12-24 09:38:23 -05:00
Taylor Richards a48b5e8203 scale MAX_SHIPS_PER_PACKET with packet size 2020-12-24 09:38:23 -05:00
Taylor Richards 43a1952142 allow SHRT_MAX ship types in wss_slots_data_packet() 2020-12-24 09:38:23 -05:00
Taylor Richards af45954bab fix issues with post_sync_data_packet()
- allow for SHRT_MAX ship types
 - support total number of primary weapon banks
 - support total number of secondary weapon banks
2020-12-24 09:38:23 -05:00
Taylor Richards 796609b851 optimize size of player_settings_packet() 2020-12-24 09:38:23 -05:00
Taylor Richards 495efde52f optimize size of netplayer_slot_packet() 2020-12-24 09:38:23 -05:00
Taylor Richards 67d17e2c28 optimize size of ship_create_packet() 2020-12-24 09:38:23 -05:00
Taylor Richards 8e40c14a49 optimize size of several player packets
player num/index should always be in 0-11 range
so only 1 byte is required
2020-12-24 09:38:23 -05:00
Taylor Richards 69fd25b376 optimize size of game_chat_packet()
server_msg is 0-2, which doesn't need 4 bytes
2020-12-24 09:38:22 -05:00
Taylor Richards 752f985433 optimize size of host_captain_change_packet()
don't need 4 bytes for a true/false
2020-12-24 09:38:22 -05:00
Taylor Richards 9e7a6eaee2 small optimization of process_game_query() 2020-12-24 09:38:22 -05:00
Taylor Richards 0a3465b4aa avoid breaking ship_status_packet() with new controls 2020-12-24 09:38:22 -05:00
Taylor Richards 454ddce232 fix join_request data
- tightly packed
 - better cross-platform compatibility
2020-12-24 09:38:22 -05:00
Taylor Richards c943600ee3 adjust *_STRING() macros to save space
- ADD/GET_STRING() will use 1-byte lengths (up to 255 chars)
 - ADD/GET_STRING_16() will use 2-byte lengths (up to 65,535 chars)
 - ADD/GET_STRING_32() added for compatiblity (game_active packet only!)
2020-12-24 09:38:22 -05:00
Goober5000 88c1d8a02a consolidate model instance code 2020-12-18 01:32:43 -05:00
Taylor Richards cd5e1c297b replace old multicast code with mdns/dns-sd 2020-11-21 00:57:03 -05:00
JohnAFernandez 573746f229 Merge pull request #2759 from notimaginative/fix_multi_screen_timeouts
Fix multi screen timeouts
2020-11-13 02:33:50 -05:00
Asteroth 5dbda7efd0 Merge pull request #2858 from Baezon/multi-beam-prep
Add beam parameter validation
2020-11-08 22:43:58 -05:00
Taylor Richards 463ca5ed01 allow multi clients to proceed to fiction viewer and cmd brief 2020-11-07 16:44:06 -05:00
Baezon 9034e4e043 revert and only do beam validation 2020-11-04 13:31:09 -05:00
JohnAFernandez f21b1a7ace Multiplayer Resimulation for Client Fired Linear Weapons (Rollback) (#2788)
* Multiplayer Dumbfire Rollback

This creates a packet that sends the relative position and orientation info for a primary or dumbfire missle shot.  The client creates this packet when firing those two types of weapons and sends it to the server.  The server goes back to the frame that the client fired the weapon and quicky resimulates all the frames in-between.

This includes collision detection, restoring positions, orientations and veloicties, but not subsystem orientations.

* Address Feedback

* allow clients to send subsystem info

* Check for object number not weapon number

* Readability Adjustment
2020-11-03 22:56:25 -05:00