Commit graph

89 commits

Author SHA1 Message Date
zicodxx 8fc772586c fixed two bugs caused by recent Multiplayer cleanup: Set more player-death-related veriables outside of dead_player_end() when creating new ship as not covered in subfunction is Palyer_is_dead is not true; also init my own inventory properly in multi_prep_level to get our inventory straight after receiving netgame information 2012-04-16 01:13:29 +02:00
zicodxx 3a96935748 Further Multiplayer cleanup: moved gobal variable resets from multi_new_game() to proper function calls; added pnum variable to init_player_stats_game() and init_player_stats_new_ship() so these can be set for each player when starting match; added multi_new_level() calls when setting up game as well when trying to join game; cleaned multi_reset_stuff() from variable resetting that happen in general game code; when being dumped from game, made sure no packets are sent during messagebox dispaly; replaced MAX_NUM_NET_PLAYERS by MAX_PLAYERS as it's the same definition 2012-04-15 15:32:48 +02:00
zicodxx f35eba5f04 Fixed some Multiplayer bugs: Reactor invulnerable time did not checked for hours spent in level so reactor would become invulnerable again after 60 minutes; Fixed the fix (heh) for misordered explode/reappear packets; Reset Player_eggs_dropped when initializing new ship so eggs are properly dropped when player disconnects two times without respawning; Cleaned player disconnecting a little bit and made code more straightforward 2012-04-12 02:15:26 +02:00
Chris Taylor e28ba63503 The editor now falls back to the main event loop in inferno.c, File->Exit now works as intended and get closer to making the editor and game work together 2012-03-19 13:49:19 +08:00
zicodxx 2f08947f48 Introduced extra short based on MULTI_PROTO_VERSION for version-independent Multiplayer-compability-check; Changed version to 0.57.2 to make new version checking not cause problems with stable release 0.57.1; Removed old version_major/minor variables from netgame and player structures since DXX handles this independently; Cleaned up old version stuff and copyright messages 2011-11-02 01:04:42 +01:00
zicodxx aa8286c1d6 Fixed set but unused variables 2011-09-27 01:31:19 +02:00
zicodxx dd991fbf6b Got rid of cfile code: Renamed cfile-functions to use PHYSFSX-naming convention, Replaced cfile-macros with proper PHYSFS(X) calls; Introduced PHYSFSX_exists() which can check case-sensitive or case-insensitive to give more flexibility with game content 2011-06-01 09:59:55 +02:00
zicodxx 23197f52e5 Like in BigEndian builds do netmisc_calc_checksum() only with expected items of segment/side struct to prevent different checksums in case these structs change; Fixed several issues when building with editor; Fixed compiler warning regarding set but unused variable 2011-05-22 19:54:47 +02:00
zicodxx a498f20bc9 Moved reloading of main descent2.ham (in case mission brings it's own verision) from LoadLevel() to load_mission() so it does not screw missions with ther custom ham-file (like vertigo) 2011-04-20 19:42:02 +02:00
zicodxx 13b2de4326 Added another call for read_hamfile right after a level loads in case a third party mission brings it's own version of the main game HAM file 2011-02-19 01:20:58 +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 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 3c9c7af995 Little more smoothness for Multiplayer: Before dropping Powerups in random segment, make sure it's accessible by the player who drops it; Got rid of goto in InitPlayerPositions() and made code more D2-ish; Allow host to send 50 object/extra packets per second which does not overload network stack, yet but speeds up joining 2011-02-02 23:51:34 +01:00
zicodxx 3266e8c141 Correction for rev1009: Do not need to delete object Dead_player_camera since it's a new level with new objects to begin with 2011-01-18 20:02:04 +01:00
zicodxx ab79094700 Allowing loading a savestate while being in death sequence and resetting Dead_player_camera correctly in init_player_stats_level() so forther death sequences won't screw up 2011-01-18 15:53:28 +01:00
zicodxx 2ba4206e15 Using timer_query() instead of clock() in InitPlayerPositions(); Also decreasing check value für closest_dist to D1-level to actually make it less likely to start at total random unchecked location where another player could be 2011-01-14 17:15:30 +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
kreatordxx 347a76bd44 Don't let the teleport sound get cut out by Game_wind being hidden when going to a secret level 2010-09-17 11:09:57 +00:00
zicodxx 155c378c80 Removed Fusion_last_sound_time and made Fusion_next_sound_time static inside FireLaser() with it's own fallback function for bogus timer values - should make this code insusceptible against errors - last but not least: minus two globals 2010-09-04 09:22:07 +00:00
zicodxx e73dfb1266 Reset Fusion_next_sound_time in init_player_stats_level() to hopefully fix Fusion not doing damage or playing sounds 2010-09-03 21:49:39 +00:00
zicodxx fd32ea98c4 Builtin music list now dynamically allocated and not limited to 30 songs; Instead of never loading new level when loading savestate ingame, only do this for Redbook and Custom Music playing order 'continously'; if no endlevel song is specified in Custom Music continue with level music 2010-08-01 17:42:38 +00:00
kreatordxx db15309f5f Tidy up use of set_screen_mode 2010-07-29 08:30:46 +00:00
kreatordxx 1f6e72f781 Show stars background for died in mine and secret level messageboxes; equalise fuelcen.h and cntrlcen.h 2010-07-27 11:41:43 +00:00
zicodxx c6594d2184 Introduced state_quick_item so we can safly check if there is a valid quicksave slot wihtout messing around with state_Default_item which is supposed to always show a valid slot in the first place 2010-07-19 17:07:12 +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
zicodxx 03be2fae70 If multi_level_sync() fails, restart menu music since level music is playing already 2010-06-29 21:14:30 +00:00
zicodxx 7849947519 When starting, leaving or changing a level in any way, use more ordered approach to set Game_wind visible or invisible. Fixing timer-issues after level-change and makes hiding of Game_wind obsolete for certain messageboxes; Moved GameTime and weapon timer variables out of reset_time since this function is not appropriate for this and is not needed between levels anymore due to window management handling start/stop_time properly 2010-06-27 11:28:26 +00:00
zicodxx cac223991f Resetting GameTime, Next/Last_flare/laser/missile_time in reset_time() together so GameTime-rollover-fallbacks will not create a massive delay when starting a new level 2010-06-14 21:59:41 +00:00
zicodxx cc12616895 Increased SDL_mixer music abilities to play non-hmp from HOGs, having Level-music path to play, options to specify non-level tracks and added various playing order methods; Abstracted SDL_mixer- and Redbook-interfaces; Simplified program flow through all music functions 2010-06-14 08:13:16 +00:00
kreatordxx 6cc629dc6a Actually fix endgame music, make briefing beep only play when flashing_cursor is on, no restarting music when reloading a saved game 2010-04-05 13:48:23 +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 8ca12ad562 Hide mission dialog before the level intro screens are shown, make sure it doesn't try to show it again after it was closed - fixing bad memory access 2010-03-27 03:24:14 +00:00
zicodxx 19ad0ace53 In Endlevel sequence, re-align big explosion to draw in front of exit model, relative to viewer; Re-organized tex files for Briefings and Endings and created more general code to play them; Re-aligned Dravis' head 2010-03-25 23:37:19 +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 d1254c8222 Put fast save back, using Alt-F1 instead of F6 2010-02-25 03:08:10 +00:00
kreatordxx 13c192eb3f Don't make another Game_wind when advancing a level, fixing failed asserts / slow turning 2010-02-08 05:34:43 +00:00
kreatordxx 8a4602a3f6 Split select_filename into [existing] RegisterPlayer and select_demo for better clarity 2010-02-07 12:10:52 +00:00
kreatordxx afa0d75fb6 Create the main event loop and use it for the game and main menu 2010-02-07 04:34:21 +00:00
kreatordxx f8dd214654 Handle player selection and demo playing in filename_menu_handler, fixing bug where it won't leave the player listbox if there's no LastPlayer; close do_options dialog when changing resolution 2010-02-06 05:21:45 +00:00
kreatordxx 9d7bce257c Put the full_palette_save and palette_restore calls in the game handler for tidiness; remove leftover redundant digi_resume_digi_sounds calls 2010-02-05 02:31:36 +00:00
kreatordxx eb92f445ca Add EVENT_WINDOW_DEACTIVATED; move many game_flush_inputs, start_time and stop_time calls to game_handler as well as digi_pause_digi_sounds and digi_resume_digi_sounds 2010-02-02 03:38:29 +00:00
kreatordxx 71c656200b Allow escape from player listbox if appropriate; call RegisterPlayer only from main menu for more flexibility; actually use file_list block so deleting players/demos doesn't crash it 2010-01-27 09:11:47 +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
kreatordxx 19806aa7ec Move newmenu_get_filename to menu.c, call it get_filename and have it use newmenu_listbox1; support long demo filenames 2009-12-08 11:01:36 +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 00347f0bcb Add endian converter for demos, read shareware demos, various bugfixes to demo system 2009-11-15 08:22:08 +00:00
kreatordxx bf512bb9ec Remove redundant conf.h directives 2009-04-30 13:01:31 +00:00