MH-FactoryUprising

Tutorials and discussions about Mapping - Introduce your own ones!
Buggie
Godlike
Posts: 1483
Joined: Sat Mar 21, 2020 5:32 am

MH-FactoryUprising

Post by Buggie » Mon Apr 04, 2022 2:38 am

Conversion for MonsterHunt this map:
https://unrealarchive.org/maps/unreal-t ... bec7d.html
Shot00000.jpg
Shot00001.jpg
Shot00002.jpg
Shot00003.jpg
Shot00004.jpg
Shot00005.jpg
Shot00006.jpg
Shot00007.jpg
MH-FactoryUprisingV0.7z
You do not have the required permissions to view the files attached to this post.

User avatar
Barbie
Godlike
Posts: 2393
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: MH-FactoryUprising

Post by Barbie » Tue Apr 19, 2022 9:49 pm

Found a hovering box (Brush521, see pic):
MH-FactoryUprisingV0-HoveringBox.jpg
My Mapchecker also found this:
Brush4 and Brush5 are congruent
Brush20 and Brush21 are congruent
Brush20 and Brush22 are congruent
Brush20 and Brush23 are congruent
Brush21 and Brush22 are congruent
Brush21 and Brush23 are congruent
Brush22 and Brush23 are congruent
Brush42 and Brush43 are congruent
Brush54 and Brush55 are congruent
Brush56 and Brush57 are congruent
Brush161 and Brush162 are congruent
Brush161 and Brush163 are congruent
Brush162 and Brush163 are congruent
Brush317 and Brush318 are congruent
Brush353 and Brush354 are congruent
Brush373 and Brush374 are congruent
Brush25 and Brush358 are congruent
Brush389 and Brush390 are congruent
Brush438 and Brush439 are congruent

Light20 is placed in the void
Light26 is placed in the void
Congruent brushes means that the share the same size. I've often see a additive and subtractive brush with the same size at the same location, here for example Brush4 and Brush5:
MH-FactoryUprisingV0-Brush4+5.jpg
You do not have the required permissions to view the files attached to this post.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

Buggie
Godlike
Posts: 1483
Joined: Sat Mar 21, 2020 5:32 am

Re: MH-FactoryUprising

Post by Buggie » Tue Apr 19, 2022 9:59 pm

How you check for "congruent"? AFAIK uscript no access to vertices for compare two brushes.

User avatar
Barbie
Godlike
Posts: 2393
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: MH-FactoryUprising

Post by Barbie » Tue Apr 19, 2022 10:44 pm

Buggie wrote:
Tue Apr 19, 2022 9:59 pm
How you check for "congruent"? AFAIK uscript no access to vertices for compare two brushes.
I analyse the T3D file.
Delphi code
Show

Code: Select all

function  TFormTests.RunTestIdenticalBrushes:integer;

  function HaveSameProperty(const T3DObj1, T3DObj2:TT3DObj; const PropertyName:string):boolean;
  var FoundIndex1, FoundIndex2: TListIndex;
  begin
    if T3DObj1.PropertyHave(PropertyName, @FoundIndex1) then
      if T3DObj2.PropertyHave(PropertyName, @FoundIndex2) then
        result:=T3DObj1.Properties[FoundIndex1].IsEqualTo(T3DObj2.Properties[FoundIndex2])
      else
        result:=false // T3DObj1 has property, T3DObj2 not
    else
      result:=NOT T3DObj2.PropertyHave(PropertyName, nil) // both do not have the given property=>default values=>equal
  end;

  function BrushesCongruent(Brush1,Brush2:TT3DBrush):boolean;
  var i:integer;
  begin
    result:=false;
    if Brush1.T3DPolyList.Count<>Brush2.T3DPolyList.Count then exit;
    for i:=0 to Brush1.T3DPolyList.Count-1 do
      begin
        if NOT Brush1.T3DPolyList[i].Vectors.IsEqualTo(Brush2.T3DPolyList[i].Vectors) then exit;
        if NOT HaveSameProperty(Brush1.T3DPolyList[i], Brush2.T3DPolyList[i], CPropertyIdents[CProp_Origin].PropertyName) then exit;
      end;
    result:=true;
  end;



var ActorList:TActorRefList;
    i,j:integer;
begin
  result:=0;
  ActorList:=T3DMap.BrushListCreate;
  try
    for i:=0 to ActorList.Count-2 do
      for j:=i+1 to ActorList.Count-1 do
        if HaveSameProperty(ActorList[i], ActorList[j], CPropertyIdents[CProp_Location].PropertyName) then
          if HaveSameProperty(ActorList[i], ActorList[j], CPropertyIdents[CProp_Rotation].PropertyName) then
            if BrushesCongruent(TT3DBrush(ActorList[i]), TT3DBrush(ActorList[j])) then
              begin
                LogList.AddByData(ActorList[i].DisplayName+' and '+ActorList[j].DisplayName+' are congruent', CLogWarning, ActorList[i]);
                inc(result)
              end;
  finally
    ActorList.free;
  end;
end;
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett