Cut 13d Pass 2 fixes: block small arms, canon xforms, charred cull, LOD1 shadows & pitch guard
This commit is contained in:
parent
5e7bff860b
commit
d423420803
4 changed files with 94 additions and 35 deletions
|
|
@ -339,6 +339,45 @@ namespace RustToDust.Tests
|
|||
Assert.Equal(SionTreeState.Charred, trees.GetState(med.TreeId));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SionTreeDestruction_SmallArmsCannotFellOrCharMediumOakOrMonumentalSequoia()
|
||||
{
|
||||
var sion = SionMapLoader.Load();
|
||||
var trees = new SionTreeDestructionState(sion.Trees);
|
||||
|
||||
SionTreePlacement oak = default;
|
||||
SionTreePlacement sequoia = default;
|
||||
bool foundOak = false, foundSequoia = false;
|
||||
foreach (var t in sion.Trees.Trees)
|
||||
{
|
||||
if (!foundOak && t.Species == SionTreeSpecies.QuercusPubescens && t.TrunkRadiusM >= 0.32f)
|
||||
{
|
||||
oak = t;
|
||||
foundOak = true;
|
||||
}
|
||||
if (!foundSequoia && t.Species == SionTreeSpecies.Sequoiadendron)
|
||||
{
|
||||
sequoia = t;
|
||||
foundSequoia = true;
|
||||
}
|
||||
if (foundOak && foundSequoia) break;
|
||||
}
|
||||
Assert.True(foundOak && foundSequoia);
|
||||
|
||||
float mgDmg = Catalog.Mg762.WeaponDamage; // 12f (< 25f)
|
||||
var oakHit = new Vector3(oak.X + oak.TrunkRadiusM, oak.Y + 1.0f, oak.Z);
|
||||
var seqHit = new Vector3(sequoia.X + sequoia.TrunkRadiusM, sequoia.Y + 1.0f, sequoia.Z);
|
||||
|
||||
for (int i = 0; i < 30; i++)
|
||||
{
|
||||
trees.ApplyBlast(oakHit, splashRadius: 2.5f, blastDamage: mgDmg);
|
||||
trees.ApplyBlast(seqHit, splashRadius: 2.5f, blastDamage: mgDmg);
|
||||
}
|
||||
|
||||
Assert.Equal(SionTreeState.Intact, trees.GetState(oak.TreeId));
|
||||
Assert.Equal(SionTreeState.Intact, trees.GetState(sequoia.TreeId));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CultNet_RemoteClientSyncsTreeScarsInPersistentSnapshotBubbleAndRepair()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue