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
Baezon
858356cfd3
some fixes to beam collision
2020-10-26 11:43:10 -04:00
CasparKielwein
271d3f97bd
remove unused functions obj_add_pair and obj_add_pairs in object code.
...
These functions where not used anymore and probably made redundant
by swifties changes to the collision system in 2012.
2019-05-04 11:30:54 +02:00
CasparKielwein
e70d6a89ee
objcollide cleanup: declare local variables at point of first use
...
made some loops range based.
removed some typedef struct, as it is c++.
2019-05-04 11:30:16 +02:00
CasparKielwein
3e7e7cde00
made functions from objcollide, which are only used in .cpp local to compilation unit
2019-05-01 10:41:27 +02:00
CasparKielwein
f63667b29e
Cleanup in objcollide: Remove code that was commented out
2019-05-01 10:07:35 +02:00
CasparKielwein
b42fc2122a
Cleanup in object collide code.
...
A bit of small cleanups in preparation of larger scale refactoring.
remove unused member heavy_collision_cm_pos of collision info struct,
which was set in several places but never used.
2019-05-01 09:44:19 +02:00
CasparKielwein
e622d81e89
remove unused functions and defines in object/code
2018-12-29 16:45:47 +01:00
Goober5000
e581a3b8a3
make these variables global
2018-12-16 14:28:47 -05:00
Goober5000
e9a8b9d8a2
make vectors static, per discussion on Discord
2018-12-15 16:45:58 -05:00
asarium
15dc45cc0a
Remove -old_collision command line option
...
The new system has been tested pretty thoroughly so I think it is time
to remove this option.
2018-10-21 18:36:59 +02:00
Peter Mitsis
666c177dec
Fix asteriod typo
...
Replaces instances of 'asteriod' with 'asteroid'.
Signed-off-by: Peter Mitsis <[email protected] >
2018-04-14 19:57:03 -04:00
asarium
6922d3ca2c
Integrate the existing monitor system into the new tracing system
...
This writes the monitor updates as counter events into the event trace
file.
2016-12-21 16:10:01 +01:00
asarium
d64196eff0
Refactor tracing subsystem
...
The new design is centered around the Event Trace JSON format but it
should still be possible to adapt it for other profiling tools. The old
profiling system has been removed.
2016-11-24 10:26:21 +01:00
Goober5000
d9c9647919
Merge pull request #947 from MageKing17/cleanup/miscellaneous
...
Some miscelleaneous cleanup commits.
2016-09-17 23:15:17 -04:00
asarium
26f45732da
Move profiling functions into separate folder
2016-09-14 12:26:53 +02:00
MageKing17
bce17561ed
Change pointless .size() calls into .empty() calls.
...
The codebase had quite a few instances of .size() being called and then checked to see if it was 0 or not (or less than 1, or greater-than-or-equal-to 1, which are basically equivalent), when .empty() could be called instead (negated or not, depending on what the original condition was).
2016-09-07 18:36:12 -07:00
asarium
1a212868a0
Add support for outputting profiling data as JSON
...
This output is compatible with the Chromium tracing viewer which
provides a very nice visual overview of what FSO does in a frame.
2016-08-29 20:18:51 +02:00
Fabian Woltermann
127976cd74
Weapon info flags conversion ( #851 )
2016-08-18 23:17:41 -07:00
asarium
0a7800d3ea
And another batch of warning fixes
2016-08-15 18:55:35 +02:00
Fabian Woltermann
770fce8de5
Bitset flags -- take 2 ( #775 )
...
This introduces a new mechanism for handling bit flags. Instead of using an int (or two, or three) to write bits into, this uses the std::bitset in a wrapper class that accepts an enum class as input. This means that certain classes of errors we've had a few of in the engine, where a coder used the wrong set of flags or checked them against the wrong variable (SF_STEALTH vs SIF_STEALTH, for example) can now be detected at a compiler level rather than not at all.
2016-08-12 16:13:50 -07:00
asarium
7b352e511c
Add new memory tracking subsystem
...
This expands the existing system which only worked on Windows to all
supported platforms.
If the MSVC debug runtime is not present then its behavior is emulated
by adding a header to each allocated memory block.
2016-07-29 11:02:45 +02:00
MageKing17
54e052bc2f
Don't assume non-turning weapons have a fixed velocity.
...
Somewhat related to PR #528 , this changes the branch that assumes constant velocity from checking for an absence of the WIF_TURNS flag to checking for the presence of the PF_CONST_VEL flag (because non-turning weapons can be given an acceleration time).
2016-01-31 18:54:41 -08:00
MageKing17
37a98b8cf8
Check B->parent_sig before checking B->parent in objcollide.cpp.
...
Could cause problems with recycled objects (specifically, I had a crash once because "Objects[B->parent].instance" was well over MAX_SHIPS due to being a weapon instead of a ship, causing the "Ships[Objects[B->parent].instance].team" reference to fail hard).
2016-01-26 23:59:23 -08:00
The E
a413255728
Renaming vm_vec_dotprod to vm_vec_dot
2015-12-01 20:35:47 +01:00
Goober5000
5fb98551c9
collision optimization: two objects which do not move will never collide with one another
2015-09-21 16:30:19 -04:00
Goober5000
bd3cd7eb18
Merge pull request #195 from Echelon9/fix/sort-uniq-includes
...
Review and refactor #include's
2015-08-19 00:05:02 -04:00
Echelon9
cd503fd2e4
Fix: object/objcollide.cpp:1247:8: warning: variable ‘max’ set but not used [-Wunused-but-set-variable]
2015-07-04 16:10:15 +10:00
Echelon9
e7e046f949
Fix: object/objcollide.cpp:1248:8: warning: variable ‘overlap_min’ set but not used [-Wunused-but-set-variable]
2015-07-04 16:08:40 +10: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
asarium
189f23a341
Change SCP_hash_map to SCP_unordered_map
...
Also uses std::unordered_map on every platform now
2015-05-16 11:40:10 +02:00
m_m
de57f043da
From MageKing17 and me: Fix for Mantis 3128: Docking related crash - dock_list isn't initialized This patch makes the copy constructor and the assignment operator of the object class private as it contains members that should not be copied.
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11170 387891d4-d844-0410-90c0-e4c51a9137d3
2014-11-08 10:57:03 +10:00
m_m
bd602cc1a3
Revert 11158 as it breaks FRED compilation.
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11159 387891d4-d844-0410-90c0-e4c51a9137d3
2014-10-27 18:23:02 +10:00
m_m
89cd36a242
Fix a crash reported by Axem related to freeing the dock list of an object. This was caused by freeing the dock list from the destructor of an object which meant that copies of an object would corrupt the original object instance. To make sure that doesn't happen again the copy constructor and assignment operator of object have been made private.
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11158 387891d4-d844-0410-90c0-e4c51a9137d3
2014-10-27 18:23:02 +10:00
Echelon9
b2231f28d1
Fix Coverity 1102734 Uninitialized scalar field: In collider_pair::collider_pair(): A scalar field is not initialized by the constructor (CWE-457). From Flaming_Sword.
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10386 387891d4-d844-0410-90c0-e4c51a9137d3
2014-02-02 10:52:50 +10:00
Goober5000
26f8b5fed1
make collider_pair an actual class since its constructor is called by hash_map
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@9891 387891d4-d844-0410-90c0-e4c51a9137d3
2013-10-07 20:02:31 +10:00
Goober5000
7e5b2aee52
turn mc_info into a plain data struct, part 2
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@9822 387891d4-d844-0410-90c0-e4c51a9137d3
2013-09-26 18:51:36 +10:00
Zacam
0502b4d648
Revert of 9410. Apparently not ready for prime time, what with older compilers that don't seem to understand C++0x types (and complaints about upgrades to enable it), and it apparently (under said compilers) isn't any faster than stdext::hash_set anyway.
2012-12-10 08:23:19 +00:00
Zacam
5f998ff345
Mantis 2746: Fix for geometry batcher, from Valathil. Update for Mac by Echelon9.
2012-12-09 02:59:02 +00:00
Swifty
6dfa635811
Added better object and weapon cleanup code for the new collision detection code when max object and weapon counts are reached.
2012-09-10 05:08:16 +00:00
Swifty
d8d6e86fd6
Collision caching properly resets between missions.
2012-09-10 03:58:14 +00:00
Swifty
c6c12fc251
go_even_faster: Improved collision detection performance by rewriting broadphase and narrowphase testing.
2012-08-11 21:14:53 +00:00
Goober5000
b0af0aa71a
fix for Mantis #2673 , following Valathil's detective work
2012-06-30 23:31:48 +00:00
Echelon9
dc4371680a
Clear a whole set of LLVM warnings - some of these would have caused memory fubars, so should marginally improve stability
2012-01-15 08:08:15 +00:00
The_E
59cbde3d9e
Adds sexps to manipulate a ships' collision groups. If two objects are members of the same collision group, they will not collide with each other.
2011-06-28 08:36:54 +00:00
The_E
083a84feff
Swifty's go-swift stuff. Makes collision detection slightly less insane.
2010-12-22 14:42:21 +00:00
Sushi
8c6895a029
Re-added collision physics, added basic landings support (still needs some work)
2010-09-13 14:27:42 +00:00
Sushi
5704dce248
Fix a bug where additive weapon velocity would sometimes cause primary shots to pass through a target
2010-05-25 16:25:41 +00:00
Wanderer
cd15f39847
lua handled collision groups and lua bitwise ops library
2010-01-05 18:00:01 +00:00
Wanderer
0715c8d504
Change to collision prediction when using additive weapon velocity. Change to allow 'arm_radius' to sue homing position instead of homing object pos as distance measuring point. Allow weapons with arm_radius to count as armed if they collide with intended target.
2009-09-02 08:13:39 +00:00