Commit graph

1999 commits

Author SHA1 Message Date
zico 6ba89b5abd If sending robot fire of a non-controlled robot, send fire packet immediately (as the comment suggests); also reformatted robot fire send/do functions to improve readability a bit 2015-09-10 13:05:10 +02:00
Kp bdbd56c024 Use C++ <cinclude> style 2015-09-09 03:27:52 +00:00
zico 4a562bf098 Added multi_send_theif_frame() function to update thief bot more frequently (by PPS) and even if it is not controlled by a player to counter discrepancies caused by client side AI movement of the bot 2015-09-03 15:13:56 +02:00
zico 51049794ce Break screenshot numbering on 9999 instead of 99999 due to formatting of the string (it's still enough) 2015-09-01 19:06:14 +02:00
zico dcd91636d8 Do not duplicate objects for latecoming players as they will get dups from the host 2015-09-01 19:00:33 +02:00
zico 1aeb8505ee Rearranged some calls of start_time() and stop_time() (+ limited usage to single functions) to make sure time_paused does not go out of balance 2015-08-30 14:04:59 +02:00
zico 818017398d Added a little failsafe to screenshot function to make sure the game will not cause an endless loop if savenum ever rolls over 2015-08-30 12:47:47 +02:00
zico b5ac86c4f0 Slightly modified keyboard pitch and heading sensitivity so highest setting matches the original game running at ~60 FPS 2015-08-29 15:46:03 +02:00
zico 15757d552f Added STATE_MATCEN_VERSION for reading/writing matcen_info in savestates (equal to GAME_VERSION) instead of using STATE_VERSION 2015-08-27 18:55:14 +02:00
Kp fd5d7b800d Move reactor gun loop into calc_controlcen_gun_point 2015-08-26 03:15:10 +00:00
Kp 4434559e8e Write old matcen_info to D1 savegames
Fixes: 92814475a9 ("Use array<> for RobotCenters")
2015-08-26 03:15:10 +00:00
Kp 9ed4754009 Remove typedef valptridx<T>::array_managed_type managed_type##_array_t 2015-08-22 20:43:04 +00:00
Kp cc0e29d7a2 Blank out non-robot AI on save 2015-08-22 20:43:04 +00:00
Kp 2155c417cb Move array_managed_type into valptridx<T> 2015-08-22 20:43:04 +00:00
Kp f8008ca34f Only define object_array_t::object_array_t if VALGRIND 2015-08-22 20:43:04 +00:00
Kp e976a823df Shorten paging_touch_robot_maker 2015-08-22 20:43:03 +00:00
Kp 0f4d38ea6d Shorten paging_touch_robot 2015-08-22 20:43:03 +00:00
Kp 6a50a904a3 Shorten paging_touch_weapon 2015-08-22 20:43:03 +00:00
Kp 9bf8b8212d Shorten paging_touch_model 2015-08-22 20:43:03 +00:00
Kp 6265431fd9 Pass & to paging_touch_vclip 2015-08-22 20:43:03 +00:00
Kp 423c1c3f10 Use range_for for fuelcen.cpp 2015-08-22 20:43:03 +00:00
Kp 64ff1cda89 Only restore non-alpha when alpha was used 2015-08-21 03:12:35 +00:00
zico 30e909226f Fixed Primary weapon info position in HiRes cockpit mode; Removed redundant vulcan ammo display in Fullscreen Alt HUD #1 2015-08-18 19:17:24 +02:00
Kp 66da9c136e Cache do_explosion_sequence Robot_info lookups 2015-08-17 02:44:56 +00:00
Kp 080e052d65 Reorder fvi_sub object tests
Change to individual continue statements to reduce number of negations.
2015-08-17 02:44:56 +00:00
Kp 2eeca09ae1 Improve create_smart_children
Use accurate squared distance instead of quick non-squared distance.
Simplify target choice loop.
2015-08-17 02:44:56 +00:00
Kp 947145a194 Simplify player-got-hit sound check 2015-08-17 02:44:56 +00:00
zico fb6ea072e4 Repositioned (non Release) HUD level time output and FPS counter to fixed positions across all cockpit modes; Slight reformat for FPS counter and added FrameTime display (in ms) if -verbose is given 2015-08-16 15:37:30 +02:00
zico 57b4bd0281 Community wish: If friendly fire is disabled, also protect players from explosion damage caused by friendly players. This also protects against splash damage caused by oneself. 2015-08-16 13:25:07 +02:00
Kp 655e7b6f72 Optimize clearing ConsoleObject anim_angles 2015-08-14 03:02:04 +00:00
Kp e5683593ef Expand ZERO_VECTOR inline 2015-08-13 03:15:53 +00:00
Kp 5922d3cf9e Update endlevel !SHORT_SEQUENCE code
This rotted long ago, but the fixes are easy.  Clean it up in case
someone wants to activate it.
2015-08-13 03:15:52 +00:00
Kp c4118ee014 Improve caching when duplicating items 2015-08-13 03:15:52 +00:00
Kp 17b1943c5e Mark various per-file structures as static 2015-08-12 03:11:46 +00:00
Kp bc7c469ab2 Use array<> for more globals 2015-08-12 03:11:46 +00:00
Kp f15116f2cb Simplify multiplayer sound handling 2015-08-05 02:59:02 +00:00
Kp 6870b48710 Remove unused return value of digi_link_sound_to_object* 2015-08-05 02:59:02 +00:00
Kp 9fb9aef509 Remove unused return value of digi_link_sound_to_pos 2015-08-05 02:59:02 +00:00
Kp c80d12319a Use unqualified begin/end
Most call sites use unqualified begin/end and rely on using declarations
to pick an appropriate implementation.  Fix the sites that explicitly
requested std::begin/std::end.
2015-08-03 03:11:25 +00:00
Kp 49b0868230 Fix ambiguous return when constructor inheritance is missing
gcc-4.7 (and, if constructor inheritance is suppressed, later versions)
reject

	return objnum == object_none ? vcobjptr(static_cast<objnum_t>(object_first)) : objnum;

where objnum is a cobjptridx:

similar/main/digiobj.cpp: In lambda function:
similar/main/digiobj.cpp:564:85: error: operands to ?: have different types 'valptridx<object>::vcptr' and 'valptridx<object>::cptridx'
similar/main/digiobj.cpp:564:85: error: inconsistent types '<type error>' and 'valptridx<object>::vcptr' deduced for lambda return type

Fix it by removing the ternary operator and adding an appropriate
conversion cast.
2015-08-03 03:11:25 +00:00
Kp 555ff20ae9 Move render_state.h up for gcc-4.7 static_assert
In gcc-4.7, <bits/hashtable.h> uses static_assert in a way that the
preprocessor considers to have 3 arguments.  Move render_state.h up to
ensure that <bits/hashtable.h> is included before
"compiler-static_assert.h" converts static_assert into a 2 argument
macro.
2015-08-03 03:11:25 +00:00
Kp 2fb03da475 Inline multi_send_endlevel_start secret for D2 2015-08-03 03:11:25 +00:00
Kp 84bd64a14c Remove default argument for basic_ptridx(magic,array) 2015-07-29 03:05:28 +00:00
Kp 4d8ae44794 Add helper macro DXX_CONSTANT_TRUE 2015-07-29 03:05:28 +00:00
Kp a2816617fe Pass reactor& to read_model_guns 2015-07-25 23:10:48 +00:00
Kp c9dff229f1 Remove dead AI fire leading code 2015-07-25 23:10:47 +00:00
Kp c942d28197 Use accessor for grs_bitmap::bm_type 2015-07-25 23:10:47 +00:00
Kp 37a830f400 Switch AI key lookup 2015-07-25 23:10:46 +00:00
Kp b8cc2f4172 Inline multi_i_am_master 2015-07-25 23:10:46 +00:00
Kp 81abf3666b Reorder hoard kill tests 2015-07-25 23:10:46 +00:00