- Edited item densities to make more sense
- Characters spawned through the console are synced with clients
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
</Deconstruct>
|
||||
|
||||
|
||||
<Body width="36" height="60" density="5"/>
|
||||
<Body width="36" height="60" density="50"/>
|
||||
|
||||
<Holdable slots="RightHand+LeftHand" holdpos="30,-15" handle1="0,10" handle2="0,-10">
|
||||
<StatusEffect type="Always" target="Hull" oxygen="-50000.0"/>
|
||||
@@ -34,7 +34,7 @@
|
||||
<Item name="Incendium Bar"/>
|
||||
</Deconstruct>
|
||||
|
||||
<Body radius="20" height="20" density="5"/>
|
||||
<Body radius="20" height="20" density="50"/>
|
||||
|
||||
<Holdable slots="RightHand+LeftHand" holdpos="30,-15" handle1="0,10" handle2="0,-10">
|
||||
<StatusEffect type="Always">
|
||||
@@ -56,7 +56,7 @@
|
||||
<Item name="Fulgurium Bar"/>
|
||||
</Deconstruct>
|
||||
|
||||
<Body radius="20" height="20" density="5"/>
|
||||
<Body radius="20" height="20" density="50"/>
|
||||
|
||||
<Holdable slots="RightHand+LeftHand" holdpos="30,-15" handle1="0,10" handle2="0,-10"/>
|
||||
</Item>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<Item name="FPGA Circuit"/>
|
||||
</Deconstruct>
|
||||
|
||||
<Body width="32" height="32"/>
|
||||
<Body width="32" height="32" density="40"/>
|
||||
|
||||
<Controller userpos="0" direction ="None" canbepicked = "true" msg="Open [E]">
|
||||
<RequiredItem name="ID Card" type="Picked" msg="UNAUTHORIZED ACCESS"/>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<Sprite texture ="captainhat.png" depth="0.6"/>
|
||||
|
||||
<Body radius="8" density="5"/>
|
||||
<Body radius="8" density="30"/>
|
||||
|
||||
<Wearable limbtype="Head" slots="Any,Head">
|
||||
<sprite texture="captainhat.png" limb="Head" origin="0.5,0.9"/>
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
<Sprite texture ="captainLegs.png" sourcerect="0,49,52,17" depth="0.6"/>
|
||||
|
||||
<Body width="52" height="17"/>
|
||||
<Body width="52" height="17" density="30"/>
|
||||
|
||||
<Wearable slots="Any,Torso">
|
||||
<sprite texture="captainTorso.png" limb="Torso" sourcerect="0,3,30,58" origin="0.5,0.48" depth="0.01"/>
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
<Sprite texture ="captainLegs.png" sourcerect="0,67,51,13" depth="0.6"/>
|
||||
|
||||
<Body width="51" height="13"/>
|
||||
<Body width="51" height="13" density="30"/>
|
||||
|
||||
<Wearable slots="Any,Legs">
|
||||
<sprite texture="captainLegs.png" limb="Waist" sourcerect="0,0,1,1" origin="0.5,0.5" hidelimb="true"/>
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
<Sprite texture ="securitygear.png" sourcerect="68,0,60,31" depth="0.6"/>
|
||||
|
||||
<Body width="52" height="17"/>
|
||||
<Body width="52" height="17" density="40"/>
|
||||
|
||||
<Wearable slots="Any,Torso" armorvalue="10.0">
|
||||
<sprite texture="securitygear.png" limb="Torso" sourcerect="0,0,38,58" origin="0.52,0.48"/>
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
<Sprite texture ="securitygear.png" sourcerect="40,32,34,25" depth="0.6"/>
|
||||
|
||||
<Body radius="12"/>
|
||||
<Body radius="12" density="50"/>
|
||||
|
||||
<Wearable slots="Any,Head" armorvalue="20.0">
|
||||
<sprite texture="securitygear.png" limb="Head" sourcerect="39,31,29,22" origin="0.51,0.9"/>
|
||||
@@ -103,7 +103,7 @@
|
||||
|
||||
<Sprite texture = "securitygear.png" sourcerect="0,63,32,14" depth="0.6"/>
|
||||
|
||||
<Body width="30" height="12"/>
|
||||
<Body width="30" height="12" density="30"/>
|
||||
|
||||
<Wearable slots="Any,RightHand+LeftHand">
|
||||
<sprite texture="securitygear.png" limb="RightHand" sourcerect="32,62,16,16" origin="0.5,-0.5" depth="0.01"/>
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
<Sprite texture = "engigear.png" sourcerect="0,52,50,25" depth="0.6"/>
|
||||
|
||||
<Body width="50" height="17"/>
|
||||
<Body width="50" height="17" density="20"/>
|
||||
|
||||
<Wearable slots="Any,Torso+Legs">
|
||||
<sprite texture="engigear.png" limb="Torso" sourcerect="0,0,32,51" origin="0.5,0.48" depth="0.01"/>
|
||||
@@ -151,7 +151,7 @@
|
||||
|
||||
<Sprite texture = "engigear.png" sourcerect="53,50,51,25" depth="0.6"/>
|
||||
|
||||
<Body width="50" height="17"/>
|
||||
<Body width="50" height="17" density="20"/>
|
||||
|
||||
<Wearable slots="Any,Torso+Legs">
|
||||
<sprite texture="engigear.png" limb="Torso" sourcerect="0,77,32,51" origin="0.5,0.48" depth="0.01"/>
|
||||
@@ -180,7 +180,7 @@
|
||||
|
||||
<Sprite texture ="clownmask.png" depth="0.6"/>
|
||||
|
||||
<Body radius="8" density="5"/>
|
||||
<Body radius="8" density="10"/>
|
||||
|
||||
<Wearable limbtype="Head" slots="Any,Head">
|
||||
<sprite texture="clownmask.png" limb="Head" origin="0.5,0.5"/>
|
||||
@@ -196,7 +196,7 @@
|
||||
|
||||
<Sprite texture ="clownpants.png" sourcerect="0,62,53,18" depth="0.6"/>
|
||||
|
||||
<Body width="53" height="18"/>
|
||||
<Body width="53" height="18" density="30"/>
|
||||
|
||||
<Wearable slots="Any,Torso+Legs">
|
||||
<sprite texture="clownshirt.png" limb="Torso" sourcerect="0,3,30,58" origin="0.5,0.48" depth="0.02"/>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
<Sprite texture ="DivingMask.png" depth="0.5"/>
|
||||
|
||||
<Body radius="18" density="5"/>
|
||||
<Body radius="18" density="20"/>
|
||||
|
||||
<Wearable limbtype="Head" slots="Any,Head">
|
||||
<sprite texture="DivingMask.png" limb="Head" sourcerect="1,1,37,38"/>
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
<Sprite texture ="DivingSuit.png" sourcerect="82,0,46,128" depth="0.55"/>
|
||||
|
||||
<Body width="37" height="113" density="5"/>
|
||||
<Body width="37" height="113" density="50"/>
|
||||
|
||||
<Wearable slots="Head+Torso+Legs" armorvalue="10.0">
|
||||
<sprite texture="DivingSuit.png" limb="Head" sourcerect="0,0,1,1" origin="0.5,0.5" hidelimb="true"/>
|
||||
@@ -115,7 +115,7 @@
|
||||
|
||||
<Sprite texture ="DivingSuit.png" depth="0.5" sourcerect="22,98,59,32" origin="0.6,0.66"/>
|
||||
|
||||
<Body width="55" height="30" density="5"/>
|
||||
<Body width="55" height="30" density="20"/>
|
||||
|
||||
<Holdable slots="Any,RightHand+LeftHand" aimpos="100,0" handle1="0,11" handle2="2,11"/>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<Sprite texture ="monitor.png" depth="0.85"/>
|
||||
|
||||
<Body width="16" height="16"/>
|
||||
<Body width="16" height="16" density="30"/>
|
||||
|
||||
<Holdable slots="Any,RightHand,LeftHand" msg="Detach [Wrench]"
|
||||
aimpos="35,-10" handle1="0,0" attachable="true" aimable="true">
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<Sprite texture ="wire.png" depth="0.55"/>
|
||||
|
||||
<Body radius="15"/>
|
||||
<Body radius="15" density="30"/>
|
||||
|
||||
<Holdable slots="Any,RightHand,LeftHand" handle1="0,0"/>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
</Deconstruct>
|
||||
|
||||
<Sprite texture ="wire.png" depth="0.55"/>
|
||||
<Body radius="15"/>
|
||||
<Body radius="15" density="30"/>
|
||||
<Holdable slots="Any,RightHand,LeftHand" handle1="0,0"/>
|
||||
|
||||
<Wire/>
|
||||
@@ -60,7 +60,7 @@
|
||||
</Deconstruct>
|
||||
|
||||
<Sprite texture ="wire.png" depth="0.55"/>
|
||||
<Body radius="15"/>
|
||||
<Body radius="15" density="30"/>
|
||||
<Holdable slots="Any,RightHand,LeftHand" handle1="0,0"/>
|
||||
|
||||
<Wire/>
|
||||
@@ -81,7 +81,7 @@
|
||||
</Deconstruct>
|
||||
|
||||
<Sprite texture ="wire.png" depth="0.55"/>
|
||||
<Body radius="15"/>
|
||||
<Body radius="15" density="30"/>
|
||||
<Holdable slots="Any,RightHand,LeftHand" handle1="0,0"/>
|
||||
|
||||
<Wire/>
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
<Sprite texture="signalcomp.png" depth="0.8" sourcerect="32,16,16,16"/>
|
||||
|
||||
<Body width="16" height="16"/>
|
||||
<Body width="16" height="16" density="30"/>
|
||||
|
||||
<Holdable slots="Any,RightHand,LeftHand"/>
|
||||
</Item>
|
||||
@@ -121,7 +121,7 @@
|
||||
|
||||
<AndComponent canbeselected = "true"/>
|
||||
|
||||
<Body width="16" height="16"/>
|
||||
<Body width="16" height="16" density="30"/>
|
||||
|
||||
<Holdable selectkey="Action" slots="Any,RightHand,LeftHand" msg="Detach [Wrench]" PickingTime="5.0"
|
||||
aimpos="35,-10" handle1="0,0" attachable="true" aimable="true">
|
||||
@@ -156,7 +156,7 @@
|
||||
|
||||
<OrComponent canbeselected = "true"/>
|
||||
|
||||
<Body width="16" height="16"/>
|
||||
<Body width="16" height="16" density="30"/>
|
||||
|
||||
<Holdable selectkey="Action" slots="Any,RightHand,LeftHand" msg="Detach [Wrench]" PickingTime="5.0"
|
||||
aimpos="35,-10" handle1="0,0" attachable="true" aimable="true">
|
||||
@@ -190,7 +190,7 @@
|
||||
|
||||
<NotComponent canbeselected = "true"/>
|
||||
|
||||
<Body width="16" height="16"/>
|
||||
<Body width="16" height="16" density="30"/>
|
||||
|
||||
<Holdable selectkey="Action" slots="Any,RightHand,LeftHand" msg="Detach [Wrench]" PickingTime="5.0"
|
||||
aimpos="35,-10" handle1="0,0" attachable="true" aimable="true">
|
||||
@@ -224,7 +224,7 @@
|
||||
<sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="0,96,31,32"/>
|
||||
</LightComponent>
|
||||
|
||||
<Body width="16" height="16"/>
|
||||
<Body width="16" height="16" density="30"/>
|
||||
|
||||
<Holdable selectkey="Action" slots="Any,RightHand,LeftHand" msg="Detach [Wrench]" PickingTime="5.0"
|
||||
aimpos="35,-10" handle1="0,0" attachable="true" aimable="true">
|
||||
@@ -257,7 +257,7 @@
|
||||
|
||||
<OxygenDetector canbeselected = "true"/>
|
||||
|
||||
<Body width="31" height="24"/>
|
||||
<Body width="31" height="24" density="30"/>
|
||||
|
||||
<Holdable selectkey="Action" slots="Any,RightHand,LeftHand" msg="Detach [Wrench]" PickingTime="5.0"
|
||||
aimpos="35,-10" handle1="0,0" attachable="true" aimable="true">
|
||||
@@ -288,7 +288,7 @@
|
||||
|
||||
<WaterDetector canbeselected = "true"/>
|
||||
|
||||
<Body width="31" height="24"/>
|
||||
<Body width="31" height="24" density="30"/>
|
||||
|
||||
<Holdable selectkey="Action" slots="Any,RightHand,LeftHand" msg="Detach [Wrench]" PickingTime="5.0"
|
||||
aimpos="35,-10" handle1="0,0" attachable="true" aimable="true">
|
||||
@@ -319,7 +319,7 @@
|
||||
|
||||
<SignalCheckComponent canbeselected = "true"/>
|
||||
|
||||
<Body width="16" height="16"/>
|
||||
<Body width="16" height="16" density="30"/>
|
||||
|
||||
<Holdable selectkey="Action" slots="Any,RightHand,LeftHand" msg="Detach [Wrench]" PickingTime="5.0"
|
||||
aimpos="35,-10" handle1="0,0" attachable="true" aimable="true">
|
||||
@@ -353,7 +353,7 @@
|
||||
|
||||
<RegExFindComponent canbeselected = "true"/>
|
||||
|
||||
<Body width="16" height="16"/>
|
||||
<Body width="16" height="16" density="30"/>
|
||||
|
||||
<Holdable selectkey="Action" aimpos="35,-10" handle1="0,0" attachable="true" aimable="true" PickingTime="5.0"
|
||||
slots="Any,RightHand,LeftHand" msg="Detach [Wrench]">
|
||||
@@ -385,7 +385,7 @@
|
||||
|
||||
<WifiComponent canbeselected = "true"/>
|
||||
|
||||
<Body width="16" height="16"/>
|
||||
<Body width="16" height="16" density="30"/>
|
||||
|
||||
<Holdable selectkey="Action" aimpos="35,-10" handle1="0,0" attachable="true" aimable="true" PickingTime="5.0"
|
||||
slots="Any,RightHand,LeftHand" msg="Detach [Wrench]">
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
<Sprite texture ="materials.png" sourcerect="0,0,24,12" depth="0.55"/>
|
||||
|
||||
<Body width="24" height="12"/>
|
||||
<Body width="24" height="12" density="50"/>
|
||||
|
||||
<Holdable slots="Any,RightHand,LeftHand" handle1="0,0"/>
|
||||
</Item>
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
<Sprite texture ="materials.png" sourcerect="0,0,24,12" depth="0.55"/>
|
||||
|
||||
<Body width="24" height="12"/>
|
||||
<Body width="24" height="12" density="60"/>
|
||||
|
||||
<Holdable slots="Any,RightHand,LeftHand" handle1="0,0"/>
|
||||
</Item>
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
<Sprite texture ="materials.png" sourcerect="0,0,24,12" depth="0.55"/>
|
||||
|
||||
<Body width="24" height="12"/>
|
||||
<Body width="24" height="12" density="50"/>
|
||||
|
||||
<Holdable slots="Any,RightHand,LeftHand" handle1="0,0"/>
|
||||
</Item>
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
<Sprite texture ="materials.png" sourcerect="0,0,24,12" depth="0.55"/>
|
||||
|
||||
<Body width="24" height="12"/>
|
||||
<Body width="24" height="12" density="20"/>
|
||||
|
||||
<Holdable slots="Any,RightHand,LeftHand" handle1="0,0"/>
|
||||
</Item>
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
<Sprite texture ="materials.png" sourcerect="0,0,24,12" depth="0.55"/>
|
||||
|
||||
<Body width="24" height="12"/>
|
||||
<Body width="24" height="12" density="60"/>
|
||||
|
||||
<Holdable slots="Any,RightHand,LeftHand" handle1="0,0">
|
||||
<StatusEffect type="OnBroken" target="This" Condition="-100.0" sound="Content/Items/Reactor/explosion.ogg">
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
<Sprite texture ="materials.png" sourcerect="0,0,24,12" depth="0.55"/>
|
||||
|
||||
<Body width="24" height="12"/>
|
||||
<Body width="24" height="12" density="50"/>
|
||||
|
||||
<Holdable slots="Any,RightHand,LeftHand" handle1="0,0"/>
|
||||
</Item>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
<Sprite texture ="med.png" sourcerect="0,0,24,5" depth="0.6"/>
|
||||
|
||||
<Body width="24" height="5"/>
|
||||
<Body width="24" height="5" density="20"/>
|
||||
|
||||
<Holdable slots="Any,RightHand,LeftHand" RemoveOnUse="true">
|
||||
<StatusEffect type="OnUse" target="This, Character" health="30.0" Condition="-100.0" disabledeltatime="true" sound="Content/Items/Medical/syringe.ogg"/>
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
<Sprite texture ="med.png" sourcerect="0,14,14,18" depth="0.6"/>
|
||||
|
||||
<Body width="9" height="15"/>
|
||||
<Body width="9" height="15" density="20"/>
|
||||
|
||||
<Holdable slots="Any,RightHand,LeftHand" RemoveOnUse="true">
|
||||
<StatusEffect type="OnUse" target="This, Character" bleeding="-10.0" Condition="-100.0" disabledeltatime="true" sound="Content/Items/Medical/bandage.ogg"/>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</Deconstruct>
|
||||
|
||||
<!-- physics body -->
|
||||
<Body width="41" height="17" density="5"/>
|
||||
<Body width="41" height="17" density="40"/>
|
||||
|
||||
<!-- the character will hold the item 50 pixels in front of him, with his hands at the handle1 and handle2 positions -->
|
||||
<Holdable slots="Any,RightHand+LeftHand" controlpose="true"
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
<Sprite texture ="tools.png" sourcerect="0,0,41,16" depth="0.5"/>
|
||||
|
||||
<Body width="41" height="16" density="5"/>
|
||||
<Body width="41" height="16" density="40"/>
|
||||
|
||||
<Holdable slots="Any,RightHand+LeftHand" controlpose="true"
|
||||
aimpos="50,0" handle1="-12,4"/>
|
||||
@@ -159,7 +159,7 @@
|
||||
|
||||
<Sprite texture ="tools.png" sourcerect="0,58,31,6" depth="0.5"/>
|
||||
|
||||
<Body width="31" height="6" density="20"/>
|
||||
<Body width="31" height="6" density="50"/>
|
||||
|
||||
<Holdable slots="Any,RightHand,LeftHand"
|
||||
holdangle="30" handle1="-10,0"/>
|
||||
@@ -175,7 +175,7 @@
|
||||
|
||||
<Sprite texture ="tools.png" sourcerect="0,50,26,7" depth="0.5"/>
|
||||
|
||||
<Body width="30" height="7" density="20"/>
|
||||
<Body width="30" height="7" density="50"/>
|
||||
|
||||
<MeleeWeapon slots="Any,RightHand,LeftHand"
|
||||
aimpos="50,0" handle1="-5,0" holdangle="30" reload="1.0">
|
||||
|
||||
@@ -60,9 +60,9 @@
|
||||
price="200"
|
||||
tags="smallitem,weapon">
|
||||
|
||||
<Sprite texture="weapons.png" sourcerect="98,0,11,24"/>
|
||||
<Sprite texture="weapons.png" sourcerect="98,0,11,24" depth="0.5"/>
|
||||
|
||||
<Body width="11" height="24" density="15" friction="0.8f"/>
|
||||
<Body width="11" height="24" density="30"/>
|
||||
|
||||
<Throwable slots="Any,RightHand,LeftHand" holdpos="0,0" handle1="0,0" throwforce="4.0" aimpos="35,-10">
|
||||
<StatusEffect type="OnUse" target="This" Condition="-100.0" delay="3.0" sound="Content/Items/Weapons/stungrenade.ogg">
|
||||
@@ -77,9 +77,9 @@
|
||||
pickdistance="200"
|
||||
tags="smallitem,weapon">
|
||||
|
||||
<Sprite texture="weapons.png" sourcerect="98,0,11,24"/>
|
||||
<Sprite texture="weapons.png" sourcerect="98,0,11,24" depth="0.5"/>
|
||||
|
||||
<Body width="11" height="24" density="15" friction="0.8f"/>
|
||||
<Body width="11" height="24" density="30"/>
|
||||
|
||||
<Throwable slots="Any,RightHand,LeftHand" holdpos="0,0" handle1="0,0" throwforce="4.0" aimpos="35,-10">
|
||||
<StatusEffect type="OnUse" target="This" Condition="-100.0" delay="3.0" sound="Content/Items/Weapons/stungrenade.ogg">
|
||||
@@ -104,7 +104,7 @@
|
||||
|
||||
<Sprite texture="weapons.png" sourcerect="21,0,77,22" depth="0.5"/>
|
||||
|
||||
<Body width="90" height="30" density="10"/>
|
||||
<Body width="90" height="30" density="30"/>
|
||||
|
||||
<MeleeWeapon slots="Any,RightHand,LeftHand"
|
||||
aimpos="50,0" handle1="-5,0" holdangle="10" reload="1.0">
|
||||
@@ -141,7 +141,7 @@
|
||||
|
||||
<Sprite texture="weapons.png" sourcerect="0,0,20,9" depth="0.8"/>
|
||||
|
||||
<Body width="20" height="9" density="15"/>
|
||||
<Body width="20" height="9" density="30"/>
|
||||
|
||||
<Pickable slots="Any,RightHand,LeftHand"/>
|
||||
</Item>
|
||||
@@ -161,7 +161,7 @@
|
||||
|
||||
<Sprite texture="weapons.png" sourcerect="0,0,20,9" depth="0.8"/>
|
||||
|
||||
<Body width="20" height="9" density="15"/>
|
||||
<Body width="20" height="9" density="30"/>
|
||||
|
||||
<Pickable slots="Any,RightHand,LeftHand"/>
|
||||
</Item>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<Sprite texture ="idcard.png" depth="0.8"/>
|
||||
|
||||
<Body width="16" height="16"/>
|
||||
<Body width="16" height="16" density="20"/>
|
||||
|
||||
<Pickable/>
|
||||
</Item>
|
||||
|
||||
@@ -141,6 +141,12 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
public string ConfigPath
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public float Mass
|
||||
{
|
||||
get { return AnimController.Mass; }
|
||||
@@ -396,6 +402,8 @@ namespace Barotrauma
|
||||
{
|
||||
keys[i] = new Key(GameMain.Config.KeyBind((InputType)i));
|
||||
}
|
||||
|
||||
ConfigPath = file;
|
||||
|
||||
selectedItems = new Item[2];
|
||||
|
||||
|
||||
@@ -193,11 +193,15 @@ namespace Barotrauma
|
||||
break;
|
||||
case "spawn":
|
||||
if (commands.Length == 1) return;
|
||||
|
||||
|
||||
Character spawnedCharacter = null;
|
||||
|
||||
if (commands[1].ToLower()=="human")
|
||||
{
|
||||
WayPoint spawnPoint = WayPoint.GetRandom(SpawnType.Human);
|
||||
Character.Controlled = Character.Create(Character.HumanConfigFile, (spawnPoint == null) ? Vector2.Zero : spawnPoint.WorldPosition);
|
||||
spawnedCharacter = Character.Create(Character.HumanConfigFile, (spawnPoint == null) ? Vector2.Zero : spawnPoint.WorldPosition);
|
||||
Character.Controlled = spawnedCharacter;
|
||||
|
||||
if (GameMain.GameSession != null)
|
||||
{
|
||||
SinglePlayerMode mode = GameMain.GameSession.gameMode as SinglePlayerMode;
|
||||
@@ -209,9 +213,11 @@ namespace Barotrauma
|
||||
else
|
||||
{
|
||||
WayPoint spawnPoint = WayPoint.GetRandom(SpawnType.Enemy);
|
||||
Character.Create("Content/Characters/" + commands[1] + "/" + commands[1] + ".xml", (spawnPoint == null) ? Vector2.Zero : spawnPoint.WorldPosition);
|
||||
spawnedCharacter = Character.Create("Content/Characters/" + commands[1] + "/" + commands[1] + ".xml", (spawnPoint == null) ? Vector2.Zero : spawnPoint.WorldPosition);
|
||||
}
|
||||
|
||||
if (spawnedCharacter != null && GameMain.Server != null) GameMain.Server.SendCharacterSpawnMessage(spawnedCharacter);
|
||||
|
||||
break;
|
||||
//case "startserver":
|
||||
// if (Game1.Server==null)
|
||||
|
||||
@@ -588,6 +588,9 @@ namespace Barotrauma.Networking
|
||||
case (byte)PacketTypes.NewItem:
|
||||
Item.Spawner.ReadNetworkData(inc);
|
||||
break;
|
||||
case (byte)PacketTypes.NewCharacter:
|
||||
ReadCharacterSpawnMessage(inc);
|
||||
break;
|
||||
case (byte)PacketTypes.RemoveItem:
|
||||
Item.Remover.ReadNetworkData(inc);
|
||||
break;
|
||||
@@ -767,6 +770,18 @@ namespace Barotrauma.Networking
|
||||
GameMain.NetworkMember = null;
|
||||
}
|
||||
|
||||
public void ReadCharacterSpawnMessage(NetIncomingMessage message)
|
||||
{
|
||||
string configPath = message.ReadString();
|
||||
|
||||
ushort id = message.ReadUInt16();
|
||||
|
||||
Vector2 position = new Vector2(message.ReadFloat(), message.ReadFloat());
|
||||
|
||||
var character = Character.Create(configPath, position);
|
||||
if (character != null) character.ID = id;
|
||||
}
|
||||
|
||||
public void RequestFile(string file, FileTransferMessageType fileType)
|
||||
{
|
||||
if (fileStreamReceiver!=null)
|
||||
|
||||
@@ -1476,6 +1476,21 @@ namespace Barotrauma.Networking
|
||||
message.Write(character.Info.Job.Name);
|
||||
}
|
||||
|
||||
public void SendCharacterSpawnMessage(Character character)
|
||||
{
|
||||
NetOutgoingMessage message = server.CreateMessage();
|
||||
message.Write((byte)PacketTypes.NewCharacter);
|
||||
|
||||
message.Write(character.ConfigPath);
|
||||
|
||||
message.Write(character.ID);
|
||||
|
||||
message.Write(character.Position.X);
|
||||
message.Write(character.Position.Y);
|
||||
|
||||
SendMessage(message, NetDeliveryMethod.ReliableUnordered);
|
||||
}
|
||||
|
||||
public void SendItemSpawnMessage(List<Item> items, List<Inventory> inventories = null)
|
||||
{
|
||||
if (items == null || !items.Any()) return;
|
||||
|
||||
@@ -21,6 +21,8 @@ namespace Barotrauma.Networking
|
||||
|
||||
NewItem, RemoveItem,
|
||||
|
||||
NewCharacter,
|
||||
|
||||
CharacterInfo,
|
||||
|
||||
Chatmessage, UpdateNetLobby,
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
---------------------------------------------------------------------------------------------------------
|
||||
v0.3.4.0
|
||||
v0.3.4.1
|
||||
---------------------------------------------------------------------------------------------------------
|
||||
|
||||
Multiplayer:
|
||||
- fixed a major bug in the networking code, which caused the server to incorrectly determine the order
|
||||
of messages received from different clients and discard valid messages
|
||||
- fixed levels with the same seed appearing different between the Linux and Windows versions
|
||||
- password prompt for password-protected private servers
|
||||
|
||||
|
||||
---------------------------------------------------------------------------------------------------------
|
||||
v0.3.4.0
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user