Commit Graph

316 Commits

Author SHA1 Message Date
Joonas Rikkonen cc41f0cd9e Fixed items held in left hand taking the sprite depth from the left arm instead of the hand 2018-03-02 10:38:10 +02:00
Joonas Rikkonen 10189254b5 GrabLimb type is written in character network messages as byte instead of UInt16 2018-03-01 23:43:10 +02:00
Joonas Rikkonen cd6fc87eb4 Fixed object header issues and "trying to read past the buffer size" errors caused by NetEntityEvents for removed entities.
EntityEventManager sends an empty event with an ID of 0 if the entity doesn't exist anymore when writing the event. The recipient should simply skip over these messages and read the next one, but clients only did so if the event is the next unreceived one, causing the rest of the messages to be read incorrectly (which could lead to various sorts of problems in addition to the header and buffer size errors). The server didn't deal with the empty events correctly either, it increased the last received ID even if the received event was not the one the server is waiting for, potentially causing other non-empty events to be ignored.

+ Added an error message if the size of an NetEntityEvent is larger than 255 bytes. Not only is that excessively large for an event, but the length of the event is written as a byte and larger ones may again cause messages to be read incorrectly. Most events should be nowhere near 255 bytes, but now that the descriptions and tags of a spawned item are included in the item spawn messages there's the possibility that some events are too large.
2018-03-01 19:30:27 +02:00
Joonas Rikkonen 2880ca3adb Contained items drawn by ItemContainer.Draw use the sprite color of the item. Closes #300 2018-03-01 15:57:57 +02:00
Joonas Rikkonen 55a5e9e968 Syringes are recolored according to the color of the contained medical item. Closes #256 2018-03-01 11:26:04 +02:00
Joonas Rikkonen 620a2bf374 Forgot to change dustparticle movement speed to normal after testing 2018-02-28 10:32:54 +02:00
Joonas Rikkonen d867dd6c17 Diving suits are rendered in front of all items (diving masks, goggles, etc aren't drawn on top of the suit). Items that are being held take the depth of the wearable sprite on the hand into account. Closes #290 2018-02-27 23:04:54 +02:00
Joonas Rikkonen 9e298c98ab Fixed dust particle texture "warping" when the movement offset wraps around 2018-02-27 20:16:12 +02:00
Joonas Rikkonen 3564abf31b Moved a bunch of hard-coded sound paths to the sound config file. 2018-02-26 22:31:07 +02:00
Joonas Rikkonen 77940fa992 Added some debug logging, Character.Revive removes the existing AITarget from the character before creating a new one 2018-02-26 18:05:03 +02:00
Joonas Rikkonen 1c68d5a4d7 - Fixed clients using character directories to count the number of disallowed monsters, which made it possible for them to disallow incorrect monsters.
- Fixed MonsterEvent checking if the name of the character directory contains the name of the disallowed character directory, which could for example cause them to disallow "someMonsterAlt" if "someMonster" is disallowed.
2018-02-26 16:53:22 +02:00
Joonas Rikkonen 9e2966e9cb - Fixed creature disable list only taking config files in the Content/Characters folder into account (making it impossible to disable spawning of custom monsters outside the folder)
- Removed hard-coded ruin structure, particle & decal config paths and moved them to content package (custom ones can be added now without modifying the original files).
2018-02-25 15:03:29 +02:00
Joonas Rikkonen 48757618f6 Renamed the "file" attribute of hit sounds to "tag", replaced footstep sound paths in creature configs with tags. 2018-02-24 21:13:21 +02:00
Joonas Rikkonen eaafc022f2 Fixed Ragdoll.ImpactProjSpecific attempting to play limb/wearable hitsounds even if the sound tag is empty, wearable items can cause hit sounds to be played even if the limb has no hit sound configured. Closes #280 2018-02-24 20:55:30 +02:00
Joonas Rikkonen 127cc28af3 SoundPlayer.GetSound doesn't attempt to load the sound if a sound with a matching tag is not found, because otherwise configuring limb hit sounds and such with the file path instead of the tag will cause a new sound instance to be created every time the sound is played (and these instances are never freed). + Sound config files can be now configured in content packages. 2018-02-24 19:41:28 +02:00
Joonas Rikkonen 7044631901 Attempt to diagnose null reference exception during Ragdoll drawing (see #278) 2018-02-23 11:09:17 +02:00
Joonas Rikkonen 8b07e91d2c Added camera zoom value to debug hud 2018-02-23 10:33:59 +02:00
Joonas Rikkonen 83c02504ea Fixed clients failing to select a received submarine/shuttle file, preventing them from starting a round until they rejoin the server. Closes #271 2018-02-22 14:18:06 +02:00
Joonas Rikkonen 375e135672 Made round summary scrollable (long summary texts don't overflow anymore), listbox scissorrects work correctly now on nested listboxes 2018-02-22 12:18:09 +02:00
Joonas Rikkonen b4582b6188 Fixed launcher throwing a null reference exception because of a reference to GameMain in PlayerInput 2018-02-21 23:43:40 +02:00
Joonas Rikkonen 637d473773 Fixed coroutine error at the end of the tutorial + minor modifications 2018-02-21 20:09:26 +02:00
Joonas Rikkonen 59e1f776f2 Updated vanilla subs (preview images, additional info, some extra lights in darker parts), submarine preview window layout tweaking 2018-02-21 17:09:53 +02:00
Joonas Rikkonen 76f5c099ed Particles that rotate towards the movement direction use sub-relative movement when inside the sub (weld/cut particles don't face the movement direction of the submarine anymore). 2018-02-13 13:50:41 +02:00
Joonas Rikkonen 4d01aba0f1 Fixed subinventory staying visible if the slot containing the subinventory gets merged while it's highlighted (e.g. put a stun baton in either hand and swap it with a two-hand item) 2018-02-13 13:49:41 +02:00
Joonas Rikkonen ff7f43ca83 Fixed inconsistent decal draw order 2018-02-13 12:28:54 +02:00
Joonas Rikkonen 43d6ee5e06 Spark & smoke particle effects when welding or cutting something. Closes #155. 2018-02-12 11:20:25 +02:00
Joonas Rikkonen 3cbff6bd7b Fixed circular physics bodies not being rendered in debugdraw if the radius is less than 1.28f 2018-02-06 16:25:07 +02:00
Joonas Rikkonen af9980090b Fixed debug console pausing multiplayer games, fixed missing ruinclaw sprite 2018-02-06 16:08:19 +02:00
Joonas Rikkonen 633dc1ff1e Option to define multiple compatible content packages in submarine files, added extension methods for parsing string, float and int arrays from XML elements 2018-02-06 10:18:39 +02:00
Joonas Rikkonen 25fde64378 Fixed incorrect TextManager tag in PowerContainer interface 2018-02-05 16:43:02 +02:00
Joonas Rikkonen 60ad5ed3fb Reverted b26b6a74. Making stunned characters receive damage from limb impacts caused them to suffer excessive amounts of damage when falling or getting thrown around when the sub hits something (e.g. a moloch attacking a sub could easily kill crew members by bumping the sub and falling down the stairs was often a death sentence). In general I don't think it's a good idea to apply impact damage from limb impacts, because the limbs may occasionally move or rotate at very high velocities due to the animations. 2018-02-05 11:16:03 +02:00
Joonas Rikkonen 67d6bf6a1d Fade out names and health bars when the cursor is not hovered over the character. Closes #218 2018-02-01 11:26:47 +02:00
Joonas Rikkonen 69337cd9e3 Merge branch 'master' of https://github.com/Regalis11/Barotrauma 2018-01-31 19:02:03 +02:00
Joonas Rikkonen dcb6de32c0 Some more hard-coded text removal 2018-01-31 19:01:48 +02:00
shoter 2e9cb6530c Player input is updated only when game windows is active 2018-01-29 23:26:45 +01:00
Joonas Rikkonen 80ce2ae6ae Fixed the game running for one more frame after the debugconsole is opened, and staying paused for one extra frame after closing it. Caused the mouselook distance to lerp back from zero after toggling the console. 2018-01-29 10:27:43 +02:00
Joonas Rikkonen 6e231b7e7d Lighting is forced back on when a client starts a round (-> can't disable lighting by using the console command before joining a server). Closes #238 2018-01-28 19:15:23 +02:00
Joonas Rikkonen 8b3a089884 Fixed clients being unable to select subs, GUIListBoxes can be scrolled even if selection is disabled 2018-01-28 19:14:24 +02:00
Joonas Rikkonen 9a095e259a Fixed mouselook distance calculations (the previous method allowed looking further when looking at stairs or platforms), mouselook is disabled when character control is disabled, speech bubbles appear also on the controlled character 2018-01-26 10:59:53 +02:00
Joonas Rikkonen ad18eb0db0 Fixed vote count text overlapping with the submarine preview button in NetLobbyScreen 2018-01-26 10:36:34 +02:00
Joonas Rikkonen a1ccf501c7 Fixes to server settings. Closes #225
- Selected mode and mission type settings are saved and loaded.
- RandomizeSeed setting can be changed via the debug console and it also has an effect in the dedicated server.
- Dedicated server randomizes sub & mode settings if their selection modes are set to random.
2018-01-25 15:09:44 +02:00
Joonas Rikkonen e6e132aa1e More gib particles when characters get crushed by pressure 2018-01-25 13:56:39 +02:00
Joonas Rikkonen 09e4687cd0 The content package a submarine was saved with is included in the submarine preview, added a warning when attempting to start a campaign using a sub with a mismatching content package 2018-01-25 12:19:47 +02:00
Joonas Rikkonen e55c54b161 Removed some unused methods 2018-01-25 09:38:04 +02:00
Joonas Rikkonen 43d48ceb13 Fixed subinventory becoming active in the controlled character's inventory when the slot with the same index is highlighted in a grabbed character's inventory (or vice versa), fixed CPR & grab buttons being drawn on top of subinventories 2018-01-25 09:36:58 +02:00
Joonas Rikkonen 30e624e572 Window mode can be changed mid-game, fixed "apply" button not becoming active in the settings menu when changing the window mode 2018-01-24 16:07:26 +02:00
Joonas Rikkonen 7199095c40 Fixed tab buttons not working in the GameSession info frame 2018-01-24 15:59:07 +02:00
Joonas Rikkonen 51ea71333e Fixed ChangeProperty network events 2018-01-24 15:53:32 +02:00
Joonas Rikkonen 788ae63b71 Removed testing hotkey that saves a screenshot of the sub 2018-01-24 12:25:00 +02:00
juanjp600 2acaee3c6d Fixed horizontal split shadow casters breaking everything 2018-01-23 22:43:25 -03:00