Commit graph

86 commits

Author SHA1 Message Date
zicodxx 9b17431c45 Reset new_Bounty_target after using it and let host add a number on how often Bounty is reassigned. Both additions should help keeping target correct no matter how if multiple packets of the same type are disordered, delayed or both 2011-05-19 02:34:14 +02:00
zicodxx ecdeed6228 Solved possible issue when setting new Bounty_target via host messing up scores or new target itself - only set if player decided why to unset Bounty_target, keeping code flow and game logic in order; Fixed two compiler warnings regarding set but unused variables 2011-05-15 11:59:12 +02:00
zicodxx aa520e662a Send player position also when multi_send_player_explode() is called so powerups drop at the right spot in case the respawn packet arrives first 2011-05-13 22:21:13 +02:00
zicodxx 040407cf02 Fix crash in multi_maybe_disable_friendly_fire() when killer == NULL; Do not let player join game when gamemode is HOARD or TEAM HOARD and hoard.ham is not available 2011-05-04 12:05:59 +02:00
zicodxx 3705012d32 Resolved termination issue when reading and comparing callsigns fro Coop savestates; Added scores sending after Coop savestate loading as unrestored players will send them when loading new level 2011-04-20 01:47:15 +02:00
zicodxx 7ae49da7cf Execute set_dynamic_light 60 times per second max since more would just be a waste of CPU time; When executing set_dynamic_light, process ALL lights; Instead of storing light color in objects, do it on-thy-fly but store bitmap-based color in grs_bitmap - vastly speeds up colored dynamic lights; Improved saturation for vertex lighting to make light color a bit more subtile 2011-04-12 03:02:51 +02:00
zicodxx 74c7bdd7c5 Improved syntax for Multi messages/commands: Commands starting with '/' and those accepting arguments as well as Player/Team messages require space after ':' ; Added indicator on HUD to show if a player is typing a message to prevent accidential kills 2011-04-11 17:47:16 +02:00
zicodxx eb7e001c2f Made lighting code work with actual RGB values and added feature to let certain objects emit colored dynamic light as well as let mine flash red when control center destroyed (OpenGL-only at the moment) 2011-04-07 22:32:51 +02:00
zicodxx d3b4d9485e Using gr_init_bitmap for hoard data initialization; Correctly free hoard data before the program closes; When reloading the main HAM files, made sure it does not try to reload main game sounds from shareware/demo HAM 2011-02-24 11:28:59 +01:00
zicodxx d6fbef4e43 Moved all these unsorted global cheat variables to a handy structure; Simplified reading of the cheats without trying to make it complicated so no one finds them (everyone can get the source); Removed one or two cheats which carry more garbage than they are worth; Added replacement for the bittersweet cheat; Made FPS Counter an option of Graphics menu 2011-02-14 22:27:07 +01:00
zicodxx a5c3bc430c Fixed compiler warning related to generation of game_id for Coop Savegames 2011-02-10 18:56:33 +01:00
zicodxx 753178a30f Reintroduced Savegames for Coop games using the original Descent2 implementation but correctly handling player slots in their pre-loading state preventing accidential player shifting which never really worked in the original game and we do not want with UDP anyways - was all tested but still might need a fix or two; Added some missing initializations for saving players and AI stuff; Completely ripped out remnants of saving between levels code 2011-02-09 12:58:32 +01:00
zicodxx 96782e092a Added event types for all input actions; Rewrote kconfig code to work with events; static defined inputs will not trigger kconfig-mapped inputs anymore; Simplified keyboard, mouse and joystick code a lot due to event-based handling; Added function to toggle SDL key repeats on and off; Put timer_update() to event_process; Removed return when event_poll() is idle to get cursor hiding to work again; Added a small delay between cursoe hiding and re-enabling to cursor will not accidentially enable by SDL event centering cursor while hiding 2011-02-02 01:36:49 +01:00
zicodxx 78569ea1bc Fixed small issue parsing killreactor command in Multiplayer 2011-01-22 17:56:25 +01:00
zicodxx fd53a1264b On NETGAMES list Bounty mode was not shown since MODE_NAMES define was not adjusted - so in the end introduced GMNames and GMNamesShrt Arrays in multi.c for globally displaying full or short Multiplayer game mode names 2011-01-19 19:55:38 +01:00
zicodxx 16f2b23fe2 Fix for showing bounty target in kill list - was not actually checking if player_num == Bounty_target; When Bounty_target player leaves game host must select a new target so the game can proceed 2011-01-19 12:22:01 +01:00
zicodxx a1f7da133e Introducing new BOUNTY Multiplayer game mode by Matt -1360- Vandermeulen <matt1360@gmail.com> 2011-01-19 02:19:17 +01:00
zicodxx 8a10ec4238 Added feature to optionally disable friendly fire in Team and Coop games 2011-01-14 19:48:48 +01:00
zicodxx c8f4140bd6 In multi_leave_game check for Player_eggs_Dropped before actually dropping to prevent multiple drops in case player quits game after being killed; put console output level of multiplayer powerup cap messagers to CON_VERBOSE 2011-01-14 15:13:29 +01:00
zicodxx eeecf4016e Fixing code used for capping powerups in multiplayer - it was not correctly conting 4pack powerups; Cleaned up this code a bit and added more consistent naming convention for functions to maybe make it more understandable; Removed MULTI_PROTO_D2X_VER define as it's not needed 2011-01-14 14:29:08 +01:00
zicodxx 0a08eacae6 Fixed but in object to object_rw conversion - if a bot is not dead, leave dying_start_time at 0 as anything else would kill it 2011-01-06 00:28:43 +01:00
zicodxx 281c9668bb Moved NoRedundancy, MultiMessages and NoRankings toggles from GameArg to PlayerCfg to be set via Misc Options 2011-01-03 02:01:26 +01:00
zicodxx fe84fa3a9a Made GameTime to GameTime64 using fix64; Changed all structures saving GameTime64 for internal timer purposes to store fix64 and added converting functions to save such times in fix; For Savegames/Demos always reset GameTime64 to 0 while saving and putting all timer values to safe limits, Multiplayer objects are sent in similar fashion 2010-12-22 01:17:59 +01:00
zicodxx 3bcb0ecdde Introduced new data type fix64 to be used for new timers which can last 4462756 years instead of 9 hours; Introduced new timer functions to update and query program time; Used new timer all over the program except GameTime (which comes next) 2010-12-11 00:18:17 +01:00
zicodxx a49ccb9dd7 In multi_new_game when initializing Players structures, also correctly init connected variable which is highly important for spreading pdata to clients and should be set correctly anyways (Thanks to Gold Leader and Flip for help with debugging/testing recent Multiplayer bugs) 2010-11-28 01:02:05 +01:00
zicodxx c1f7442f23 Took over variable VerifyPlayerJoined for UDP protocol usage as well to get object and extra packet sending in order as well as regulary resending UPID_SYNC for latecoming players. Should resolve problems when joining already running UDP games 2010-11-22 22:44:03 +01:00
zicodxx 11b73f68a7 In multi_consistency_error check for Game_wind before trying to set it in/visible - just for safety 2010-11-09 11:53:19 +01:00
zicodxx 017a9cab5b In DropOrb PLAYER_FLAGS_FLAG-bit was not removed before calling multi_send_flags which would draw the HUD-box even if player ejected all Hoard orbs 2010-11-09 00:28:22 +01:00
kreatordxx e6169f17f9 Add 'Data' subdir as a searchpath, so D2X will find descent.pig and to simplify a lot of file opening/checking/closing code 2010-09-25 03:35:23 +00:00
zicodxx a23618f961 Patching together editor so it compiles again (while still not running); Implemented PhysFS for file accessing for editor- and debugging-related code 2010-08-19 13:32:33 +00:00
zicodxx 0ce37b89bb Added expandable classes for HUD messages (like D1X but slacked) to better handle Multi messages or redundant messages; Rewrote HUD code completely; Changes -playermessages to -multimessages since this is more appropriate; Removed remnants of -mprofile 2010-07-13 06:35:25 +00:00
zicodxx 1093aa0d07 Improved hanlding for closing sockets - doing via closing of Game_wind when available or in specific multi menus; Also handling GM_GAME_OVER setting over Game_wind closing as well if apprpriate - cleaner and helps to cleanup multi when mission is over 2010-07-08 09:35:59 +00:00
zicodxx 0a143da860 Since time is not suspended between levels in Multiplayer, call reset_time after level change. Apply this in Singleplayer, too since it should always be safe - and appropriate - to reset timer_value soon as a new level begins 2010-07-04 13:12:08 +00:00
kreatordxx 493b07e3da Get rid of a heap of uses of Function_mode, quit properly (freeing all windows and asking for confirmation for game) when clicking close box 2010-04-04 01:31:48 +00:00
kreatordxx 00450cfc32 Make game respond to EVENT_KEY_COMMAND for key commands, allowing default key handler (later) 2010-03-31 09:18:28 +00:00
kreatordxx 98aa279527 Fix bug introduced in last commit - when the last level is finished, hide the game window - making sure the cockpit isn't drawn over the kmatrix screen 2010-03-21 02:20:07 +00:00
kreatordxx d9262cb4b6 Hide game window between levels, fixing bug where many textures are loaded with the wrong palette when advancing to the next multiplayer level 2010-03-21 00:54:56 +00:00
kreatordxx 6ca05c2dce Make kmatrixs into windows, rename Fuelcen_seconds_left to Countdown_seconds_left for consistency 2010-03-20 13:21:53 +00:00
zicodxx 7e83a3532e Add to help how to send a message to a specific player in Multiplayer; Removed NoBombs command as this is covered by the weapons selection in Multiplayer game creation 2010-02-23 15:22:28 +00:00
kreatordxx ff04fd682e Fix crashing when doing menus in multiplayer, don't let player move when in automap 2010-01-31 07:45:26 +00:00
kreatordxx f83741d89f For multiplayer, close menus from game_handler by doing frame processing in response to EVENT_WINDOW_DRAW, replacing multi_menu_poll system with single multi_menu_check call 2010-01-29 03:36:44 +00:00
kreatordxx 3a116769be Remove all uses of LeaveGame jmpbuf to allow more changing of main loop 2010-01-27 04:30:31 +00:00
kreatordxx b6452e75b7 Change newmenu and listbox callback systems, adding use of d_event, for greater flexibility 2010-01-07 14:49:07 +00:00
zicodxx 62b75469dd Adding macros USE_UDP and USE_IPX for the compiler to compile with either UDP- and/or IPX-support and removed the older IPX macros 2009-11-29 16:46:13 +00:00
zicodxx febe5d124d Abstracting networking protocols - Step 4: Implemented new UDP layer with Client/Server communication, Packet Loss Prevention and strict Version checking. Netgames list will follow later. 2009-11-24 09:48:53 +00:00
kreatordxx ceb4ff38fc Make the game screen into a \'window\', handling events through event_process 2009-08-10 10:47:17 +00:00
kreatordxx bf512bb9ec Remove redundant conf.h directives 2009-04-30 13:01:31 +00:00
zicodxx fb112d7dfb Abstracting networking protocols - Step 3: Renaming network_* functions to net_ipx_*, writing wrappers for protocol dependend functions in multi.c, Implementing protocol selection and Cleanup - Next up: Implementing new UDP layer 2009-04-09 07:41:30 +00:00
zicodxx b3bf4813df Abstracting networking protocols - Step 2: Introducing new structure to hold protocol-dependend and -independend information about Netgame and it's Players; Further isolation of the IPX code and renaming the netdrv_* code to ipxdrv_* as this is now actually IPX-only; Next up: Renaming network_* functions to net_ipx_*, writing wrappers for protocol dependend functions in multi.c, Implementing protocol selection and Cleanup 2009-03-20 12:10:38 +00:00
zicodxx 8da36f8873 Abstracting networking protocols - Step 1: Renaming network-related files; Removing net_ipx.h (former network.h) includes from as much files as possible to make isolation of IPX-related functions easier in Step 2; Version defines Cleanup - needed later for good Version-Checking 2009-03-04 21:04:43 +00:00