mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-22 23:12:59 +08:00
ytyp/ymap/scenario/mlo flags update
This commit is contained in:
parent
fc0d84d9dd
commit
8a9f58fa49
@ -2284,33 +2284,33 @@
|
|||||||
"1 - IgnoreMaxInRange",
|
"1 - IgnoreMaxInRange",
|
||||||
"2 - NoSpawn",
|
"2 - NoSpawn",
|
||||||
"4 - StationaryReactions",
|
"4 - StationaryReactions",
|
||||||
"8 - Unk",
|
"8 - OnlySpawnInSameInterior",
|
||||||
"16 - Unk",
|
"16 - SpawnedPedIsArrestable",
|
||||||
"32 - ActivateVehicleSiren",
|
"32 - ActivateVehicleSiren",
|
||||||
"64 - AggressiveVehicleDriving",
|
"64 - AggressiveVehicleDriving",
|
||||||
"128 - Unk",
|
"128 - LandVehicleOnArrival",
|
||||||
"256 - Unk",
|
"256 - IgnoreThreatsIfLosNotClear",
|
||||||
"512 - Unk",
|
"512 - EventsInRadiusTriggerDisputes",
|
||||||
"1024 - AerialVehiclePoint",
|
"1024 - AerialVehiclePoint",
|
||||||
"2048 - TerritorialScenario",
|
"2048 - TerritorialScenario",
|
||||||
"4096 - Unk",
|
"4096 - EndScenarioIfPlayerWithinRadius",
|
||||||
"8192 - Unk",
|
"8192 - EventsInRadiusTriggerThreatResponse",
|
||||||
"16384 - Unk",
|
"16384 - TaxiPlaneOnGround",
|
||||||
"32768 - Unk",
|
"32768 - FlyOffToOblivion",
|
||||||
"65536 - InWater",
|
"65536 - InWater",
|
||||||
"131072 - Unk",
|
"131072 - AllowInvestigation",
|
||||||
"262144 - OpenDoor",
|
"262144 - OpenDoor",
|
||||||
"524288 - PreciseUseTime",
|
"524288 - PreciseUseTime",
|
||||||
"1048576 - Unk",
|
"1048576 - NoRespawnUntilStreamedOut",
|
||||||
"2097152 - Unk",
|
"2097152 - NoVehicleSpawnMaxDistance",
|
||||||
"4194304 - ExtendedRange",
|
"4194304 - ExtendedRange",
|
||||||
"8388608 - ShortRange",
|
"8388608 - ShortRange",
|
||||||
"16777216 - HighPriority",
|
"16777216 - HighPriority",
|
||||||
"33554432 - IgnoreLoitering",
|
"33554432 - IgnoreLoitering",
|
||||||
"67108864 - UseSearchlight",
|
"67108864 - UseSearchlight",
|
||||||
"134217728 - ResetNoCollisionOnCleanUp",
|
"134217728 - ResetNoCollisionOnCleanUp",
|
||||||
"268435456 - Unk",
|
"268435456 - CheckCrossedArrivalPlane",
|
||||||
"536870912 - Unk",
|
"536870912 - UseVehicleFrontForArrival",
|
||||||
"1073741824 - IgnoreWeatherRestrictions"});
|
"1073741824 - IgnoreWeatherRestrictions"});
|
||||||
this.ScenarioClusterPointFlagsCheckedListBox.Location = new System.Drawing.Point(195, 167);
|
this.ScenarioClusterPointFlagsCheckedListBox.Location = new System.Drawing.Point(195, 167);
|
||||||
this.ScenarioClusterPointFlagsCheckedListBox.Name = "ScenarioClusterPointFlagsCheckedListBox";
|
this.ScenarioClusterPointFlagsCheckedListBox.Name = "ScenarioClusterPointFlagsCheckedListBox";
|
||||||
|
@ -68,11 +68,11 @@
|
|||||||
this.CarFlagsCheckedListBox.CheckOnClick = true;
|
this.CarFlagsCheckedListBox.CheckOnClick = true;
|
||||||
this.CarFlagsCheckedListBox.FormattingEnabled = true;
|
this.CarFlagsCheckedListBox.FormattingEnabled = true;
|
||||||
this.CarFlagsCheckedListBox.Items.AddRange(new object[] {
|
this.CarFlagsCheckedListBox.Items.AddRange(new object[] {
|
||||||
"1 - Unk01",
|
"1 - High priority",
|
||||||
"2 - Unk02",
|
"2 - Unk02",
|
||||||
"4 - Unk03",
|
"4 - Police",
|
||||||
"8 - Unk04",
|
"8 - Firetruck",
|
||||||
"16 - Unk05",
|
"16 - Ambulance",
|
||||||
"32 - Unk06",
|
"32 - Unk06",
|
||||||
"64 - Unk07",
|
"64 - Unk07",
|
||||||
"128 - Unk08",
|
"128 - Unk08",
|
||||||
|
@ -185,10 +185,10 @@
|
|||||||
"8 - Unk04",
|
"8 - Unk04",
|
||||||
"16 - Unk05",
|
"16 - Unk05",
|
||||||
"32 - Static entity",
|
"32 - Static entity",
|
||||||
"64 - Unk07",
|
"64 - Object isn't dark at night",
|
||||||
"128 - Unk08",
|
"128 - Unk08",
|
||||||
"256 - Unk09",
|
"256 - Unk09",
|
||||||
"512 - Unk10",
|
"512 - Disable embedded light source",
|
||||||
"1024 - Unk11",
|
"1024 - Unk11",
|
||||||
"2048 - Unk12",
|
"2048 - Unk12",
|
||||||
"4096 - Unk13",
|
"4096 - Unk13",
|
||||||
@ -197,13 +197,13 @@
|
|||||||
"32768 - Unk16",
|
"32768 - Unk16",
|
||||||
"65536 - Unk17",
|
"65536 - Unk17",
|
||||||
"131072 - Unk18",
|
"131072 - Unk18",
|
||||||
"262144 - Unk19",
|
"262144 - Disable archetype extensions",
|
||||||
"524288 - Unk20",
|
"524288 - Unk20",
|
||||||
"1048576 - Unk21",
|
"1048576 - Unk21",
|
||||||
"2097152 - Unk22",
|
"2097152 - Unk22",
|
||||||
"4194304 - Unk23",
|
"4194304 - Disable shadow for entity",
|
||||||
"8388608 - Unk24",
|
"8388608 - Disable entity, shadow casted",
|
||||||
"16777216 - Unk25",
|
"16777216 - Object will not cast reflections",
|
||||||
"33554432 - Interior proxy",
|
"33554432 - Interior proxy",
|
||||||
"67108864 - Unk27",
|
"67108864 - Unk27",
|
||||||
"134217728 - Reflection proxy",
|
"134217728 - Reflection proxy",
|
||||||
|
@ -814,5 +814,10 @@ namespace CodeWalker.Project.Panels
|
|||||||
ProjectForm.ShowEditArchetypePanel(true);
|
ProjectForm.ShowEditArchetypePanel(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void EntityFlagsCheckedListBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -302,17 +302,17 @@
|
|||||||
"16 - Unk05",
|
"16 - Unk05",
|
||||||
"32 - Static",
|
"32 - Static",
|
||||||
"64 - Unk07",
|
"64 - Unk07",
|
||||||
"128 - Unk08",
|
"128 - Instance",
|
||||||
"256 - Unk09",
|
"256 - Unk09",
|
||||||
"512 - Unk10",
|
"512 - Bone anims (YCD)",
|
||||||
"1024 - Unk11",
|
"1024 - UV anims (YCD)",
|
||||||
"2048 - Unk12",
|
"2048 - Unk12",
|
||||||
"4096 - Unk13",
|
"4096 - Unk13",
|
||||||
"8192 - Unk14",
|
"8192 - Object won't cast shadow",
|
||||||
"16384 - Unk15",
|
"16384 - Unk15",
|
||||||
"32768 - Unk16",
|
"32768 - Unk16",
|
||||||
"65536 - Unk17",
|
"65536 - Double-sided rendering",
|
||||||
"131072 - Unk18",
|
"131072 - Dynamic",
|
||||||
"262144 - Unk19",
|
"262144 - Unk19",
|
||||||
"524288 - Unk20",
|
"524288 - Unk20",
|
||||||
"1048576 - Unk21",
|
"1048576 - Unk21",
|
||||||
@ -321,12 +321,12 @@
|
|||||||
"8388608 - Unk24",
|
"8388608 - Unk24",
|
||||||
"16777216 - Unk25",
|
"16777216 - Unk25",
|
||||||
"33554432 - Unk26",
|
"33554432 - Unk26",
|
||||||
"67108864 - Unk27",
|
"67108864 - Enables special atribute for door archetypes",
|
||||||
"134217728 - Unk28",
|
"134217728 - Unk28",
|
||||||
"268435456 - Unk29",
|
"268435456 - Disable red vertex channel",
|
||||||
"536870912 - Unk30",
|
"536870912 - Disable green vertex channel",
|
||||||
"1073741824 - Unk31",
|
"1073741824 - Disable blue vertex channel",
|
||||||
"2147483648 - Unk32"});
|
"2147483648 - Disable alpha vertex channel"});
|
||||||
this.EntityFlagsCheckedListBox.Location = new System.Drawing.Point(441, 38);
|
this.EntityFlagsCheckedListBox.Location = new System.Drawing.Point(441, 38);
|
||||||
this.EntityFlagsCheckedListBox.Name = "EntityFlagsCheckedListBox";
|
this.EntityFlagsCheckedListBox.Name = "EntityFlagsCheckedListBox";
|
||||||
this.EntityFlagsCheckedListBox.Size = new System.Drawing.Size(182, 274);
|
this.EntityFlagsCheckedListBox.Size = new System.Drawing.Size(182, 274);
|
||||||
|
@ -177,8 +177,8 @@
|
|||||||
this.FlagsCheckedListBox.CheckOnClick = true;
|
this.FlagsCheckedListBox.CheckOnClick = true;
|
||||||
this.FlagsCheckedListBox.FormattingEnabled = true;
|
this.FlagsCheckedListBox.FormattingEnabled = true;
|
||||||
this.FlagsCheckedListBox.Items.AddRange(new object[] {
|
this.FlagsCheckedListBox.Items.AddRange(new object[] {
|
||||||
"1 - Hide inside from outside",
|
"1 - Disables exterior rendering",
|
||||||
"2 - Hide outside from inside",
|
"2 - Disables interior rendering",
|
||||||
"4 - Mirror",
|
"4 - Mirror",
|
||||||
"8 - Extra bloom",
|
"8 - Extra bloom",
|
||||||
"16 - Unk05",
|
"16 - Unk05",
|
||||||
@ -190,7 +190,7 @@
|
|||||||
"1024 - Mirror limbo entities",
|
"1024 - Mirror limbo entities",
|
||||||
"2048 - Unk12",
|
"2048 - Unk12",
|
||||||
"4096 - Unk13",
|
"4096 - Unk13",
|
||||||
"8192 - Unk14"});
|
"8192 - Disable farclipping"});
|
||||||
this.FlagsCheckedListBox.Location = new System.Drawing.Point(318, 15);
|
this.FlagsCheckedListBox.Location = new System.Drawing.Point(318, 15);
|
||||||
this.FlagsCheckedListBox.Name = "FlagsCheckedListBox";
|
this.FlagsCheckedListBox.Name = "FlagsCheckedListBox";
|
||||||
this.FlagsCheckedListBox.Size = new System.Drawing.Size(184, 214);
|
this.FlagsCheckedListBox.Size = new System.Drawing.Size(184, 214);
|
||||||
|
@ -118,12 +118,12 @@
|
|||||||
this.FlagsCheckedListBox.FormattingEnabled = true;
|
this.FlagsCheckedListBox.FormattingEnabled = true;
|
||||||
this.FlagsCheckedListBox.Items.AddRange(new object[] {
|
this.FlagsCheckedListBox.Items.AddRange(new object[] {
|
||||||
"1 - Unk01",
|
"1 - Unk01",
|
||||||
"2 - Unk02",
|
"2 - Disables wanted level",
|
||||||
"4 - Disable exterior shadows",
|
"4 - Disable exterior shadows",
|
||||||
"8 - Unk04",
|
"8 - Unk04",
|
||||||
"16 - Unk05",
|
"16 - Unk05",
|
||||||
"32 - Unk06",
|
"32 - Reduces vehicle population",
|
||||||
"64 - Unk07",
|
"64 - Reduces ped population",
|
||||||
"128 - Unk08",
|
"128 - Unk08",
|
||||||
"256 - Disable limbo portals",
|
"256 - Disable limbo portals",
|
||||||
"512 - Unk10"});
|
"512 - Unk10"});
|
||||||
|
@ -374,69 +374,83 @@ namespace CodeWalker.Project.Panels
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static uint ComputeHash(IReadOnlyList<uint> ints, uint seed = 0)
|
||||||
|
{
|
||||||
|
var a2 = ints.Count;
|
||||||
|
var v3 = a2;
|
||||||
|
var v5 = (uint)(seed + 0xDEADBEEF + 4 * ints.Count);
|
||||||
|
var v6 = v5;
|
||||||
|
var v7 = v5;
|
||||||
|
|
||||||
|
var c = 0;
|
||||||
|
for (var i = 0; i < (ints.Count - 4) / 3 + 1; i++, v3 -= 3, c += 3)
|
||||||
|
{
|
||||||
|
var v9 = ints[c + 2] + v5;
|
||||||
|
var v10 = ints[c + 1] + v6;
|
||||||
|
var v11 = ints[c] - v9;
|
||||||
|
var v13 = v10 + v9;
|
||||||
|
var v14 = (v7 + v11) ^ RotateLeft(v9, 4);
|
||||||
|
var v15 = v10 - v14;
|
||||||
|
var v17 = v13 + v14;
|
||||||
|
var v18 = v15 ^ RotateLeft(v14, 6);
|
||||||
|
var v19 = v13 - v18;
|
||||||
|
var v21 = v17 + v18;
|
||||||
|
var v22 = v19 ^ RotateLeft(v18, 8);
|
||||||
|
var v23 = v17 - v22;
|
||||||
|
var v25 = v21 + v22;
|
||||||
|
var v26 = v23 ^ RotateLeft(v22, 16);
|
||||||
|
var v27 = v21 - v26;
|
||||||
|
var v29 = v27 ^ RotateRight(v26, 13);
|
||||||
|
var v30 = v25 - v29;
|
||||||
|
v7 = v25 + v26;
|
||||||
|
v6 = v7 + v29;
|
||||||
|
v5 = v30 ^ RotateLeft(v29, 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (v3 == 3)
|
||||||
|
{
|
||||||
|
v5 += ints[c + 2];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (v3 >= 2)
|
||||||
|
{
|
||||||
|
v6 += ints[c + 1];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (v3 >= 1)
|
||||||
|
{
|
||||||
|
var v34 = (v6 ^ v5) - RotateLeft(v6, 14);
|
||||||
|
var v35 = (v34 ^ (v7 + ints[c])) - RotateLeft(v34, 11);
|
||||||
|
var v36 = (v35 ^ v6) - RotateRight(v35, 7);
|
||||||
|
var v37 = (v36 ^ v34) - RotateLeft(v36, 16);
|
||||||
|
var v38 = RotateLeft(v37, 4);
|
||||||
|
var v39 = (((v35 ^ v37) - v38) ^ v36) - RotateLeft((v35 ^ v37) - v38, 14);
|
||||||
|
return (v39 ^ v37) - RotateRight(v39, 8);
|
||||||
|
}
|
||||||
|
|
||||||
|
return v5;
|
||||||
|
}
|
||||||
|
|
||||||
private uint GetLightHash(YmapEntityDef ent, int lightIndex)
|
private uint GetLightHash(YmapEntityDef ent, int lightIndex)
|
||||||
{
|
{
|
||||||
unchecked
|
unchecked
|
||||||
{
|
{
|
||||||
|
var len = 7;
|
||||||
|
|
||||||
//var aabb1 = GetAABB(ent);
|
var center = ent.Position + ent.Archetype.BSCenter;
|
||||||
var aabb = GetAABB2(ent);
|
var aa = center + ent.Archetype.BBMin;
|
||||||
|
var bb = center + ent.Archetype.BBMax;
|
||||||
|
|
||||||
var hashData = new int[7];
|
var ints = new uint[len];
|
||||||
hashData[0] = (int)(aabb.Min.X * 10.0f);
|
ints[0] = (uint)(aa.X * 10.0f);
|
||||||
hashData[1] = (int)(aabb.Min.Y * 10.0f);
|
ints[1] = (uint)(aa.Y * 10.0f);
|
||||||
hashData[2] = (int)(aabb.Min.Z * 10.0f);
|
ints[2] = (uint)(aa.Z * 10.0f);
|
||||||
hashData[3] = (int)(aabb.Max.X * 10.0f);
|
ints[3] = (uint)(bb.X * 10.0f);
|
||||||
hashData[4] = (int)(aabb.Max.Y * 10.0f);
|
ints[4] = (uint)(bb.Y * 10.0f);
|
||||||
hashData[5] = (int)(aabb.Max.Z * 10.0f);
|
ints[5] = (uint)(bb.Z * 10.0f);
|
||||||
hashData[6] = lightIndex;
|
ints[6] = (uint)lightIndex;
|
||||||
|
|
||||||
|
|
||||||
int v3 = 7;
|
|
||||||
int v4 = 0;//=hashData index
|
|
||||||
int v5 = (int)0xDEADBEEF + 28;// -559038709;
|
|
||||||
int v6 = (int)0xDEADBEEF + 28;
|
|
||||||
int v7 = (int)0xDEADBEEF + 28;
|
|
||||||
|
|
||||||
uint v8 = 2;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
int v9 = hashData[v4 + 2] + v5;
|
|
||||||
int v10 = hashData[v4 + 1] + v6;
|
|
||||||
int v11 = hashData[v4 + 0] - v9;
|
|
||||||
int v13 = v10 + v9;
|
|
||||||
int v14 = (v7 + v11) ^ RotateLeft(v9, 4);
|
|
||||||
int v17 = v13 + v14;
|
|
||||||
int v18 = (v10 - v14) ^ RotateLeft(v14, 6);
|
|
||||||
int v21 = v17 + v18;
|
|
||||||
int v22 = (v13 - v18) ^ RotateLeft(v18, 8);
|
|
||||||
int v25 = v21 + v22;
|
|
||||||
int v26 = (v17 - v22) ^ RotateLeft(v22, 16);
|
|
||||||
int v29 = (v21 - v26) ^ RotateRight(v26, 13);
|
|
||||||
int v30 = v25 - v29;
|
|
||||||
v7 = v25 + v26;
|
|
||||||
v6 = v7 + v29;
|
|
||||||
v5 = v30 ^ RotateLeft(v29, 4);
|
|
||||||
v4 += 3;
|
|
||||||
v3 -= 3;
|
|
||||||
--v8;
|
|
||||||
}
|
|
||||||
while (v8 > 0);
|
|
||||||
|
|
||||||
int v32 = v3 - 1; //should always be 0
|
|
||||||
if (v32 != 0)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
int v50 = v7 + hashData[v4];
|
|
||||||
int v34 = (v6 ^ v5) - RotateLeft(v6, 14);
|
|
||||||
int v35 = (v34 ^ v50) - RotateLeft(v34, 11);
|
|
||||||
int v36 = (v35 ^ v6) - RotateRight(v35, 7);
|
|
||||||
int v37 = (v36 ^ v34) - RotateLeft(v36, 16);
|
|
||||||
int v51 = (v35 ^ v37) - RotateLeft(v37, 4);
|
|
||||||
int v38 = (v51 ^ v36) - RotateLeft(v51, 14);
|
|
||||||
int v53 = (v38 ^ v37) - RotateRight(v38, 8);
|
|
||||||
return (uint)v53;
|
|
||||||
|
|
||||||
|
return ComputeHash(ints);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user