diff --git a/Subsurface/Content/Items/Diving/divinggear.xml b/Subsurface/Content/Items/Diving/divinggear.xml index 804ede07f..8a767806d 100644 --- a/Subsurface/Content/Items/Diving/divinggear.xml +++ b/Subsurface/Content/Items/Diving/divinggear.xml @@ -89,7 +89,7 @@ - + diff --git a/Subsurface/Content/Items/Fabricators/fabricators.xml b/Subsurface/Content/Items/Fabricators/fabricators.xml index 7938b6278..c585eec6d 100644 --- a/Subsurface/Content/Items/Fabricators/fabricators.xml +++ b/Subsurface/Content/Items/Fabricators/fabricators.xml @@ -34,6 +34,8 @@ + + diff --git a/Subsurface/Source/Characters/AI/EnemyAIController.cs b/Subsurface/Source/Characters/AI/EnemyAIController.cs index 6507992cc..5eddfdb03 100644 --- a/Subsurface/Source/Characters/AI/EnemyAIController.cs +++ b/Subsurface/Source/Characters/AI/EnemyAIController.cs @@ -378,7 +378,8 @@ namespace Barotrauma if (damageTarget is Character && dist1.0f) + if (Lights.LightManager.ViewTarget == this && Vector2.Distance(AnimController.Limbs[0].SimPosition, mouseSimPos) > 1.0f) { Body body = Submarine.PickBody(AnimController.Limbs[0].SimPosition, mouseSimPos); Structure structure = null; @@ -1134,7 +1134,7 @@ namespace Barotrauma AttackResult attackResult = closestLimb.AddDamage(simPosition, damageType, amount, bleedingAmount, playSound); AddDamage(damageType == DamageType.Burn ? CauseOfDeath.Burn : causeOfDeath, attackResult.Damage, null); - + //health -= attackResult.Damage; //if (health <= 0.0f && damageType == DamageType.Burn) Kill(CauseOfDeath.Burn); if (DoesBleed) diff --git a/Subsurface/Source/Characters/Limb.cs b/Subsurface/Source/Characters/Limb.cs index 4b1bf1018..af8be0cdc 100644 --- a/Subsurface/Source/Characters/Limb.cs +++ b/Subsurface/Source/Characters/Limb.cs @@ -315,14 +315,14 @@ namespace Barotrauma body.ApplyLinearImpulse((deltaPos - vel * 0.5f) * body.Mass, pullPos); } - public AttackResult AddDamage(Vector2 simPosition, DamageType damageType, float amount, float bleedingAmount, bool playSound) + public AttackResult AddDamage(Vector2 position, DamageType damageType, float amount, float bleedingAmount, bool playSound) { DamageSoundType damageSoundType = (damageType == DamageType.Blunt) ? DamageSoundType.LimbBlunt : DamageSoundType.LimbSlash; bool hitArmor = false; float totalArmorValue = 0.0f; - if (armorValue>0.0f && SectorHit(armorSector, simPosition)) + if (armorValue>0.0f && SectorHit(armorSector, position)) { hitArmor = true; totalArmorValue += armorValue; @@ -330,7 +330,7 @@ namespace Barotrauma if (wearingItem!=null && wearingItem.ArmorValue>0.0f && - SectorHit(wearingItem.ArmorSectorLimits, simPosition)) + SectorHit(wearingItem.ArmorSectorLimits, position)) { hitArmor = true; totalArmorValue += wearingItem.ArmorValue; @@ -347,7 +347,7 @@ namespace Barotrauma if (playSound) { - SoundPlayer.PlayDamageSound(damageSoundType, amount, ConvertUnits.ToDisplayUnits(simPosition)); + SoundPlayer.PlayDamageSound(damageSoundType, amount, position); } //Bleeding += bleedingAmount; @@ -357,7 +357,7 @@ namespace Barotrauma for (int i = 0; i < bloodAmount; i++) { - Vector2 particleVel = SimPosition - simPosition; + Vector2 particleVel = SimPosition - position; if (particleVel != Vector2.Zero) particleVel = Vector2.Normalize(particleVel); GameMain.ParticleManager.CreateParticle("blood", diff --git a/Subsurface/Source/Items/Components/Holdable/Propulsion.cs b/Subsurface/Source/Items/Components/Holdable/Propulsion.cs index 4455d4638..bd3f523ad 100644 --- a/Subsurface/Source/Items/Components/Holdable/Propulsion.cs +++ b/Subsurface/Source/Items/Components/Holdable/Propulsion.cs @@ -51,7 +51,7 @@ namespace Barotrauma.Items.Components public override bool Use(float deltaTime, Character character = null) { if (character == null) return false; - if (!character.IsKeyDown(InputType.Aim)) return false; + if (!character.IsKeyDown(InputType.Aim) || character.Stun>0.0f) return false; if (item.InWater) { diff --git a/Subsurface/Source/Networking/GameServer.cs b/Subsurface/Source/Networking/GameServer.cs index 1c5870cbb..b3be35082 100644 --- a/Subsurface/Source/Networking/GameServer.cs +++ b/Subsurface/Source/Networking/GameServer.cs @@ -1286,6 +1286,11 @@ namespace Barotrauma.Networking targetClient = ConnectedClients.Find(c => words[0] == "/" + c.name.ToLower() || c.Character != null && words[0] == "/" + c.Character.Name.ToLower()); + + if (targetClient==null) + { + AddChatMessage("Player ''"+words[0].Replace("/", "")+"'' not found!", ChatMessageType.Admin); + } } message = words[0] + " " + string.Join(" ", words, 2, words.Length - 2); diff --git a/Subsurface/changelog.txt b/Subsurface/changelog.txt index 631f18b4a..a1e7d3625 100644 --- a/Subsurface/changelog.txt +++ b/Subsurface/changelog.txt @@ -6,7 +6,10 @@ v0.3.2.0 - more reliable door syncing - deattaching items takes some time - welders and cutters do damage to players/enemies again - +- molochs can do damage to players +- server admins have the option to send messages only to dead players and spectators (/d [message]) or +to one specific player (/name [message]) +- a new enemy --------------------------------------------------------------------------------------------------------- v0.3.1.5 diff --git a/Subsurface_Solution.v12.suo b/Subsurface_Solution.v12.suo index cade127b1..3773365a1 100644 Binary files a/Subsurface_Solution.v12.suo and b/Subsurface_Solution.v12.suo differ