Commit graph

470 commits

Author SHA1 Message Date
Kp 51b06f6cdc Move Fusion_charge to player_info
This eliminates some ugly hacks regarding remotely generated fusion
shots.
2016-12-10 17:51:09 +00:00
Kp 6c85086a43 Pass vcsegptridx to multi_send_light_specific 2016-12-10 17:51:07 +00:00
Kp 515476f02b Propagate constant third parameter of call_object_create_egg 2016-12-05 00:26:11 +00:00
Kp 31f330c0ff Pass vcsegidx to multi_send_door_open_specific 2016-12-05 00:26:10 +00:00
Kp fe44705d2d Pass vcsegidx to multi_send_effect_blowup 2016-12-05 00:26:10 +00:00
Kp 6bffe9949e Pass vcsegidx to multi_send_create_powerup 2016-12-05 00:26:09 +00:00
Kp 82b068bf9c Pass vsegidx to multi_send_door_open 2016-12-05 00:26:09 +00:00
Kp b5be5f2099 Pass vcwallptridx to multi_send_hostage_door_status
Avoid recomputing the wall pointer that the caller already had.
2016-12-05 00:26:09 +00:00
Kp 8817307f23 Create duplicate powerups with movement MT_NONE
zicodxx reported an assertion failure when powerup duplication was
enabled.  Local debugging shows that some levels give preplaced powerups
a movement type of MT_NONE rather than MT_PHYSICS.  Such powerups have
undefined data in their mtype.phys_info branch, which confuses the
physics simulation code.  Powerups only need MT_PHYSICS to bounce away
from their spawn site.  Preplaced powerups never move.

Add assertions that preplaced powerups are MT_NONE.  Change the
duplication call to create the duplicates with movement MT_NONE.

Reported-by: zicodxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/268>
2016-11-20 23:12:01 +00:00
Kp 0c219e596e Use enum for object movement type 2016-11-20 23:12:00 +00:00
Kp 4497812674 Use enum for object type 2016-11-20 23:12:00 +00:00
Kp 7f9d54a241 Combine multi_endlevel_score player flags updates 2016-11-19 17:24:52 +00:00
Kp fdc0575133 Cache goal textures
Find the index of the red/blue/hoard goal textures once when
multi_apply_goal_textures starts, instead of each time a goal segment is
found.
2016-11-12 18:10:09 +00:00
Kp 36f23e8d60 Use enum class for multi_send_endlevel_start 2016-11-12 18:10:09 +00:00
Kp 7a0a20d455 Remove secret-level flag in D2 MP message
It is always zero.
2016-11-12 18:10:08 +00:00
Kp f6ca0abf5f Fold multi_do_escape flag handling 2016-11-12 18:10:08 +00:00
Kp 61567eeed0 Move player::KillGoalCount to player_info 2016-11-12 18:10:07 +00:00
Kp 1060c8fabb Move player::net_kills_total to player_info 2016-11-12 18:10:07 +00:00
Kp 411b623aa7 Move player::net_killed_total to player_info 2016-11-12 18:10:07 +00:00
zico b508e2a294 Restrict powerup repopulation for Multiplayer as well as sending and processing of inventory packets to NETSTAT_PLAYING consistently. 2016-11-12 15:55:37 +01:00
Kp 930c4c6a99 Remove write-only variable multi_goto_secret
multi_goto_secret is read only to decide whether to write a new value to
it, but never to change other control flow.
2016-11-10 04:22:19 +00:00
zico 8bd3eaad4c Fixed misleading indentations. 2016-10-31 11:36:48 +01:00
zico 78ad83a134 Fixed compile-time errors when using use_udp=0. Still some warnings but it builds. 2016-10-31 11:21:59 +01:00
Kp ddc16dac8b Use range_for in multi_check_for_killgoal_winner 2016-10-21 02:16:47 +00:00
Kp 5c872830a1 Remove unused message MULTI_KILL 2016-10-21 02:16:47 +00:00
Kp 779738fa80 Add special handling for multi_do_reappear get_ghost_id
multi_do_reappear is overloaded to be used both on ghosts and on live
players.  This causes a diagnostic because the *_id checks expect
exactly one type: either test for ghost or test for player, but not test
for and accept both.  Open code the type check to support both.
2016-10-15 21:17:02 +00:00
Kp 25f5fc231a Pass player_info to add_points_to_score 2016-10-15 00:53:19 +00:00
Kp ecb91955ae Move player::score to player_info 2016-10-15 00:53:19 +00:00
Kp 8327d85c76 Remove unused get_multi_endlevel_poll1
The only caller for get_multi_endlevel_poll1 was DoEndLevelScoreGlitz,
which only called it on an unreachable path.  That path is now gone, so
remove get_multi_endlevel_poll1.
2016-10-15 00:53:14 +00:00
Kp 3024bb8bbe Pass object_base &to create_player_appearance_effect 2016-10-02 19:35:34 +00:00
Kp 171e303adb Pass player object to check_trigger_sub 2016-10-02 00:34:47 +00:00
Kp a62cc369ab Expand get_local_player_shields
It was a convenient transition macro, but its presence was always
intended to be temporary.  Expand it to ease the conversion of usage
sites that already have access to local player data through a local
variable.
2016-10-02 00:34:40 +00:00
Kp fe99fe232b Expand get_local_player_vulcan_ammo
It was a convenient transition macro, but its presence was always
intended to be temporary.  Expand it to ease the conversion of usage
sites that already have access to local player data through a local
variable.
2016-10-02 00:34:40 +00:00
Kp ce65735c04 Expand get_local_player_flags
It was a convenient transition macro, but its presence was always
intended to be temporary.  Expand it to ease the conversion of usage
sites that already have access to local player data through a local
variable.
2016-10-02 00:34:40 +00:00
Kp 1b321ac0c6 Expand get_local_player_secondary_ammo
It was a convenient transition macro, but its presence was always
intended to be temporary.  Expand it to ease the conversion of usage
sites that already have access to local player data through a local
variable.
2016-10-02 00:34:40 +00:00
Kp 6a3ded191f Move EDITOR to dxxsconf.h; rename to DXX_USE_EDITOR
Rename symbol EDITOR to DXX_USE_EDITOR to show that it is a DXX
symbol, not one inherited from a library.  Move it to dxxsconf.h to
shorten the command line.

This is a mostly automated transform, but the changes to SConstruct were
manual.

git grep -wl EDITOR -- '*.h' '*.cpp' | xargs sed -i -e 's/^\s*#ifdef \(EDITOR\)\>/#if DXX_USE_\1/' -e 's/\s*#\(el\)\?if \(.*\)defined(\(EDITOR\))/#\1if \2DXX_USE_\3/' -e 's/^\s*#ifndef \(EDITOR\)\>/#if !DXX_USE_\1/'
2016-09-11 18:49:16 +00:00
Kp 435aa5a020 Move USE_UDP to dxxsconf.h; rename to DXX_USE_UDP
Rename symbol USE_UDP to DXX_USE_UDP to show that it is a DXX
symbol, not one inherited from a library.  Move it to dxxsconf.h to
shorten the command line.

This is a mostly automated transform, but the changes to SConstruct were
manual.

git grep -l USE_UDP -- '*.h' '*.cpp' | xargs sed -i -e 's/^\s*#ifdef \(USE_UDP\)$/#if DXX_\1/' -e 's/\s*#\(el\)\?if \(.*\)defined(\(USE_UDP\))/#\1if \2DXX_\3/'
2016-09-11 18:49:15 +00:00
Kp 976e4206c0 Switch multi.cpp to C++ casts 2016-09-04 00:02:52 +00:00
Kp ee1003f29f Move conditionally compiled code into namespace dsx 2016-08-25 04:05:32 +00:00
Kp 38b8a34d19 Normalize function return type placement
Using "type\nfunction(args)" confuses some parsing scripts.  Switch to
the standard "type function(args)" style.  Fix sites where keyword
"static" was used after the return type.
2016-08-25 04:05:31 +00:00
Kp 18a479a308 Change multi_send_macro to handle invalid inputs
No caller passes a key value other than [KEY_F9, KEY_F12].  If one did,
an invalid array reference would occur.  Restructure the code to return
on invalid inputs.  This fixes a flow control analysis warning.
2016-08-25 04:05:31 +00:00
Kp 3d6108ae09 Include inttypes.h in playsave.cpp
Mako88 reports that an unspecified environment fails to build
playsave.cpp.  The failure is because PRIuFAST32 is undefined.  In most
environments, SDL automatically includes inttypes.h, which provides
PRIuFAST32.  In this unspecified environment, SDL does not include
inttypes.h.  Include it explicitly to ensure the definition is
available.
2016-08-20 22:28:43 +00:00
Kp fca91b78c7 Remove useless casts in similar/main/multi.cpp 2016-08-19 03:41:41 +00:00
Kp b9399c5048 Switch multi_process_bigdata to use inttypes format macros
Most 64-bit systems use `unsigned long` for `uint_fast32_t`.  Some
32-bit systems use `unsigned int` for `uint_fast32_t`.  To handle this,
multi_process_bigdata used casts to `unsigned long` and a format string
of `%lu`.  Switch to inttypes format macros so that the format strings
are correct without requiring a cast to handle systems where
`uint_fast32_t` is not `unsigned long`.
2016-08-19 03:41:41 +00:00
Kp 3a86bc6f40 Simplify various multi loops 2016-07-25 03:48:09 +00:00
Kp c636dc4b98 Convert various static const expressions to constexpr 2016-07-16 16:52:04 +00:00
Kp a274ea0ee8 Remove useless cast in multi.cpp 2016-07-15 03:43:03 +00:00
Kp ed7376c695 Pass object & to update_item_state::process_powerup 2016-07-14 01:59:04 +00:00
Kp d5a64c4f33 Factor out object count tests
An optimizing compiler should inline these tests.  Moving them out makes
the code easier to read, since the statements can focus on what is
updated, rather than how it is done.
2016-07-14 01:59:04 +00:00
Kp 663d6df312 Use ?: for MultiLevelInv_CountPlayerInventory flag increment 2016-07-14 01:59:03 +00:00
Kp 023ed08c1c Switch to vcobjptr for MultiLevelInv_CountPlayerInventory player
The index is not needed and the player should not be modified by the
scan.
2016-07-14 01:59:03 +00:00
Kp e65b93b750 Cache reference to MultiLevelInv.Current
Modify MultiLevelInv_CountPlayerInventory to ease conversion to a member
function.
2016-07-14 01:59:03 +00:00
Kp 96d9ae4e4a Optimize initial MultiLevelInv clear
Change the clearing of MultiLevelInv during initialization to reduce
wasted stores.  MultiLevelInv has three fields.

Field ::Initial is not accessed by MultiLevelInv_CountLevelPowerups, and
is overwritten immediately afterward, so it does not need to be cleared
first.

Field ::Current is unconditionally cleared by
MultiLevelInv_CountLevelPowerups, so it does not need to be cleared
first.

Field ::RespawnTimer is not accessed by
MultiLevelInv_CountLevelPowerups, but needs to be cleared.  Add a clear
of field .RespawnTimer and remove the clear of the entire structure.
2016-07-14 01:59:03 +00:00
Kp 5af44fa27a Refactor to propagate MultiLevelInv_Count initial
All callers of MultiLevelInv_Count passed a constant value.  Factor
out the top level blocks of MultiLevelInv_Count into helper functions,
then create two new functions corresponding to MultiLevelInv_Count(0)
and MultiLevelInv_Count(1), implemented by calling the appropriate new
helper functions.
2016-07-14 01:59:03 +00:00
Kp 1d568fa56e Move MultiLevelInv_Count for vulcan/gauss to use fallthrough 2016-07-14 01:59:03 +00:00
Kp 59750d3c29 Rewrite declarations of ubyte * to standard uint8_t * 2016-07-14 01:59:02 +00:00
Kp 6580c37b6e Propagate MAX_STOLEN_ITEMS 2016-07-10 04:11:34 +00:00
Kp a63fe62cb3 Add typedef for multi_allow_powerup_text type 2016-07-09 17:58:35 +00:00
Kp be8022ff41 Add typedef for GMNames array 2016-07-09 17:58:35 +00:00
Kp 9511ca8aaf Convert simple multi fix casts from C style to static_cast<> 2016-07-07 03:08:13 +00:00
Kp a7c64d6f97 Convert simple int casts from C style to static_cast<> 2016-07-07 03:08:13 +00:00
Kp 262094237f Rewrite simple numeric casts from C style to static_cast<>
s/(\(int\|float\|fix\))\s*(/static_cast<\1>(/g
2016-07-06 01:54:24 +00:00
Kp 3b0fccd899 Cache reference to local player secondary ammo 2016-07-03 00:54:15 +00:00
Kp b35a893d9a Rewrite simple pointer casts from C style to reinterpret_cast<>
s/(\s*\(\w\+\s*\*\+\)\s*)\s*(/reinterpret_cast<\1>(/g
2016-07-03 00:54:15 +00:00
Kp 19f31eb420 Rewrite simple pointer casts from C style to reinterpret_cast<>
This pass only targets int8_t and uint8_t.

s/(\s*\(u\?int8_t\s*\*\+\)\s*)\s*(/reinterpret_cast<\1>(/g
2016-07-03 00:54:14 +00:00
Kp a23df63f1b Change (sbyte *) to (int8_t *)
Use the stdint type instead of a Descent custom type.
2016-06-27 04:11:13 +00:00
Kp 6087660944 Add parentheses around casts of array subscripts to pointer types
C casts do not require parentheses.  C++ casts require grouping around
the target.  Prepare for conversion to C++ casts by adding otherwise
unnecessary parentheses around the target of simple C casts.

s/\((\w\+\s*\*\+)\)\s*\(&\w\+\(\[[[:alnum:]+-]*\]\)*[]);]\)/\1(\2)/g
2016-06-27 04:11:13 +00:00
Kp 89ddc1b911 Add parentheses around casts of simple array subscripts
C casts do not require parentheses.  C++ casts require grouping around
the target.  Prepare for conversion to C++ casts by adding otherwise
unnecessary parentheses around the target of simple C casts.

s/\((\s*\(\(un\)\?signed\|int\|char\|short\|long\|float\|double\|s\?size_t\|\(u\?int[[:digit:]]\+_t\)\)\s*\**\s*)\s*\)\([&+-]\?\)\([[:alnum:]_.]\+\s*->\s*\)*\([[:alnum:]_.]\+\)\(\s*\[[^][]*\]\)*\(\s*\([];+>)*\/^%,|&<>]\)\|$\|\(\s*-\s*[^>]\)\)/\1(\5\6\7\8)\9/g
2016-06-25 23:21:36 +00:00
Kp 65f68877aa Rewrite simple integer casts from C style to static_cast<>
This pass only targets commonly used standard types.

s/(\(\s*\(\(un\)\?signed\|int\|char\|short\|long\|float\|double\|s\?size_t\|\(u\?int[[:digit:]]\+_t\)\)\)\s*)\s*(/static_cast<\1>(/g
2016-06-16 03:56:44 +00:00
Kp 1b12a3f7ef Add parentheses around target of more complicated casts
C casts do not require parentheses.  C++ casts require grouping around
the target.  Prepare for conversion to C++ casts by adding otherwise
unnecessary parentheses around the target of some C casts.

This pass attempts to process expressions that involve parenthesized or
bracketed subexpressions, but only if those subexpressions do not
themselves contain parenthesized or bracketed subexpressions.

	(int) f(1);	// changed
	(int) f(g());	// not changed

perl -p -i -e 's/(\(\s*((?:un)?signed|int|char|short|long|float|double|s?size_t|(?:u?int[[:digit:]]+_t))\s*\**\s*\)\s*)([&+-]?)([[:alnum:]_.]+\s*->\s*)*([[:alnum:]_.]+)((?:\s*(?:\[[^][]*\])*|(?:\([^()]*\))*))(\s*([;+>*\/^%,|&<>])|$|(\s*-\s*[^>]))/\1\(\3\4\5\6\)\7/g'
2016-06-12 03:45:37 +00:00
Kp bc30ccd216 Rewrite cast of (sbyte) to standard type int8_t
s/(sbyte)\s*\(\w\)/(int8_t) \1/g
2016-06-12 03:45:37 +00:00
Kp 478a48ddc1 Fix vulcan ammo object tests
Object numbers are unsigned short, not signed short.  If anyone ever
raises the object limit high enough, testing for negative values would
blacklist valid objects.

Remove unnecessary test for objnum!=object_none.  If it were none,
constructing `obj` would have failed.
2016-06-12 03:45:37 +00:00
zico 84f254e2f2 Another addendum to 3366658a5bd2b30a82949b8b301e97b324ce539d: Don't make ngii static anymore (forgot to change this). 2016-06-06 17:29:21 +02:00
zico 7684ce92e4 Added packet to notify clients about a changed vulcan ammo count in a weapon powerup in case player collects ammo but leaves the gun itself. 2016-06-06 17:26:59 +02:00
Kp 231223895d Rewrite simple pointer casts from C style to reinterpret_cast<>
This pass only targets commonly used standard types.

s/(\(\s*\(\(un\)\?signed\|int\|char\|short\|long\|float\|double\|s\?size_t\|\(u\?int[[:digit:]]\+_t\)\)\s*\*\)\s*)\s*(/reinterpret_cast<\1>(/g
2016-06-05 01:04:26 +00:00
Kp b282bea173 Rewrite simple integer casts from C style to static_cast<>
This pass only targets commonly used standard types.

s/(\(\s*\(\(un\)\?signed\|int\|char\|short\|long\|float\|double\|s\?size_t\|\(u\?int[[:digit:]]\+_t\)\)\)\s*)\s*(/static_cast<\1>(/g
2016-06-05 01:04:26 +00:00
Kp 7fdce88558 Add parentheses around target of simple casts
C casts do not require parentheses.  C++ casts require grouping around
the target.  Prepare for conversion to C++ casts by adding otherwise
unnecessary parentheses around the target of simple C casts.

This pass does not attempt to process expressions that involve
any subexpression that can nest arbitrarily, such as parentheses or
brackets.  It also works only on commonly used standard types.

	(int) a->b;	// changed
	(int) a[b];	// not changed

s/\((\s*\(\(un\)\?signed\|int\|char\|short\|long\|float\|double\|s\?size_t\|\(u\?int[[:digit:]]\+_t\)\)\s*\**\s*)\s*\)\([&+-]\?\)\([[:alnum:]_.]\+\s*->\s*\)*\([[:alnum:]_.]\+\)\(\s*\([];+>)*\/^%,|&<>]\)\|$\|\(\s*-\s*[^>]\)\)/\1(\5\6\7)\8/g
2016-06-05 01:04:25 +00:00
Kp badf0f4f90 Rewrite cast of (uint*) to standard type uint32_t
s/(\s*uint\s*\*\s*)/(uint32_t *)/g
2016-06-05 01:04:25 +00:00
zico 1856e73ca6 Addition to 3366658a5bd2b30a82949b8b301e97b324ce539d: Changed show_netgame_info and pass netgame as reference and const; removed struct and extern; declared ngii inside show_netgame_info(). 2016-05-30 13:49:06 +02:00
Kp dcc56e6b39 Propagate bm_mode::linear into iff_read_bitmap 2016-05-28 17:31:27 +00:00
Kp 398596c468 Use enum for bitmap mode 2016-05-28 17:31:26 +00:00
Kp 989cbb9337 Fix -Wshadow warnings in save_hoard_data 2016-05-21 17:24:51 +00:00
Kp 79c9d19429 Fix -Wshadow warnings in init_hoard_data 2016-05-21 17:24:51 +00:00
Kp 9ab024edc4 Fix -Wshadow warnings in multi_restore_game 2016-05-21 17:24:51 +00:00
Kp 7898353a6c Fix -Wshadow warnings in multi_disconnect_player 2016-05-21 17:24:51 +00:00
zico 3366658a5b Updated 'Netgame Rules & Info' screen, added option to toggle it ingame via SHIFT-PAUSE, added hint to netgame help menu 2016-05-10 13:41:13 +02:00
Kp 377effa46d Pass object_base &to object_allowed_in_anarchy 2016-04-23 17:59:47 +00:00
Kp 56f1729742 Pass object_base &to multi_reset_object_texture 2016-04-23 17:59:47 +00:00
Kp dd3cedff3d Add get_ghost_id for multi_do_reappear
Ghosts use the same ID space as players, so reuse function get_player_id
to fetch the ID after checking.

Reported-by: zicodxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/182>
Fixes: 9f26e2211e ("Warn on invalid object ID access")
2016-03-20 20:38:54 +00:00
Kp 0ff78c5475 Fix incorrect index in MultiLevelInv_Count Stolen_items loop
Fixes: cf512cd368 ("In MultiLevelInv_Count, use range_for for powerup-object and StolenItems loops. Also do not set unwanted objects to 0 in switch cases as this is redundant due to initialization at the beginning of the function.")
2016-03-04 04:12:35 +00:00
zico cf512cd368 In MultiLevelInv_Count, use range_for for powerup-object and StolenItems loops. Also do not set unwanted objects to 0 in switch cases as this is redundant due to initialization at the beginning of the function. 2016-02-29 16:13:48 +01:00
zico d5c11c42e4 In multi_prep_level_player() declared i as loop-local 2016-02-29 16:04:44 +01:00
zico 901a554e96 New powerup management code: Addeed functions and packet type to keep track of original and current level inventory as well as player and thief inventories. Calling maybe_drop_net_powerup() for all ammo based weapons except Concussion missiles. Limiting maybe_drop_net_powerup() to only spawn items missing from initial level inventory. Added function to let host respawn items that were lost for whatever reason. Expanded maybe_drop_net_powerup() and child functions to be able to drop item based on a random player. Changed back maybe_drop_secondary_weapon_egg() to its original behavior, dropping 3 of each type max. 2016-02-25 14:11:08 +01:00
Kp 553b313099 Use vwallptr 2016-02-12 04:02:28 +00:00
Kp 2fd6a425b0 Remove highest_valid 2016-02-12 04:02:28 +00:00
Kp b57f08c798 Use partial_const_range 2016-02-12 04:02:28 +00:00
Kp 74dfa29d31 Convert most Trigger references to valptridx 2016-02-06 22:12:54 +00:00
Kp c476c42e8e Factor out kill names in multi_compute_kill 2016-01-26 03:45:07 +00:00
Kp c641a0404a Use range_for for multi_message_feedback team_name 2016-01-26 03:45:06 +00:00
Kp 4e29e2625d Move multi_endlevel_poll* lookups to menu creation 2016-01-26 03:45:06 +00:00
Kp a3ae630829 Remove default argument for basic_ptridx(index) 2016-01-09 16:38:14 +00:00
Kp 988df1cc42 Factor out marker index number 2016-01-09 16:38:13 +00:00
Kp 98f5afa9f8 Remove default argument for basic_ptr(pointer,array &) 2016-01-09 16:38:13 +00:00
Kp e8c34be843 Use v*ptr* factories with highest_valid 2015-12-22 04:18:51 +00:00
Kp d479819931 Use absolute_sibling to reduce global references for ptridx 2015-12-22 04:18:51 +00:00
Kp 8a22ca9594 Shorten multi_apply_goal_textures 2015-12-22 04:18:51 +00:00
Kp ea02aeeaab Move kill_matrix update up 2015-12-22 04:18:49 +00:00
Kp 0fa31dbe98 Force multi kill list sort order for (kills+deaths<=0) 2015-12-18 04:08:23 +00:00
Kp a1cf7b03fe Fix lifetime kill accounting in team hoard
`adjust` must be set to -1 for a team kill, but this was only done as a
side effect of updating game-local kill counts.  After 5f2ec67,
game-local kill counts are not updated in team hoard, but adjust is
still used.  Move the handling of adjust up to occur in all team games.

Fixes: 5f2ec6789f ("Restore !hoard guard for game-local kill accounting")
2015-12-13 18:00:49 +00:00
Kp fd3f7f7f4d Force lowest rank for (kills + deaths) <= 0 2015-12-13 18:00:49 +00:00
Kp 5f2ec6789f Restore !hoard guard for game-local kill accounting 2015-12-13 18:00:49 +00:00
Kp 26e948d5f1 Uninline namespace dsx 2015-12-13 18:00:49 +00:00
Kp dc8c0323d8 Uninline namespace dcx 2015-12-13 18:00:49 +00:00
Kp 32051298ae Use inline namespace dcx/dsx for more symbols 2015-12-13 18:00:48 +00:00
zico 7a78568b14 Bail out of multi_reset_object_texture() if object is a ghost. Prevents unnecessary calls and resulting bug messages from check_warn_object_type() 2015-12-11 12:50:01 +01:00
Kp 143612df6a Make multi_send_message static 2015-12-04 03:36:30 +00:00
Kp a245ff8130 Mark multi_who_is_master static 2015-12-04 03:36:30 +00:00
Kp 708dc0a7e1 Use vobjptr/vcobjptr for more Objects[] access 2015-12-03 03:26:49 +00:00
Kp b683b4cc68 Scope weapon type 2015-12-03 03:26:49 +00:00
Kp 31d538ebe2 Use helper for robot weapon type 2015-12-03 03:26:48 +00:00
Kp c45f93b503 Short out apply_damage_to_player friendly fire check 2015-11-27 03:56:13 +00:00
Kp 0fe724b229 Adjust multiplayer kill handling 2015-11-27 03:56:13 +00:00
Kp 0c75aecc45 Check most uses of object id 2015-11-27 03:56:13 +00:00
Kp 9f26e2211e Warn on invalid object ID access 2015-11-26 02:56:56 +00:00
Kp 0fbccd609c Ignore lifetime kills/killed in cooperative games 2015-11-21 18:12:13 +00:00
Kp ec70edcc65 Use operator= to copy vms_vector 2015-11-15 22:30:40 +00:00
Kp 44753209d6 Move homing_object_dist to object.ctype.player_info 2015-11-14 18:17:22 +00:00
Kp 9eb8aba4c9 Move cloak_time to object.ctype.player_info 2015-11-14 18:17:21 +00:00
Kp 44c4eb9dc3 Combine exception paths 2015-11-08 18:55:51 +00:00
Kp 6b353cb9ac Move player powerup_flags to object.ctype.player_info 2015-11-07 21:55:59 +00:00
Kp 8a81e25ab0 Move player laser_level to object.ctype.player_info 2015-11-07 21:55:59 +00:00
Kp b788d0b563 Move player primary_weapon_flags to object.ctype.player_info 2015-11-07 21:55:59 +00:00
Kp 8d6949efa6 Move player killer_objnum to object.ctype.player_info 2015-11-07 21:55:59 +00:00
Kp 6037372cdf Move player vulcan_ammo to object.ctype.player_info 2015-11-07 21:55:59 +00:00
Kp e227ef1b32 Move player secondary_ammo to object.ctype.player_info 2015-11-07 21:55:58 +00:00
Kp 17b8b64980 Use macro get_local_player_flags for player's flags 2015-10-30 02:52:56 +00:00
Kp 92f78caf22 Use macro get_local_player_vulcan_ammo for player's vulcan_ammo 2015-10-30 02:52:56 +00:00
Kp dc5dfb80e8 Use macro get_local_player_secondary_ammo for player's secondary_ammo 2015-10-30 02:52:56 +00:00
Kp 3ffd207e44 Use macro get_local_player_shields for local player's shields 2015-10-30 02:52:55 +00:00
Kp 85ed489642 Use ?: for multi sounds 2015-10-30 02:52:55 +00:00
Kp 731e287329 Clean up trailing whitespace on rank strings 2015-10-30 02:52:55 +00:00
Kp 070444157e Use type safe player flags 2015-10-30 02:52:55 +00:00
Kp 4882558d6e Remove unnecessary zero of .cloak_time 2015-10-30 02:52:54 +00:00
Kp e130ea7b36 Remove unnecessary secondary_weapon_flags 2015-10-30 02:52:53 +00:00
Kp ea3c4a8986 Switch const multi text to array<> 2015-10-29 03:01:43 +00:00
Kp 533f1cb3bb Qualify references to primary weapons 2015-10-18 21:01:18 +00:00
Kp 4585faa461 Cache reference to secondary_ammo 2015-10-10 03:44:14 +00:00
Kp 7034b68357 Manage world time automatically where possible
For all cases where world time nests, use automatic management.  Some
sites disable time in one function and enable it elsewhere.  These are
untouched.
2015-10-09 02:46:09 +00:00
Kp 75104b80f0 Fix operand ordering for team kills
Fixes: 4a0a2b7da5 ("Use team_kills in team games")
2015-10-04 22:30:02 +00:00
Kp 9da2a938d8 Make team_kills signed
Suicides can make kill counts negative.
2015-10-03 22:15:17 +00:00