Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Core/Dehacked/DehackedApplier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,11 @@ private EntityDefinition GetNewActorDefinition(int index, EntityDefinitionCompos
// This wasn't an option in the original game, needs to be applied to all potential projectile spawns.
definition.Flags.SetRandomizeProjectile();
definition.Properties.Height = 0;
definition.Properties.Radius = 0;
definition.Properties.Health = 0;
definition.Properties.Mass = 0;
definition.Properties.MonsterMovementSpeed = 0;
definition.Properties.MissileMovementSpeed = 0;
composer.Add(definition);
m_dehacked.DefinitionLookup[index] = definition;
return definition;
Expand Down
1 change: 1 addition & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
- Fix status bar uses ammo condition.
- Fix BufferSubData call that could write out of bounds on GPU resulting in corrupted/missing walls.
- Fix rendering issue with lines when changing transfer heights views.
- Fix width, speed, and mass properties to default to zero for dehacked instead of using default decorate values.

## Misc:
- Use DrawArraysInstanced instead of geometry shader for sprite rendering (allows for MacOS support).
Expand Down
18 changes: 17 additions & 1 deletion Tests/Unit/GameAction/Dehacked/DefaultFlags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ public void NewDehackedThingDefaultRandomize()
newDef2.Flags.RandomizeProjectile().Should().BeTrue();
}

[Fact(DisplayName = "New Dehacked thing has default properties")]
public void NewDehackedThingDefaultProperties()
{
var newDef = World.EntityManager.DefinitionComposer.GetByName("*deh/entity192");
newDef.Should().NotBeNull();
newDef.Properties.Height.Should().Be(0);
newDef.Properties.Radius.Should().Be(0);
newDef.Properties.Health.Should().Be(0);
newDef.Properties.Mass.Should().Be(0);
newDef.Properties.MissileMovementSpeed.Should().Be(0);
newDef.Properties.MonsterMovementSpeed.Should().Be(0);
}

private static readonly string Dehacked =
@"
Thing 191 (NewThing)
Expand All @@ -38,5 +51,8 @@ Thing 191 (NewThing)
Thing 192 (NewThing with height)
ID # = 192
Height = 4521984
Initial frame = 42069"";";
Initial frame = 42069"";

Thing 193 (DefaultThing)
ID # = 193";
}
Loading