Merge remote-tracking branch 'refs/remotes/barotrauma/master'
Conflicts: Subsurface/Barotrauma.csproj
This commit is contained in:
@@ -66,7 +66,7 @@ namespace Lidgren.Network
|
||||
return new IPAddress(bytes);
|
||||
}
|
||||
|
||||
private static readonly SHA1 s_sha = SHA1.Create();
|
||||
private static readonly SHA256 s_sha = SHA256.Create();
|
||||
public static byte[] ComputeSHAHash(byte[] bytes, int offset, int count)
|
||||
{
|
||||
return s_sha.ComputeHash(bytes, offset, count);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
BIN
Subsurface/Content/Characters/Charybdis/charybdis.png
Normal file
BIN
Subsurface/Content/Characters/Charybdis/charybdis.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 609 KiB |
39
Subsurface/Content/Characters/Charybdis/charybdis.xml
Normal file
39
Subsurface/Content/Characters/Charybdis/charybdis.xml
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Character name ="charybdis" humanoid="false" health="1000.0" bleedingdecreasespeed="0.2">
|
||||
|
||||
<sound file="Content/Characters/Charybdis/charybdisattack.ogg" state="Attack" range="8000" />
|
||||
|
||||
<ragdoll waveamplitude="150.0" wavelength="10000" swimspeed="4.0" scale="1.5" canentersubmarine="false">
|
||||
|
||||
<!-- body -->
|
||||
<limb id = "0" radius="100" height="470" type="Torso" steerforce="1.0" pullpos="0,250">
|
||||
<sprite texture="Content/Characters/Charybdis/charybdis.png" sourcerect="160,0,242,688" depth="0.015" origin="0.5,0.5"/>
|
||||
</limb>
|
||||
|
||||
<!-- lower yaw -->
|
||||
<limb id = "1" radius="70" height="100" impacttolerance="50.0">
|
||||
<sprite texture="Content/Characters/Charybdis/charybdis.png" sourcerect="416,0,192,256" depth="0.025" origin="0.65,0.5"/>
|
||||
<attack range="300" duration="0.5" damage="5.00" bleedingdamage="50" structuredamage="500" damagetype="slash" torque="200" targetforce="-50"/>
|
||||
</limb>
|
||||
|
||||
<!-- front fins -->
|
||||
<limb id = "2" radius="60" height="430">
|
||||
<sprite texture="Content/Characters/Charybdis/charybdis.png" sourcerect="432,272,128,560" depth="0.008" origin="0.5,0.5"/>
|
||||
</limb>
|
||||
|
||||
<!-- tail -->
|
||||
<limb id = "3" radius="80" height="580" type="Tail">
|
||||
<sprite texture="Content/Characters/Charybdis/charybdis.png" sourcerect="0,0,160,752" depth="0.02" origin="0.5,0.5"/>
|
||||
</limb>
|
||||
|
||||
<!-- body to lower yaw -->
|
||||
<joint limb1="0" limb1anchor="48,128" limb2="1" limb2anchor="-30,-90" lowerlimit="-10" upperlimit="30"/>
|
||||
<!-- body to front fin -->
|
||||
<joint limb1="0" limb1anchor="32,-32" limb2="2" limb2anchor="-32,260" lowerlimit="-50" upperlimit="0"/>
|
||||
<!-- body to tail -->
|
||||
<joint limb1="0" limb1anchor="0,-270" limb2="3" limb2anchor="0,280" lowerlimit="-20" upperlimit="20"/>
|
||||
|
||||
</ragdoll>
|
||||
|
||||
<ai attackhumans="100.0" attackrooms="50.0" attackweaker="50" attackstronger="-30" sight="0.5" hearing="1.0"/>
|
||||
</Character>
|
||||
BIN
Subsurface/Content/Characters/Charybdis/charybdisattack.ogg
Normal file
BIN
Subsurface/Content/Characters/Charybdis/charybdisattack.ogg
Normal file
Binary file not shown.
@@ -7,7 +7,7 @@
|
||||
<sound file="Content/Characters/Crawler/idle2.ogg" state="None" range="500"/>
|
||||
|
||||
<ragdoll headposition="50" headangle="-70"
|
||||
waveamplitude="50.0" wavelength="2500"
|
||||
waveamplitude="5.0" wavelength="5000"
|
||||
swimspeed="2.0" walkspeed="2.0"
|
||||
stepsize ="15.0,20.0"
|
||||
legtorque="10"
|
||||
|
||||
@@ -40,6 +40,15 @@
|
||||
spawntype="mainpath"
|
||||
musictype="monster"/>
|
||||
|
||||
<MonsterEvent name="Under attack" description=""
|
||||
characterfile="Content/Characters/Charybdis/charybdis.xml"
|
||||
spawndeep="true"
|
||||
commonness="3"
|
||||
difficulty="5"
|
||||
minamount="1" maxamount="1"
|
||||
spawntype="deep"
|
||||
musictype="monster"/>
|
||||
|
||||
<MonsterEvent name="Under attack" description=""
|
||||
characterfile="Content/Characters/Endworm/endworm.xml"
|
||||
spawndeep="true"
|
||||
|
||||
@@ -102,6 +102,8 @@ namespace Barotrauma
|
||||
else
|
||||
{
|
||||
Limb head = GetLimb(LimbType.Head);
|
||||
if (head == null) head = GetLimb(LimbType.Torso);
|
||||
|
||||
float rotation = MathUtils.WrapAngleTwoPi(head.Rotation);
|
||||
rotation = MathHelper.ToDegrees(rotation);
|
||||
|
||||
@@ -147,11 +149,9 @@ namespace Barotrauma
|
||||
{
|
||||
walkPos -= movement.Length();
|
||||
|
||||
float waveRotation = (float)Math.Sin(walkPos / waveLength) * waveAmplitude;
|
||||
|
||||
float angle = MathUtils.GetShortestAngle(tail.body.Rotation, movementAngle + waveRotation);
|
||||
float waveRotation = (float)Math.Sin(walkPos / waveLength);
|
||||
|
||||
tail.body.ApplyTorque(angle * tail.Mass);
|
||||
tail.body.ApplyTorque(waveRotation * tail.Mass * 100.0f * waveAmplitude);
|
||||
|
||||
//limbs[tailIndex].body.ApplyTorque((Math.Sign(angle) + Math.Max(Math.Min(angle * 10.0f, 10.0f), -10.0f)) * limbs[tailIndex].body.Mass);
|
||||
//limbs[tailIndex].body.ApplyTorque(-limbs[tailIndex].body.AngularVelocity * 0.5f * limbs[tailIndex].body.Mass);
|
||||
@@ -160,6 +160,8 @@ namespace Barotrauma
|
||||
Vector2 steerForce = Vector2.Zero;
|
||||
|
||||
Limb head = GetLimb(LimbType.Head);
|
||||
if (head == null) head = GetLimb(LimbType.Torso);
|
||||
|
||||
if (head != null)
|
||||
{
|
||||
float angle = (rotateTowardsMovement) ?
|
||||
@@ -196,8 +198,12 @@ namespace Barotrauma
|
||||
for (int i = 0; i < Limbs.Count(); i++)
|
||||
{
|
||||
if (steerForce != Vector2.Zero)
|
||||
Limbs[i].body.ApplyForce(steerForce * Limbs[i].SteerForce * Limbs[i].Mass);
|
||||
{
|
||||
Vector2 pullPos = Limbs[i].pullJoint == null ? Limbs[i].SimPosition : Limbs[i].pullJoint.WorldAnchorA;
|
||||
Limbs[i].body.ApplyForce(steerForce * Limbs[i].SteerForce * Limbs[i].Mass, pullPos);
|
||||
|
||||
}
|
||||
|
||||
if (Limbs[i].type != LimbType.Torso) continue;
|
||||
|
||||
float dist = (Limbs[0].SimPosition - Limbs[i].SimPosition).Length();
|
||||
|
||||
Reference in New Issue
Block a user