Skip to content

Commit

Permalink
Fixed BXT Time
Browse files Browse the repository at this point in the history
  • Loading branch information
Traderain committed Jun 8, 2017
1 parent f33ddd5 commit 08321ff
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 24 deletions.
Binary file modified .vs/VolvoWrench/v14/.suo
Binary file not shown.
2 changes: 1 addition & 1 deletion VolvoWrench/Demo stuff/GoldSource/BXT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class Time : BXTData

public override string ToString()
{
return hours + ":" + minutes + ":" + (seconds + remainder).ToString("F");
return hours + ":" + minutes + ":" + (seconds + remainder).ToString("F4");
}


Expand Down
55 changes: 32 additions & 23 deletions VolvoWrench/Demo stuff/GoldSource/Verification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public string ParseBxtData(KeyValuePair<string, CrossParseResult> info)
var demonode = new TreeNode(Path.GetFileName(info.Key)) { ForeColor = Color.White };
for (int i = 0; i < info.Value.GsDemoInfo.IncludedBXtData.Count; i++)
{
bool jp = false, jm = false, dp = false, dm = false;
int jp = 0, jm = 0, dp = 0, dm = 0;
var datanode = new TreeNode("\nBXT Data Frame [" + i + "]") { ForeColor = Color.White };
for (int index = 0; index < info.Value.GsDemoInfo.IncludedBXtData[i].Objects.Count; index++)
{
Expand Down Expand Up @@ -258,13 +258,13 @@ public string ParseBxtData(KeyValuePair<string, CrossParseResult> info)
case Bxt.RuntimeDataType.BOUND_COMMAND:
{
if (((Bxt.BoundCommand)t.Value).command.ToUpper().Contains("+JUMP"))
jp = true;
jp++;
if (((Bxt.BoundCommand)t.Value).command.ToUpper().Contains("-JUMP"))
jm = true;
jm++;
if (((Bxt.BoundCommand)t.Value).command.ToUpper().Contains("+DUCK"))
dp = true;
dp++;
if (((Bxt.BoundCommand)t.Value).command.ToUpper().Contains("-DUCK"))
dm = true;
dm++;
if (((Bxt.BoundCommand) t.Value).command.ToUpper().Contains(";"))
{
ret +=("\t" + "Possible script: " + ((Bxt.BoundCommand)t.Value).command + " Frame: " + i + "\n");
Expand Down Expand Up @@ -296,25 +296,33 @@ public string ParseBxtData(KeyValuePair<string, CrossParseResult> info)
case Bxt.RuntimeDataType.COMMAND_EXECUTION:
{
if (((Bxt.CommandExecution) t.Value).command.ToUpper().Contains("+JUMP"))
if (jp)
jp = false;
else
ret += ("\t" + "Possible autojump: " + ((Bxt.CommandExecution) t.Value).command + " Frame: " + i + "\n");
if (((Bxt.CommandExecution)t.Value).command.ToUpper().Contains("-JUMP"))
if (jm)
jm = false;
else
ret += ("\t" + "Possible autojump: " + ((Bxt.CommandExecution)t.Value).command + " Frame: " + i + "\n");
if (((Bxt.CommandExecution)t.Value).command.ToUpper().Contains("+DUCK"))
if (dp)
dp = false;
else
ret += ("\t" + "Possible ducktap: " + ((Bxt.CommandExecution)t.Value).command + " Frame: " + i + "\n");
{
if (jp == 0)
ret += ("\t" + "Possible autojump: " + ((Bxt.CommandExecution)t.Value).command + " Frame: " + i + "\n");
else
jp--;
}
if (((Bxt.CommandExecution) t.Value).command.ToUpper().Contains("-JUMP"))
{
if (jm == 0)
ret += ("\t" + "Possible autojump: " + ((Bxt.CommandExecution)t.Value).command + " Frame: " + i + "\n");
else
jm--;
}
if (((Bxt.CommandExecution) t.Value).command.ToUpper().Contains("+DUCK"))
{
if (dp == 0)
ret += ("\t" + "Possible ducktap: " + ((Bxt.CommandExecution)t.Value).command + " Frame: " + i + "\n");
else
dp--;
}
if (((Bxt.CommandExecution)t.Value).command.ToUpper().Contains("-DUCK"))
if (dm)
dm = false;
else
ret += ("\t" + "Possible ducktap: " + ((Bxt.CommandExecution)t.Value).command + " Frame: " + i + "\n");
{
if (dm == 0)
ret += ("\t" + "Possible ducktap: " + ((Bxt.CommandExecution)t.Value).command + " Frame: " + i + "\n");
else
dm--;
}
if (((Bxt.CommandExecution) t.Value).command.ToUpper().ToUpper().Contains("BXT"))
{
ret +=("\t" + "Disallowed bxt command: " + ((Bxt.CommandExecution)t.Value).command + " Frame: " + i + "\n");
Expand Down Expand Up @@ -358,6 +366,7 @@ public string ParseBxtData(KeyValuePair<string, CrossParseResult> info)
demonode.Nodes.Add(datanode);
}
BXTTreeView.Nodes.Add(demonode);
ret += "\n";
return ret;
}

Expand Down

0 comments on commit 08321ff

Please sign in to comment.