Changed field names in CScenarioChainingNode

This commit is contained in:
dexy 2021-12-01 17:37:07 +11:00
parent f808c095c1
commit 6c8e6be726
7 changed files with 92 additions and 90 deletions

View File

@ -3356,6 +3356,8 @@ namespace CodeWalker.GameFiles
Chains = 3254907796, Chains = 3254907796,
ChainingGraph = 3696045377, ChainingGraph = 3696045377,
rage__spdSphere = 1062159465, rage__spdSphere = 1062159465,
HasIncomingEdges = 407126079,
HasOutgoingEdges = 1308720135,
EdgeIds = 934700563, EdgeIds = 934700563,
TypeNames = 3057471271, TypeNames = 3057471271,
GroupNames = 2506712617, GroupNames = 2506712617,

View File

@ -404,8 +404,8 @@ namespace CodeWalker.GameFiles
new MetaStructureEntryInfo_s(MetaName.Position, 0, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0), new MetaStructureEntryInfo_s(MetaName.Position, 0, MetaStructureEntryDataType.Float_XYZ, 0, 0, 0),
new MetaStructureEntryInfo_s((MetaName)2602393771, 16, MetaStructureEntryDataType.Hash, 0, 0, 0), new MetaStructureEntryInfo_s((MetaName)2602393771, 16, MetaStructureEntryDataType.Hash, 0, 0, 0),
new MetaStructureEntryInfo_s(MetaName.ScenarioType, 20, MetaStructureEntryDataType.Hash, 0, 0, 0), new MetaStructureEntryInfo_s(MetaName.ScenarioType, 20, MetaStructureEntryDataType.Hash, 0, 0, 0),
new MetaStructureEntryInfo_s((MetaName)407126079, 24, MetaStructureEntryDataType.Boolean, 0, 0, 0), new MetaStructureEntryInfo_s(MetaName.HasIncomingEdges, 24, MetaStructureEntryDataType.Boolean, 0, 0, 0),
new MetaStructureEntryInfo_s((MetaName)1308720135, 25, MetaStructureEntryDataType.Boolean, 0, 0, 0) new MetaStructureEntryInfo_s(MetaName.HasOutgoingEdges, 25, MetaStructureEntryDataType.Boolean, 0, 0, 0)
); );
case MetaName.CScenarioChainingEdge: case MetaName.CScenarioChainingEdge:
return new MetaStructureInfo(MetaName.CScenarioChainingEdge, 2004985940, 256, 8, return new MetaStructureInfo(MetaName.CScenarioChainingEdge, 2004985940, 256, 8,
@ -5287,16 +5287,16 @@ namespace CodeWalker.GameFiles
{ {
public Vector3 Position { get; set; } //0 0: Float_XYZ: 0: Position public Vector3 Position { get; set; } //0 0: Float_XYZ: 0: Position
public float Unused0 { get; set; }//12 public float Unused0 { get; set; }//12
public MetaHash Unk_2602393771 { get; set; } //16 16: Hash: 0: 2602393771 public MetaHash Unk_2602393771 { get; set; } //16 16: Hash: 0: 2602393771 prop name, eg. prop_parknmeter_01, prop_atm_01, prop_bench_01a
public MetaHash ScenarioType { get; set; } //20 20: Hash: 0: ScenarioType public MetaHash ScenarioType { get; set; } //20 20: Hash: 0: ScenarioType
public byte Unk_407126079_NotFirst { get; set; } //24 24: Boolean: 0: 407126079 //can move backwards? (not first node) public byte HasIncomingEdges { get; set; } //24 24: Boolean: 0: HasIncomingEdges (not first node)
public byte Unk_1308720135_NotLast { get; set; } //25 25: Boolean: 0: 1308720135 //can move forwards? (not last node) public byte HasOutgoingEdges { get; set; } //25 25: Boolean: 0: HasOutgoingEdges (not last node)
public ushort Unused1 { get; set; }//26 public ushort Unused1 { get; set; }//26
public uint Unused2 { get; set; }//28 public uint Unused2 { get; set; }//28
public override string ToString() public override string ToString()
{ {
return //Unk_407126079.ToString() + ", " + Unk_1308720135.ToString() + ", " + return
ScenarioType.ToString() + ", " + Unk_2602393771.ToString(); ScenarioType.ToString() + ", " + Unk_2602393771.ToString();
} }
} }
@ -5310,11 +5310,11 @@ namespace CodeWalker.GameFiles
public CScenarioChainingNode Data { get { return _Data; } set { _Data = value; } } public CScenarioChainingNode Data { get { return _Data; } set { _Data = value; } }
public Vector3 Position { get { return _Data.Position; } set { _Data.Position = value; } } public Vector3 Position { get { return _Data.Position; } set { _Data.Position = value; } }
public MetaHash Unk1 { get { return _Data.Unk_2602393771; } set { _Data.Unk_2602393771 = value; } } public MetaHash PropHash { get { return _Data.Unk_2602393771; } set { _Data.Unk_2602393771 = value; } }
public MetaHash TypeHash { get { return _Data.ScenarioType; } set { _Data.ScenarioType = value; } } public MetaHash TypeHash { get { return _Data.ScenarioType; } set { _Data.ScenarioType = value; } }
public ScenarioTypeRef Type { get; set; } public ScenarioTypeRef Type { get; set; }
public bool NotFirst { get { return _Data.Unk_407126079_NotFirst == 1; } set { _Data.Unk_407126079_NotFirst = (byte)(value ? 1 : 0); } } public bool HasIncomingEdges { get { return _Data.HasIncomingEdges == 1; } set { _Data.HasIncomingEdges = (byte)(value ? 1 : 0); } }
public bool NotLast { get { return _Data.Unk_1308720135_NotLast == 1; } set { _Data.Unk_1308720135_NotLast = (byte)(value ? 1 : 0); } } public bool HasOutgoingEdges { get { return _Data.HasOutgoingEdges == 1; } set { _Data.HasOutgoingEdges = (byte)(value ? 1 : 0); } }
public int NodeIndex { get; set; } public int NodeIndex { get; set; }
public MCScenarioChain Chain { get; set; } public MCScenarioChain Chain { get; set; }

View File

@ -13200,8 +13200,8 @@ namespace CodeWalker.GameFiles
new PsoStructureEntryInfo(MetaName.Position, PsoDataType.Float3a, 16, 0, 0), new PsoStructureEntryInfo(MetaName.Position, PsoDataType.Float3a, 16, 0, 0),
new PsoStructureEntryInfo((MetaName)2602393771, PsoDataType.String, 32, 7, 0), new PsoStructureEntryInfo((MetaName)2602393771, PsoDataType.String, 32, 7, 0),
new PsoStructureEntryInfo(MetaName.ScenarioType, PsoDataType.String, 36, 7, 0), new PsoStructureEntryInfo(MetaName.ScenarioType, PsoDataType.String, 36, 7, 0),
new PsoStructureEntryInfo((MetaName)407126079, PsoDataType.Bool, 40, 0, 0), new PsoStructureEntryInfo(MetaName.HasIncomingEdges, PsoDataType.Bool, 40, 0, 0),
new PsoStructureEntryInfo((MetaName)1308720135, PsoDataType.Bool, 41, 0, 0) new PsoStructureEntryInfo(MetaName.HasOutgoingEdges, PsoDataType.Bool, 41, 0, 0)
); );
case MetaName.CScenarioChainingEdge: case MetaName.CScenarioChainingEdge:
return new PsoStructureInfo(MetaName.CScenarioChainingEdge, 0, 0, 16, return new PsoStructureInfo(MetaName.CScenarioChainingEdge, 0, 0, 16,

View File

@ -458,8 +458,8 @@ namespace CodeWalker.World
if ((vid1 >= r.Paths.Nodes.Length) || (vid2 >= r.Paths.Nodes.Length)) continue; if ((vid1 >= r.Paths.Nodes.Length) || (vid2 >= r.Paths.Nodes.Length)) continue;
var v1 = r.Paths.Nodes[vid1]; var v1 = r.Paths.Nodes[vid1];
var v2 = r.Paths.Nodes[vid2]; var v2 = r.Paths.Nodes[vid2];
byte cr1 = (v1.NotFirst) ? (byte)255 : (byte)0; byte cr1 = (v1.HasIncomingEdges) ? (byte)255 : (byte)0;
byte cr2 = (v2.NotFirst) ? (byte)255 : (byte)0; byte cr2 = (v2.HasIncomingEdges) ? (byte)255 : (byte)0;
byte cg = 0;// (chain._Data.Unk_1156691834 > 1) ? (byte)255 : (byte)0; byte cg = 0;// (chain._Data.Unk_1156691834 > 1) ? (byte)255 : (byte)0;
//cg = ((v1.Unk1 != 0) || (v2.Unk1 != 0)) ? (byte)255 : (byte)0; //cg = ((v1.Unk1 != 0) || (v2.Unk1 != 0)) ? (byte)255 : (byte)0;
//cg = (edge.Action == CScenarioChainingEdge__eAction.Unk_7865678) ? (byte)255 : (byte)0; //cg = (edge.Action == CScenarioChainingEdge__eAction.Unk_7865678) ? (byte)255 : (byte)0;
@ -469,8 +469,8 @@ namespace CodeWalker.World
byte cb2 = (byte)(255 - cr2); byte cb2 = (byte)(255 - cr2);
pv1.Position = v1.Position; pv1.Position = v1.Position;
pv2.Position = v2.Position; pv2.Position = v2.Position;
pv1.Colour = (uint)new Color(cr1, cg, cb1, (byte)255).ToRgba();// (v1._Data.Unk_407126079 == 1) ? cred : cblu; pv1.Colour = (uint)new Color(cr1, cg, cb1, (byte)255).ToRgba();// (v1._Data.HasIncomingEdges == 1) ? cred : cblu;
pv2.Colour = (uint)new Color(cr2, cg, cb2, (byte)255).ToRgba();// (v2._Data.Unk_407126079 == 1) ? cred : cblu; pv2.Colour = (uint)new Color(cr2, cg, cb2, (byte)255).ToRgba();// (v2._Data.HasIncomingEdges == 1) ? cred : cblu;
pathverts.Add(pv1); pathverts.Add(pv1);
pathverts.Add(pv2); pathverts.Add(pv2);
} }
@ -794,8 +794,8 @@ namespace CodeWalker.World
Region.Paths.AddEdge(newEdge); Region.Paths.AddEdge(newEdge);
//chain start/end have these flags set... make sure they are updated! //chain start/end have these flags set... make sure they are updated!
copy.ChainingNode.NotLast = true; copy.ChainingNode.HasOutgoingEdges = true;
n.ChainingNode.NotLast = false; n.ChainingNode.HasOutgoingEdges = false;
if (copy.Region == Region) //only add the new edge if we're in the same region... if (copy.Region == Region) //only add the new edge if we're in the same region...
{ {

View File

@ -158,11 +158,11 @@
this.ScenarioChainNodeTypeComboBox = new System.Windows.Forms.ComboBox(); this.ScenarioChainNodeTypeComboBox = new System.Windows.Forms.ComboBox();
this.ScenarioChainNodeIndexTextBox = new System.Windows.Forms.TextBox(); this.ScenarioChainNodeIndexTextBox = new System.Windows.Forms.TextBox();
this.label115 = new System.Windows.Forms.Label(); this.label115 = new System.Windows.Forms.Label();
this.ScenarioChainNodeLastCheckBox = new System.Windows.Forms.CheckBox(); this.ScenarioChainNodeHasOutgoingCheckBox = new System.Windows.Forms.CheckBox();
this.ScenarioChainNodeFirstCheckBox = new System.Windows.Forms.CheckBox(); this.ScenarioChainNodeHasIncomingCheckBox = new System.Windows.Forms.CheckBox();
this.label123 = new System.Windows.Forms.Label(); this.label123 = new System.Windows.Forms.Label();
this.ScenarioChainNodeUnk1HashLabel = new System.Windows.Forms.Label(); this.ScenarioChainNodePropHashLabel = new System.Windows.Forms.Label();
this.ScenarioChainNodeUnk1TextBox = new System.Windows.Forms.TextBox(); this.ScenarioChainNodePropTextBox = new System.Windows.Forms.TextBox();
this.label119 = new System.Windows.Forms.Label(); this.label119 = new System.Windows.Forms.Label();
this.ScenarioChainNodeGoToButton = new System.Windows.Forms.Button(); this.ScenarioChainNodeGoToButton = new System.Windows.Forms.Button();
this.ScenarioChainNodePositionTextBox = new System.Windows.Forms.TextBox(); this.ScenarioChainNodePositionTextBox = new System.Windows.Forms.TextBox();
@ -1760,11 +1760,11 @@
this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodeTypeComboBox); this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodeTypeComboBox);
this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodeIndexTextBox); this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodeIndexTextBox);
this.ScenarioChainNodePanel.Controls.Add(this.label115); this.ScenarioChainNodePanel.Controls.Add(this.label115);
this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodeLastCheckBox); this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodeHasOutgoingCheckBox);
this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodeFirstCheckBox); this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodeHasIncomingCheckBox);
this.ScenarioChainNodePanel.Controls.Add(this.label123); this.ScenarioChainNodePanel.Controls.Add(this.label123);
this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodeUnk1HashLabel); this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodePropHashLabel);
this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodeUnk1TextBox); this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodePropTextBox);
this.ScenarioChainNodePanel.Controls.Add(this.label119); this.ScenarioChainNodePanel.Controls.Add(this.label119);
this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodeGoToButton); this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodeGoToButton);
this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodePositionTextBox); this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodePositionTextBox);
@ -1806,27 +1806,27 @@
this.label115.TabIndex = 16; this.label115.TabIndex = 16;
this.label115.Text = "Index:"; this.label115.Text = "Index:";
// //
// ScenarioChainNodeLastCheckBox // ScenarioChainNodeHasOutgoingCheckBox
// //
this.ScenarioChainNodeLastCheckBox.AutoSize = true; this.ScenarioChainNodeHasOutgoingCheckBox.AutoSize = true;
this.ScenarioChainNodeLastCheckBox.Location = new System.Drawing.Point(73, 105); this.ScenarioChainNodeHasOutgoingCheckBox.Location = new System.Drawing.Point(73, 105);
this.ScenarioChainNodeLastCheckBox.Name = "ScenarioChainNodeLastCheckBox"; this.ScenarioChainNodeHasOutgoingCheckBox.Name = "ScenarioChainNodeHasOutgoingCheckBox";
this.ScenarioChainNodeLastCheckBox.Size = new System.Drawing.Size(86, 17); this.ScenarioChainNodeHasOutgoingCheckBox.Size = new System.Drawing.Size(124, 17);
this.ScenarioChainNodeLastCheckBox.TabIndex = 15; this.ScenarioChainNodeHasOutgoingCheckBox.TabIndex = 15;
this.ScenarioChainNodeLastCheckBox.Text = "Last in chain"; this.ScenarioChainNodeHasOutgoingCheckBox.Text = "Has Outgoing Edges";
this.ScenarioChainNodeLastCheckBox.UseVisualStyleBackColor = true; this.ScenarioChainNodeHasOutgoingCheckBox.UseVisualStyleBackColor = true;
this.ScenarioChainNodeLastCheckBox.CheckedChanged += new System.EventHandler(this.ScenarioChainNodeLastCheckBox_CheckedChanged); this.ScenarioChainNodeHasOutgoingCheckBox.CheckedChanged += new System.EventHandler(this.ScenarioChainNodeHasOutgoingCheckBox_CheckedChanged);
// //
// ScenarioChainNodeFirstCheckBox // ScenarioChainNodeHasIncomingCheckBox
// //
this.ScenarioChainNodeFirstCheckBox.AutoSize = true; this.ScenarioChainNodeHasIncomingCheckBox.AutoSize = true;
this.ScenarioChainNodeFirstCheckBox.Location = new System.Drawing.Point(73, 82); this.ScenarioChainNodeHasIncomingCheckBox.Location = new System.Drawing.Point(73, 82);
this.ScenarioChainNodeFirstCheckBox.Name = "ScenarioChainNodeFirstCheckBox"; this.ScenarioChainNodeHasIncomingCheckBox.Name = "ScenarioChainNodeHasIncomingCheckBox";
this.ScenarioChainNodeFirstCheckBox.Size = new System.Drawing.Size(85, 17); this.ScenarioChainNodeHasIncomingCheckBox.Size = new System.Drawing.Size(124, 17);
this.ScenarioChainNodeFirstCheckBox.TabIndex = 14; this.ScenarioChainNodeHasIncomingCheckBox.TabIndex = 14;
this.ScenarioChainNodeFirstCheckBox.Text = "First in chain"; this.ScenarioChainNodeHasIncomingCheckBox.Text = "Has Incoming Edges";
this.ScenarioChainNodeFirstCheckBox.UseVisualStyleBackColor = true; this.ScenarioChainNodeHasIncomingCheckBox.UseVisualStyleBackColor = true;
this.ScenarioChainNodeFirstCheckBox.CheckedChanged += new System.EventHandler(this.ScenarioChainNodeFirstCheckBox_CheckedChanged); this.ScenarioChainNodeHasIncomingCheckBox.CheckedChanged += new System.EventHandler(this.ScenarioChainNodeHasIncomingCheckBox_CheckedChanged);
// //
// label123 // label123
// //
@ -1837,34 +1837,34 @@
this.label123.TabIndex = 11; this.label123.TabIndex = 11;
this.label123.Text = "Type:"; this.label123.Text = "Type:";
// //
// ScenarioChainNodeUnk1HashLabel // ScenarioChainNodePropHashLabel
// //
this.ScenarioChainNodeUnk1HashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.ScenarioChainNodePropHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.ScenarioChainNodeUnk1HashLabel.AutoSize = true; this.ScenarioChainNodePropHashLabel.AutoSize = true;
this.ScenarioChainNodeUnk1HashLabel.Location = new System.Drawing.Point(382, 32); this.ScenarioChainNodePropHashLabel.Location = new System.Drawing.Point(382, 32);
this.ScenarioChainNodeUnk1HashLabel.Name = "ScenarioChainNodeUnk1HashLabel"; this.ScenarioChainNodePropHashLabel.Name = "ScenarioChainNodePropHashLabel";
this.ScenarioChainNodeUnk1HashLabel.Size = new System.Drawing.Size(44, 13); this.ScenarioChainNodePropHashLabel.Size = new System.Drawing.Size(44, 13);
this.ScenarioChainNodeUnk1HashLabel.TabIndex = 10; this.ScenarioChainNodePropHashLabel.TabIndex = 10;
this.ScenarioChainNodeUnk1HashLabel.Text = "Hash: 0"; this.ScenarioChainNodePropHashLabel.Text = "Hash: 0";
// //
// ScenarioChainNodeUnk1TextBox // ScenarioChainNodePropTextBox
// //
this.ScenarioChainNodeUnk1TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.ScenarioChainNodePropTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.ScenarioChainNodeUnk1TextBox.Location = new System.Drawing.Point(73, 29); this.ScenarioChainNodePropTextBox.Location = new System.Drawing.Point(73, 29);
this.ScenarioChainNodeUnk1TextBox.Name = "ScenarioChainNodeUnk1TextBox"; this.ScenarioChainNodePropTextBox.Name = "ScenarioChainNodePropTextBox";
this.ScenarioChainNodeUnk1TextBox.Size = new System.Drawing.Size(303, 20); this.ScenarioChainNodePropTextBox.Size = new System.Drawing.Size(303, 20);
this.ScenarioChainNodeUnk1TextBox.TabIndex = 9; this.ScenarioChainNodePropTextBox.TabIndex = 9;
this.ScenarioChainNodeUnk1TextBox.TextChanged += new System.EventHandler(this.ScenarioChainNodeUnk1TextBox_TextChanged); this.ScenarioChainNodePropTextBox.TextChanged += new System.EventHandler(this.ScenarioChainNodePropTextBox_TextChanged);
// //
// label119 // label119
// //
this.label119.AutoSize = true; this.label119.AutoSize = true;
this.label119.Location = new System.Drawing.Point(28, 32); this.label119.Location = new System.Drawing.Point(35, 32);
this.label119.Name = "label119"; this.label119.Name = "label119";
this.label119.Size = new System.Drawing.Size(39, 13); this.label119.Size = new System.Drawing.Size(32, 13);
this.label119.TabIndex = 8; this.label119.TabIndex = 8;
this.label119.Text = "Unk 1:"; this.label119.Text = "Prop:";
// //
// ScenarioChainNodeGoToButton // ScenarioChainNodeGoToButton
// //
@ -2746,11 +2746,11 @@
private System.Windows.Forms.ComboBox ScenarioChainNodeTypeComboBox; private System.Windows.Forms.ComboBox ScenarioChainNodeTypeComboBox;
private System.Windows.Forms.TextBox ScenarioChainNodeIndexTextBox; private System.Windows.Forms.TextBox ScenarioChainNodeIndexTextBox;
private System.Windows.Forms.Label label115; private System.Windows.Forms.Label label115;
private System.Windows.Forms.CheckBox ScenarioChainNodeLastCheckBox; private System.Windows.Forms.CheckBox ScenarioChainNodeHasOutgoingCheckBox;
private System.Windows.Forms.CheckBox ScenarioChainNodeFirstCheckBox; private System.Windows.Forms.CheckBox ScenarioChainNodeHasIncomingCheckBox;
private System.Windows.Forms.Label label123; private System.Windows.Forms.Label label123;
private System.Windows.Forms.Label ScenarioChainNodeUnk1HashLabel; private System.Windows.Forms.Label ScenarioChainNodePropHashLabel;
private System.Windows.Forms.TextBox ScenarioChainNodeUnk1TextBox; private System.Windows.Forms.TextBox ScenarioChainNodePropTextBox;
private System.Windows.Forms.Label label119; private System.Windows.Forms.Label label119;
private System.Windows.Forms.Button ScenarioChainNodeGoToButton; private System.Windows.Forms.Button ScenarioChainNodeGoToButton;
private System.Windows.Forms.TextBox ScenarioChainNodePositionTextBox; private System.Windows.Forms.TextBox ScenarioChainNodePositionTextBox;

View File

@ -469,11 +469,11 @@ namespace CodeWalker.Project.Panels
ScenarioChainNodeAddToProjectButton.Enabled = false; ScenarioChainNodeAddToProjectButton.Enabled = false;
ScenarioChainNodeDeleteButton.Enabled = false; ScenarioChainNodeDeleteButton.Enabled = false;
ScenarioChainNodePositionTextBox.Text = ""; ScenarioChainNodePositionTextBox.Text = "";
ScenarioChainNodeUnk1TextBox.Text = ""; ScenarioChainNodePropTextBox.Text = "";
ScenarioChainNodeUnk1HashLabel.Text = "Hash: 0"; ScenarioChainNodePropHashLabel.Text = "Hash: 0";
ScenarioChainNodeTypeComboBox.SelectedItem = null; ScenarioChainNodeTypeComboBox.SelectedItem = null;
ScenarioChainNodeFirstCheckBox.Checked = false; ScenarioChainNodeHasIncomingCheckBox.Checked = false;
ScenarioChainNodeLastCheckBox.Checked = false; ScenarioChainNodeHasOutgoingCheckBox.Checked = false;
ScenarioChainNodeIndexTextBox.Text = ""; ScenarioChainNodeIndexTextBox.Text = "";
} }
else else
@ -483,11 +483,11 @@ namespace CodeWalker.Project.Panels
ScenarioChainNodeDeleteButton.Enabled = ProjectForm.ScenarioExistsInProject(CurrentScenario); ScenarioChainNodeDeleteButton.Enabled = ProjectForm.ScenarioExistsInProject(CurrentScenario);
ScenarioChainNodeAddToProjectButton.Enabled = !ScenarioChainNodeDeleteButton.Enabled; ScenarioChainNodeAddToProjectButton.Enabled = !ScenarioChainNodeDeleteButton.Enabled;
ScenarioChainNodePositionTextBox.Text = FloatUtil.GetVector3String(n.Position); ScenarioChainNodePositionTextBox.Text = FloatUtil.GetVector3String(n.Position);
ScenarioChainNodeUnk1TextBox.Text = n.Unk1.ToString(); ScenarioChainNodePropTextBox.Text = n.PropHash.ToString();
ScenarioChainNodeUnk1HashLabel.Text = "Hash: " + n.Unk1.Hash.ToString(); ScenarioChainNodePropHashLabel.Text = "Hash: " + n.PropHash.Hash.ToString();
ScenarioChainNodeTypeComboBox.SelectedItem = ((object)n.Type) ?? ""; ScenarioChainNodeTypeComboBox.SelectedItem = ((object)n.Type) ?? "";
ScenarioChainNodeFirstCheckBox.Checked = !n.NotFirst; ScenarioChainNodeHasIncomingCheckBox.Checked = n.HasIncomingEdges;
ScenarioChainNodeLastCheckBox.Checked = !n.NotLast; ScenarioChainNodeHasOutgoingCheckBox.Checked = n.HasOutgoingEdges;
ScenarioChainNodeIndexTextBox.Text = n.NodeIndex.ToString(); ScenarioChainNodeIndexTextBox.Text = n.NodeIndex.ToString();
} }
} }
@ -1683,24 +1683,24 @@ namespace CodeWalker.Project.Panels
} }
} }
private void ScenarioChainNodeUnk1TextBox_TextChanged(object sender, EventArgs e) private void ScenarioChainNodePropTextBox_TextChanged(object sender, EventArgs e)
{ {
if (populatingui) return; if (populatingui) return;
if (CurrentScenarioNode == null) return; if (CurrentScenarioNode == null) return;
if (CurrentScenarioNode.ChainingNode == null) return; if (CurrentScenarioNode.ChainingNode == null) return;
uint hash = 0; uint hash = 0;
string name = ScenarioChainNodeUnk1TextBox.Text; string name = ScenarioChainNodePropTextBox.Text;
if (!uint.TryParse(name, out hash))//don't re-hash hashes if (!uint.TryParse(name, out hash))//don't re-hash hashes
{ {
hash = JenkHash.GenHash(name); hash = JenkHash.GenHash(name);
JenkIndex.Ensure(name); JenkIndex.Ensure(name);
} }
ScenarioChainNodeUnk1HashLabel.Text = "Hash: " + hash.ToString(); ScenarioChainNodePropHashLabel.Text = "Hash: " + hash.ToString();
lock (ProjectForm.ProjectSyncRoot) lock (ProjectForm.ProjectSyncRoot)
{ {
if (CurrentScenarioNode.ChainingNode.Unk1 != hash) if (CurrentScenarioNode.ChainingNode.PropHash != hash)
{ {
CurrentScenarioNode.ChainingNode.Unk1 = hash; CurrentScenarioNode.ChainingNode.PropHash = hash;
ProjectForm.SetScenarioHasChanged(true); ProjectForm.SetScenarioHasChanged(true);
} }
} }
@ -1724,18 +1724,18 @@ namespace CodeWalker.Project.Panels
ProjectForm.ProjectExplorer?.UpdateScenarioNodeTreeNode(CurrentScenarioNode); ProjectForm.ProjectExplorer?.UpdateScenarioNodeTreeNode(CurrentScenarioNode);
} }
private void ScenarioChainNodeFirstCheckBox_CheckedChanged(object sender, EventArgs e) private void ScenarioChainNodeHasIncomingCheckBox_CheckedChanged(object sender, EventArgs e)
{ {
if (populatingui) return; if (populatingui) return;
if (CurrentScenarioNode == null) return; if (CurrentScenarioNode == null) return;
if (CurrentScenarioNode.ChainingNode == null) return; if (CurrentScenarioNode.ChainingNode == null) return;
bool v = !ScenarioChainNodeFirstCheckBox.Checked; bool v = ScenarioChainNodeHasIncomingCheckBox.Checked;
bool change = false; bool change = false;
lock (ProjectForm.ProjectSyncRoot) lock (ProjectForm.ProjectSyncRoot)
{ {
if (CurrentScenarioNode.ChainingNode.NotFirst != v) if (CurrentScenarioNode.ChainingNode.HasIncomingEdges != v)
{ {
CurrentScenarioNode.ChainingNode.NotFirst = v; CurrentScenarioNode.ChainingNode.HasIncomingEdges = v;
ProjectForm.SetScenarioHasChanged(true); ProjectForm.SetScenarioHasChanged(true);
change = true; change = true;
} }
@ -1749,18 +1749,18 @@ namespace CodeWalker.Project.Panels
} }
} }
private void ScenarioChainNodeLastCheckBox_CheckedChanged(object sender, EventArgs e) private void ScenarioChainNodeHasOutgoingCheckBox_CheckedChanged(object sender, EventArgs e)
{ {
if (populatingui) return; if (populatingui) return;
if (CurrentScenarioNode == null) return; if (CurrentScenarioNode == null) return;
if (CurrentScenarioNode.ChainingNode == null) return; if (CurrentScenarioNode.ChainingNode == null) return;
bool v = !ScenarioChainNodeLastCheckBox.Checked; bool v = ScenarioChainNodeHasOutgoingCheckBox.Checked;
bool change = false; bool change = false;
lock (ProjectForm.ProjectSyncRoot) lock (ProjectForm.ProjectSyncRoot)
{ {
if (CurrentScenarioNode.ChainingNode.NotLast != v) if (CurrentScenarioNode.ChainingNode.HasOutgoingEdges != v)
{ {
CurrentScenarioNode.ChainingNode.NotLast = v; CurrentScenarioNode.ChainingNode.HasOutgoingEdges = v;
ProjectForm.SetScenarioHasChanged(true); ProjectForm.SetScenarioHasChanged(true);
change = true; change = true;
} }

View File

@ -5563,8 +5563,8 @@ namespace CodeWalker.Project
n2.ChainingNode.CopyFrom(copyn); n2.ChainingNode.CopyFrom(copyn);
} }
n1.ChainingNode.NotLast = true; n1.ChainingNode.HasOutgoingEdges = true;
n2.ChainingNode.NotFirst = true; n2.ChainingNode.HasIncomingEdges = true;
n1.ChainingNode.ScenarioNode = n1; n1.ChainingNode.ScenarioNode = n1;
n2.ChainingNode.ScenarioNode = n2; n2.ChainingNode.ScenarioNode = n2;
@ -6167,8 +6167,8 @@ namespace CodeWalker.Project
thisnode.ChainingNode.Chain = chain; thisnode.ChainingNode.Chain = chain;
thisnode.ChainingNode.Type = stype; thisnode.ChainingNode.Type = stype;
thisnode.ChainingNode.TypeHash = stype.NameHash; thisnode.ChainingNode.TypeHash = stype.NameHash;
thisnode.ChainingNode.NotLast = (i < (lines.Length - 1)); thisnode.ChainingNode.HasOutgoingEdges = (i < (lines.Length - 1));
thisnode.ChainingNode.NotFirst = (lastnode != null); thisnode.ChainingNode.HasIncomingEdges = (lastnode != null);
thisnode.SetPosition(pos); thisnode.SetPosition(pos);
thisnode.Orientation = thisnode.MyPoint.Orientation; thisnode.Orientation = thisnode.MyPoint.Orientation;