Commit Graph

66 Commits

Author SHA1 Message Date
Regalis
095054182e Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Source/GUI/GUITextBlock.cs
	Subsurface/Source/GameMain.cs
	Subsurface/Source/Items/Components/Machines/Radar.cs
	Subsurface/Source/Networking/GameClient.cs
2017-05-17 18:51:22 +03:00
Regalis
0aca8dbf9d Humanoid animations work better on uneven floors (e.g. "fake stairs" made from wall pieces).
If the floor in front of the character is higher than where the character is standing, the character slows down and lifts its feet more. The position of the feet is also clamped below the waist, preventing the character from doing a backwards somersault when running over "fake stairs".
2017-05-14 20:15:31 +03:00
Regalis
f863eb331d Moved stun from AnimController to the character class, server notifies clients when the stun ends, husk infection included in character status messages 2017-04-07 19:56:25 +03:00
Regalis
2722d3cf8d Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Source/Events/MonsterEvent.cs
2017-03-21 18:16:25 +02:00
Regalis
cd0da235a2 Swimming anim fix: legs are forced back to their correct position if the thighs are bent too close to the torso (should fix characters swimming with their legs extended up over their shoulders) 2017-03-19 19:49:59 +02:00
Regalis
c9f09031de Re-enabled anchoring main limb to the collider when a remote player is unconscious (otherwise only the position of the collider will be synced, and the ragdoll won't follow it)
+ stunned characters can't send position updates
2017-02-25 18:06:43 +02:00
Regalis
bf3fa804df Fixed ragdolls accumulating a large movement value while being dragged (backported from commit a21d8d7) 2017-02-25 16:40:52 +02:00
Regalis
a21d8d7a53 Fixed ragdolls accumulating a large movement value while being dragged (line 902), causing them to launch off with a high velocity when they wake up
+ some cleanup
2017-02-25 14:25:21 +02:00
Regalis
68b0f2132a Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Source/Characters/AICharacter.cs
2017-02-17 19:31:25 +02:00
Regalis
99cf438ed7 The lowest point of a character collider is calculated from its AABB (works correctly now even if the collider is rotated, allowing prone characters to be dragged through stairs), dragged characters collide with stairs when climbing up, the AI of unconscious or stunned characters isn't updated 2017-02-17 19:27:54 +02:00
juanjp600
cfeb720836 Fixed IsKeyHit (ladder climbing being inconsistent) + optimized interaction syncing
Instead of sending over mouse position as two floats (8 bytes total), the game will send the aim angle represented as a short (0 to 65535, so it's fairly precise) and the selected item ID (up to 4 bytes total, 2 bytes if it's only one of the inputs).

The problem with IsKeyHit is that it checked when the player started a key press, when it should've been checking for the key being released.
2017-01-09 15:06:19 -03:00
juanjp600
7dc474dab4 Actually round movement.X down to zero
whoops
2017-01-06 16:05:23 -03:00
Regalis
65d64af041 Server reads CHARACTER_INPUT messages even if the client isn't allowed to move (but ignores the inputs), otherwise it would fail to read the rest of the packet 2017-01-06 18:19:51 +02:00
juanjp600
0569a665f4 Fixed a server-side off-by-one error in the player input IDs
I'm guessing this one comes from the player's position not being updated immediately after the input is processed, so that's where most of the remaining error came from.
Also added some rounding to the horizontal velocity when approaching 0, and changed something that depended on the head limb to use the collider instead, which should hopefully further reduce the chance of syncing errors.
2017-01-05 22:37:14 -03:00
Regalis
bb685019a2 Fixes to unconscious character pos syncing:
- main limb is anchored to collider
- server ignores inputs from unconscious characters and doesn't freeze them
- using timestamp-based interpolation on the client's own character instead of IDs
2017-01-03 23:49:37 +02:00
Regalis
1f07b18e5b Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Properties/AssemblyInfo.cs
	Subsurface/Source/Items/Components/DockingPort.cs
	Subsurface/Source/Items/Components/Signal/Wire.cs
	Subsurface/Source/Items/Item.cs
2016-12-29 22:18:27 +02:00
Regalis
49d4108eeb Fixed character colliders sinking/floating away when using a railgun controller underwater 2016-12-28 19:56:52 +02:00
Regalis
3eec463f5e Anim tweaking, simplified (+ non-broken) water drag logic 2016-12-09 15:02:48 +02:00
Regalis
adde3461ea Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Properties/AssemblyInfo.cs
	Subsurface/Source/Characters/Animation/HumanoidAnimController.cs
	Subsurface/Source/Characters/Character.cs
	Subsurface/Source/Items/Components/Door.cs
	Subsurface/Source/Items/Components/Power/PowerContainer.cs
	Subsurface/Source/Items/Components/Signal/Wire.cs
	Subsurface/Source/Items/Item.cs
	Subsurface/Source/Networking/ChatMessage.cs
	Subsurface/Source/Networking/GameClient.cs
	Subsurface/Source/Networking/GameServer.cs
	Subsurface/Source/Networking/GameServerLogin.cs
	Subsurface/Source/Networking/GameServerSettings.cs
	Subsurface/Source/Networking/NetworkMember.cs
2016-11-24 19:52:40 +02:00
Regalis
6ca605aa57 Merge branch 'master' of https://gitlab.com/poe.regalis/barotrauma 2016-11-18 18:48:10 +02:00
Regalis
8c90fd1774 Doors push colliders away when closing, small human standing anim tweak 2016-11-18 18:47:58 +02:00
juanjp600
a4ebb116c0 Fixed falling damage 2016-11-17 15:35:15 -03:00
Regalis
089b0dbcee Water slows down players based on the depth of the water relative to the bottom of the collider 2016-11-17 19:16:30 +02:00
Regalis
bded421366 Added colliderHeightFromFloor to a few places I missed, some more human collider tweaking, correcting collider y position faster 2016-11-17 19:06:12 +02:00
juanjp600
b68be44864 Fixed ragdoll position not being offset on ladder 2016-11-16 21:44:08 -03:00
juanjp600
fac0c850a5 Changes to collider behavior
The collider now levitates above the ground, which makes small obstacles a non-issue. The raytest also helps the collider stick to staircases, so players don't jump off anymore.
Crouching now changes the collider to a smaller version, so now there is actual functionality to crouching.
I also removed the anchor from corpses of network players. I'm not entirely sure why this was done, but removing it doesn't seem to break anything.
2016-11-16 21:30:49 -03:00
Regalis
e1c2cd4d53 Networked characters can climb ladders without joining the Europan Space Program 2016-11-09 18:17:04 +02:00
Regalis
f259f3fba4 Limiting character movement when collider isn't upright (can't run at full speed if lodged in some tight space), hack-ish way of moving the collider of a character that's being dragged 2016-11-07 18:52:36 +02:00
Regalis
de3966ae95 - character colliders stay enabled when the character is unconscious/stunned (prevents getting stuck inside walls when the collider is re-enabled)
- can't climb over obstacles if the contact point is above the center of the character collider
- higher "obstacle climbing velocity"
- limiting collider velocity when dragging another character
2016-11-06 18:56:03 +02:00
Regalis
95937694f4 Colliders can "climb" over small obstacles 2016-11-02 17:14:57 +02:00
Regalis
eb2c51c2f1 Cleanup with resharper (mostly removing redundancies & using collection.Length/Count properties instead of the Count method) 2016-10-31 20:50:20 +02:00
Regalis
641e579e92 Backported animcontroller-overhaul 2016-10-22 15:18:16 +03:00
Regalis
f21000124b 0.5 sec delay when switching from swimming to walking or vice versa (prevents rapid switches between swimming/walking if the water level is fluctuating around the minimum swimming depth) 2016-09-21 20:14:24 +03:00
Regalis
2c5d272acd - special death messages for husk infections
- fixed husk infections not being removed from clients
- more accurate bleeding indicators
- humanoid standing anim tweaking
2016-08-28 20:22:45 +03:00
Regalis
d476ebdc8d Fixed letting go of dragged character when entering/exiting the sub, fixed spawnitems not being visible in the job info window 2016-08-22 16:49:43 +03:00
Regalis
69933188d6 Ragdoll.SetPosition takes platforms into account if the character isn't ignoring platforms (i.e. forcing a character on top of a platform won't make it fall through it), reaching the top/bottom of a ladder won't make networkplayers fall off, server ignores position updates from dead/unconscious characters, smaller ResetRagdollDistance 2016-08-10 19:16:18 +03:00
Regalis
a5111d33df Tons of AI + pathfinding bugfixes:
- waypoints are created between docked subs and removed when they undock
- fixed start waypoint being left out of steering paths
- NPCs won't close doors/hatches on themselves
- NPCs won't let go of ladders until their feet are above the lower edge of the hull
- fixed FindDivingGear "loops": need to find a suit -> need to get to a suit -> need a suit to get to the suit -> need to find a suit...
- fixed characters constantly turning from side to side in small rooms
- recursive function for finding the button which opens a door (so a button doesn't have to be connected straight to a door for an NPC to be able to open it)
- AIObjectiveGetItem keeps searching for more suitable items even if a path to a matching item has been found
2016-07-08 20:53:11 +03:00
Regalis
cd3ecd36e8 Merge branch 'multisub'
Conflicts:
	.gitignore
	Subsurface/Source/Characters/Animation/HumanoidAnimController.cs
	Subsurface/Source/Items/Components/Holdable/RepairTool.cs
	Subsurface_Solution.v12.suo
2016-07-04 17:42:31 +03:00
Regalis
34c6569313 Server can inflict impact damage on clients, character oxygen level syncing bugfix, hulls send a networkevent when oxygen level changes by >=5%, limb velocities aren't reset when receiving a network update 2016-06-29 17:26:26 +03:00
Regalis
38c5251005 Vertical docking port, docking sounds, water flows properly between horizontally docked hulls, falseoutput of signal check components can be changed, lighting and FOW works between hulls (todo: some logic for determining when to update light.HullsInRange when two subs are moving relative to each other) 2016-06-27 17:48:20 +03:00
Regalis
d520c00dc9 - stunned characters don't move their hands behind their back when cuffed (caused the characters to flail around when someone grabs them)
- characters can run while grabbing/dragging someone
- inventory and chatbox are hidden when stunned
- turret rotation is reset between minRotation and maxRotation when changing the rotation limits
- fixed explosion damage being applied to simPositions of the limbs instead of worldpositions
2016-06-09 16:54:30 +03:00
Regalis
7113a154fe Aiming is disabled when unconscious/stunned, the range of fire lightsources isn't randomized to reduce the amount of required convexhull updates 2016-05-19 19:49:31 +03:00
Regalis
63bb78b3ef Using TrySetLimbPosition when flipping a character to prevent limbs from going through walls, changes to outside->inside teleportation logic 2016-05-01 18:53:58 +03:00
Regalis
2136641609 Stun syncing bugfix, fixed dead/unconscious characters being unselectable in the info menu, pockets for doctors, fixed tutorial (map generation algorithm changes had made the level unplayable) 2016-04-25 19:16:01 +03:00
Regalis
6c538443fd - characters aren't teleported through gaps if a wall doesn't have a hole there
- characters aren't teleported outside until they're far enough from hulls (prevents them from "jumping" outside as they're teleported partially inside the body of the sub)
- arms are mirrored/flipped when turning in water
2016-04-22 17:21:34 +03:00
Regalis
17d499d70a - clients only apply OnImpact statuseffects on items when the server says so
- fixed characters occasionally teleporting partially inside walls in mp
- made it easier to drag characters while swimming
2016-04-16 21:00:21 +03:00
Regalis
3ac8139fc7 - changes to the logic for distributing oxygen through vents: the oxygen generator pushes more oxygen to larger rooms
- bugfixes in HumanoidAnimController.Flip()
- item/itemcomponent statuseffects are stored in a dictionary with the actiontype as a key, so the item doesn't have to iterate over all the components and all their statuseffects
- gap bubble particle tweaking
2016-03-29 17:57:05 +03:00
Regalis
f585235887 Performing CPR on unconscious players, a "use on self" button for some items 2016-03-25 15:34:40 +02:00
Regalis
0dbfb54b5f - crouching (allows placing signal items at the bottom of a room and may be useful when doctors are added (CPR animation, using medical items on dead bodies?))
- changes to the dying logic: characters will be unconscious when their health or oxygen goes below 0.0, and die when it drops to -100.0 (if either of the values is below zero, it will automatically decrease so the character will quickly die without medical care)
- fixed LightSprite being drawn on LightComponents even if the item is inside an inventory
- characters extend their arm more when placing signal items
2016-03-20 20:15:47 +02:00
Regalis
d1580328ed Some cleanup using ReSharper (mostly removing redundancies) 2016-03-12 15:32:34 +02:00