1
0
forked from mirrors/0ad

Introduce Boundary & Adjust Height Properly

Code is implemented relating to selecting the building starting from the surface and making Height functional.
Inbefore Height does not do anything and it is set by how tall the building is 3D wise.

Fixes: #8781
This commit is contained in:
Ximirun
2026-03-12 18:02:26 +08:00
committed by phosit
parent 67ee5aaeb5
commit 5104c81e9d
17 changed files with 84 additions and 8 deletions
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_civic_civil_centre"> <Entity parent="template_structure_civic_civil_centre">
<Footprint>
<Height>10.0</Height>
</Footprint>
<Identity> <Identity>
<Civ>skirm</Civ> <Civ>skirm</Civ>
</Identity> </Identity>
@@ -11,5 +14,8 @@
<Trainer disable=""/> <Trainer disable=""/>
<VisualActor> <VisualActor>
<Actor>structures/athenians/civil_centre.xml</Actor> <Actor>structures/athenians/civil_centre.xml</Actor>
<SelectionShape>
<Footprint/>
</SelectionShape>
</VisualActor> </VisualActor>
</Entity> </Entity>
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_civic_civil_centre"> <Entity parent="template_structure_civic_civil_centre">
<Footprint>
<Height>10.0</Height>
</Footprint>
<Health> <Health>
<SpawnEntityOnDeath>decay|rubble/rubble_hele_cc</SpawnEntityOnDeath> <SpawnEntityOnDeath>decay|rubble/rubble_hele_cc</SpawnEntityOnDeath>
</Health> </Health>
@@ -16,5 +19,8 @@
</Trainer> </Trainer>
<VisualActor> <VisualActor>
<Actor>structures/athenians/civil_centre.xml</Actor> <Actor>structures/athenians/civil_centre.xml</Actor>
<SelectionShape>
<Footprint/>
</SelectionShape>
</VisualActor> </VisualActor>
</Entity> </Entity>
@@ -2,7 +2,7 @@
<Entity parent="template_structure_civic_civil_centre"> <Entity parent="template_structure_civic_civil_centre">
<Footprint replace=""> <Footprint replace="">
<Circle radius="15.0"/> <Circle radius="15.0"/>
<Height>8.0</Height> <Height>5.0</Height>
</Footprint> </Footprint>
<Health> <Health>
<SpawnEntityOnDeath>decay|rubble/rubble_brit_cc</SpawnEntityOnDeath> <SpawnEntityOnDeath>decay|rubble/rubble_brit_cc</SpawnEntityOnDeath>
@@ -24,5 +24,8 @@
<VisualActor> <VisualActor>
<Actor>structures/britons/civic_centre.xml</Actor> <Actor>structures/britons/civic_centre.xml</Actor>
<FoundationActor>structures/fndn_7x8.xml</FoundationActor> <FoundationActor>structures/fndn_7x8.xml</FoundationActor>
<SelectionShape>
<Footprint/>
</SelectionShape>
</VisualActor> </VisualActor>
</Entity> </Entity>
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_civic_civil_centre"> <Entity parent="template_structure_civic_civil_centre">
<Footprint>
<Height>13.0</Height>
</Footprint>
<Health> <Health>
<SpawnEntityOnDeath>decay|rubble/rubble_kart_cc</SpawnEntityOnDeath> <SpawnEntityOnDeath>decay|rubble/rubble_kart_cc</SpawnEntityOnDeath>
</Health> </Health>
@@ -21,5 +24,8 @@
</Trainer> </Trainer>
<VisualActor> <VisualActor>
<Actor>structures/carthaginians/civil_centre.xml</Actor> <Actor>structures/carthaginians/civil_centre.xml</Actor>
<SelectionShape>
<Footprint/>
</SelectionShape>
</VisualActor> </VisualActor>
</Entity> </Entity>
@@ -2,7 +2,7 @@
<Entity parent="template_structure_civic_civil_centre"> <Entity parent="template_structure_civic_civil_centre">
<Footprint> <Footprint>
<Square width="28.0" depth="28.0"/> <Square width="28.0" depth="28.0"/>
<Height>8.0</Height> <Height>13.5</Height>
</Footprint> </Footprint>
<Health> <Health>
<SpawnEntityOnDeath>decay|rubble/rubble_gaul_cc</SpawnEntityOnDeath> <SpawnEntityOnDeath>decay|rubble/rubble_gaul_cc</SpawnEntityOnDeath>
@@ -23,5 +23,8 @@
</Trainer> </Trainer>
<VisualActor> <VisualActor>
<Actor>structures/gauls/civic_centre.xml</Actor> <Actor>structures/gauls/civic_centre.xml</Actor>
<SelectionShape>
<Footprint/>
</SelectionShape>
</VisualActor> </VisualActor>
</Entity> </Entity>
@@ -2,6 +2,7 @@
<Entity parent="template_structure_civic_civil_centre"> <Entity parent="template_structure_civic_civil_centre">
<Footprint> <Footprint>
<Square width="33.0" depth="29.0"/> <Square width="33.0" depth="29.0"/>
<Height>12.5</Height>
</Footprint> </Footprint>
<Health> <Health>
<SpawnEntityOnDeath>decay|rubble/rubble_brit_cc</SpawnEntityOnDeath> <SpawnEntityOnDeath>decay|rubble/rubble_brit_cc</SpawnEntityOnDeath>
@@ -29,5 +30,8 @@
<VisualActor> <VisualActor>
<Actor>structures/germans/civic_centre.xml</Actor> <Actor>structures/germans/civic_centre.xml</Actor>
<FoundationActor>structures/fndn_7x8.xml</FoundationActor> <FoundationActor>structures/fndn_7x8.xml</FoundationActor>
<SelectionShape>
<Footprint/>
</SelectionShape>
</VisualActor> </VisualActor>
</Entity> </Entity>
@@ -2,7 +2,7 @@
<Entity parent="template_structure_civic_civil_centre"> <Entity parent="template_structure_civic_civil_centre">
<Footprint> <Footprint>
<Square depth="35.0" width="43.0"/> <Square depth="35.0" width="43.0"/>
<Height>8.0</Height> <Height>18.0</Height>
</Footprint> </Footprint>
<GarrisonHolder> <GarrisonHolder>
<List datatype="tokens">Minister</List> <List datatype="tokens">Minister</List>
@@ -45,5 +45,8 @@
<VisualActor> <VisualActor>
<FoundationActor>structures/fndn_8x8.xml</FoundationActor> <FoundationActor>structures/fndn_8x8.xml</FoundationActor>
<Actor>structures/han/civil_centre.xml</Actor> <Actor>structures/han/civil_centre.xml</Actor>
<SelectionShape>
<Footprint/>
</SelectionShape>
</VisualActor> </VisualActor>
</Entity> </Entity>
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Entity parent="structures/han/civil_centre"> <Entity parent="structures/han/civil_centre">
<Footprint>
<Height>18.0</Height>
</Footprint>
<BuildRestrictions> <BuildRestrictions>
<Category>ImperialCourt</Category> <Category>ImperialCourt</Category>
</BuildRestrictions> </BuildRestrictions>
@@ -42,5 +45,8 @@
<Upgrade disable=""/> <Upgrade disable=""/>
<VisualActor> <VisualActor>
<Actor>structures/han/imperial_court.xml</Actor> <Actor>structures/han/imperial_court.xml</Actor>
<SelectionShape>
<Footprint/>
</SelectionShape>
</VisualActor> </VisualActor>
</Entity> </Entity>
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_civic_civil_centre"> <Entity parent="template_structure_civic_civil_centre">
<Footprint>
<Height>13.0</Height>
</Footprint>
<Health> <Health>
<SpawnEntityOnDeath>decay|rubble/rubble_iber_cc</SpawnEntityOnDeath> <SpawnEntityOnDeath>decay|rubble/rubble_iber_cc</SpawnEntityOnDeath>
</Health> </Health>
@@ -16,5 +19,8 @@
</Trainer> </Trainer>
<VisualActor> <VisualActor>
<Actor>structures/iberians/civic_center.xml</Actor> <Actor>structures/iberians/civic_center.xml</Actor>
<SelectionShape>
<Footprint/>
</SelectionShape>
</VisualActor> </VisualActor>
</Entity> </Entity>
@@ -2,7 +2,7 @@
<Entity parent="template_structure_civic_civil_centre"> <Entity parent="template_structure_civic_civil_centre">
<Footprint> <Footprint>
<Square width="32.0" depth="32"/> <Square width="32.0" depth="32"/>
<Height>10.0</Height> <Height>12.5</Height>
</Footprint> </Footprint>
<Identity> <Identity>
<Civ>kush</Civ> <Civ>kush</Civ>
@@ -25,5 +25,8 @@
</Trainer> </Trainer>
<VisualActor> <VisualActor>
<Actor>structures/kushites/civic_centre_kush.xml</Actor> <Actor>structures/kushites/civic_centre_kush.xml</Actor>
<SelectionShape>
<Footprint/>
</SelectionShape>
</VisualActor> </VisualActor>
</Entity> </Entity>
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_civic_civil_centre"> <Entity parent="template_structure_civic_civil_centre">
<Footprint>
<Height>9.5</Height>
</Footprint>
<Health> <Health>
<SpawnEntityOnDeath>decay|rubble/rubble_hele_cc</SpawnEntityOnDeath> <SpawnEntityOnDeath>decay|rubble/rubble_hele_cc</SpawnEntityOnDeath>
</Health> </Health>
@@ -16,5 +19,8 @@
</Trainer> </Trainer>
<VisualActor> <VisualActor>
<Actor>structures/macedonians/civic_centre.xml</Actor> <Actor>structures/macedonians/civic_centre.xml</Actor>
<SelectionShape>
<Footprint/>
</SelectionShape>
</VisualActor> </VisualActor>
</Entity> </Entity>
@@ -2,7 +2,7 @@
<Entity parent="template_structure_civic_civil_centre"> <Entity parent="template_structure_civic_civil_centre">
<Footprint> <Footprint>
<Square width="40.0" depth="34.0"/> <Square width="40.0" depth="34.0"/>
<Height>8.0</Height> <Height>16.5</Height>
</Footprint> </Footprint>
<Health> <Health>
<SpawnEntityOnDeath>decay|rubble/rubble_maur_cc</SpawnEntityOnDeath> <SpawnEntityOnDeath>decay|rubble/rubble_maur_cc</SpawnEntityOnDeath>
@@ -24,5 +24,8 @@
</Trainer> </Trainer>
<VisualActor> <VisualActor>
<Actor>structures/mauryas/civil_centre.xml</Actor> <Actor>structures/mauryas/civil_centre.xml</Actor>
<SelectionShape>
<Footprint/>
</SelectionShape>
</VisualActor> </VisualActor>
</Entity> </Entity>
@@ -2,7 +2,7 @@
<Entity parent="template_structure_civic_civil_centre"> <Entity parent="template_structure_civic_civil_centre">
<Footprint> <Footprint>
<Square width="40.0" depth="24.0"/> <Square width="40.0" depth="24.0"/>
<Height>18.0</Height> <Height>14.0</Height>
</Footprint> </Footprint>
<Health> <Health>
<SpawnEntityOnDeath>decay|rubble/rubble_stone_6x6</SpawnEntityOnDeath> <SpawnEntityOnDeath>decay|rubble/rubble_stone_6x6</SpawnEntityOnDeath>
@@ -35,5 +35,8 @@
<VisualActor> <VisualActor>
<Actor>structures/persians/civil_centre.xml</Actor> <Actor>structures/persians/civil_centre.xml</Actor>
<FoundationActor>structures/fndn_9x7.xml</FoundationActor> <FoundationActor>structures/fndn_9x7.xml</FoundationActor>
<SelectionShape>
<Footprint/>
</SelectionShape>
</VisualActor> </VisualActor>
</Entity> </Entity>
@@ -2,7 +2,7 @@
<Entity parent="template_structure_civic_civil_centre"> <Entity parent="template_structure_civic_civil_centre">
<Footprint> <Footprint>
<Square width="41" depth="33"/> <Square width="41" depth="33"/>
<Height>8.0</Height> <Height>18.0</Height>
</Footprint> </Footprint>
<Identity> <Identity>
<Civ>ptol</Civ> <Civ>ptol</Civ>
@@ -20,5 +20,8 @@
</Trainer> </Trainer>
<VisualActor> <VisualActor>
<Actor>structures/ptolemies/civic_centre.xml</Actor> <Actor>structures/ptolemies/civic_centre.xml</Actor>
<SelectionShape>
<Footprint/>
</SelectionShape>
</VisualActor> </VisualActor>
</Entity> </Entity>
@@ -2,7 +2,7 @@
<Entity parent="template_structure_civic_civil_centre"> <Entity parent="template_structure_civic_civil_centre">
<Footprint> <Footprint>
<Square width="40.0" depth="40.0"/> <Square width="40.0" depth="40.0"/>
<Height>8.0</Height> <Height>15.0</Height>
</Footprint> </Footprint>
<Health> <Health>
<SpawnEntityOnDeath>decay|rubble/rubble_rome_cc</SpawnEntityOnDeath> <SpawnEntityOnDeath>decay|rubble/rubble_rome_cc</SpawnEntityOnDeath>
@@ -25,5 +25,8 @@
<VisualActor> <VisualActor>
<Actor>structures/romans/civic_centre.xml</Actor> <Actor>structures/romans/civic_centre.xml</Actor>
<FoundationActor>structures/fndn_9x9.xml</FoundationActor> <FoundationActor>structures/fndn_9x9.xml</FoundationActor>
<SelectionShape>
<Footprint/>
</SelectionShape>
</VisualActor> </VisualActor>
</Entity> </Entity>
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_civic_civil_centre"> <Entity parent="template_structure_civic_civil_centre">
<Footprint>
<Height>12.0</Height>
</Footprint>
<Identity> <Identity>
<Civ>sele</Civ> <Civ>sele</Civ>
<SpecificName>Agora</SpecificName> <SpecificName>Agora</SpecificName>
@@ -16,5 +19,8 @@
</Trainer> </Trainer>
<VisualActor> <VisualActor>
<Actor>structures/seleucids/civic_center.xml</Actor> <Actor>structures/seleucids/civic_center.xml</Actor>
<SelectionShape>
<Footprint/>
</SelectionShape>
</VisualActor> </VisualActor>
</Entity> </Entity>
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_civic_civil_centre"> <Entity parent="template_structure_civic_civil_centre">
<Footprint>
<Height>12.5</Height>
</Footprint>
<Health> <Health>
<SpawnEntityOnDeath>decay|rubble/rubble_hele_cc</SpawnEntityOnDeath> <SpawnEntityOnDeath>decay|rubble/rubble_hele_cc</SpawnEntityOnDeath>
</Health> </Health>
@@ -21,5 +24,8 @@
</Trainer> </Trainer>
<VisualActor> <VisualActor>
<Actor>structures/spartans/civic_center.xml</Actor> <Actor>structures/spartans/civic_center.xml</Actor>
<SelectionShape>
<Footprint/>
</SelectionShape>
</VisualActor> </VisualActor>
</Entity> </Entity>