1
0
forked from 0ad/0ad

Fix lithobolos size and projectile.

Fix projectiles launching from actors with no ammo prop.
Fix default camera location on maps with no civ centers.
Avoid units getting stuck on the edges of buildings.

This was SVN commit r7950.
This commit is contained in:
Ykkrosh 2010-08-14 22:11:32 +00:00
parent a326126d4c
commit 4e1b6d08f4
6 changed files with 24 additions and 3 deletions

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="rock">
<mesh>props/onager_projectile.dae</mesh>
<texture>gaia/stone_temperate_granite.dds</texture>
</variant>
</group>
</actor>

View File

@ -7,6 +7,9 @@
<variant> <variant>
<mesh>structural/hele_sr.pmd</mesh> <mesh>structural/hele_sr.pmd</mesh>
<texture>structural/hele_siege.dds</texture> <texture>structural/hele_siege.dds</texture>
<props>
<prop actor="props/units/weapons/rock.xml" attachpoint="projectile"/>
</props>
</variant> </variant>
</group> </group>

View File

@ -29,6 +29,6 @@
<Height>3.5</Height> <Height>3.5</Height>
</Footprint> </Footprint>
<Obstruction> <Obstruction>
<Unit radius="6.0"/> <Unit radius="3.5"/>
</Obstruction> </Obstruction>
</Entity> </Entity>

View File

@ -221,6 +221,8 @@ int CMapReader::ApplyData()
*pLightEnv = m_LightEnv; *pLightEnv = m_LightEnv;
} }
pGameView->ResetCameraTarget(pGameView->GetCamera()->GetFocus());
if (m_CameraStartupTarget != INVALID_ENTITY && pGameView) if (m_CameraStartupTarget != INVALID_ENTITY && pGameView)
{ {
CmpPtr<ICmpPosition> cmpPosition(*pSimulation2, m_CameraStartupTarget); CmpPtr<ICmpPosition> cmpPosition(*pSimulation2, m_CameraStartupTarget);

View File

@ -471,7 +471,10 @@ bool CCmpObstructionManager::Rasterise(Grid<u8>& grid)
// we maybe want to expand the square a bit so we're less likely to think there's // we maybe want to expand the square a bit so we're less likely to think there's
// free space between buildings when there isn't. But this is just a random guess // free space between buildings when there isn't. But this is just a random guess
// and needs to be tweaked until everything works nicely. // and needs to be tweaked until everything works nicely.
entity_pos_t expand = entity_pos_t::FromInt(CELL_SIZE / 2); //entity_pos_t expand = entity_pos_t::FromInt(CELL_SIZE / 2);
// Actually that's bad because units get stuck when the A* pathfinder thinks they're
// blocked on all sides, so it's better to underestimate
entity_pos_t expand = entity_pos_t::FromInt(0);
CFixedVector2D halfSize(it->second.hw + expand, it->second.hh + expand); CFixedVector2D halfSize(it->second.hw + expand, it->second.hh + expand);
CFixedVector2D halfBound = Geometry::GetHalfBoundingBox(it->second.u, it->second.v, halfSize); CFixedVector2D halfBound = Geometry::GetHalfBoundingBox(it->second.u, it->second.v, halfSize);

View File

@ -162,7 +162,7 @@ void CCmpProjectileManager::LaunchProjectile(entity_id_t source, CFixedVector3D
if (sourcePos.null()) if (sourcePos.null())
return; return;
CVector3D sourceVec(sourcePos->GetPosition()); sourceVec = sourcePos->GetPosition();
sourceVec.Y += 3.f; sourceVec.Y += 3.f;
} }