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
2 changes: 1 addition & 1 deletion src/Box2D.NET.Samples/Samples/Bodies/Weeble.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public override void UpdateGui()
def.radius = m_explosionRadius;
def.falloff = 0.1f;
def.impulsePerLength = m_explosionMagnitude;
b2World_Explode(m_worldId, ref def);
b2World_Explode(m_worldId, def);
}

ImGui.PushItemWidth(100.0f);
Expand Down
2 changes: 1 addition & 1 deletion src/Box2D.NET.Samples/Samples/Events/BodyMove.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public override void UpdateGui()
def.radius = m_explosionRadius;
def.falloff = 0.1f;
def.impulsePerLength = m_explosionMagnitude;
b2World_Explode(m_worldId, ref def);
b2World_Explode(m_worldId, def);
}

ImGui.SliderFloat("Magnitude", ref m_explosionMagnitude, -20.0f, 20.0f, "%.1f");
Expand Down
2 changes: 1 addition & 1 deletion src/Box2D.NET.Samples/Samples/Events/ProjectileEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public override void Step()
explosionDef.position = data.manifold.points[0].point;
explosionDef.radius = 1.0f;
explosionDef.impulsePerLength = 20.0f;
b2World_Explode(m_worldId, ref explosionDef);
b2World_Explode(m_worldId, explosionDef);

b2DestroyBody(m_projectileId);
m_projectileId = b2_nullBodyId;
Expand Down
2 changes: 1 addition & 1 deletion src/Box2D.NET.Samples/Samples/Joints/TopDownFriction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public override void UpdateGui()
def.radius = 10.0f;
def.falloff = 5.0f;
def.impulsePerLength = 10.0f;
b2World_Explode(m_worldId, ref def);
b2World_Explode(m_worldId, def);

DrawCircle(m_draw, def.position, 10.0f, B2HexColor.b2_colorWhite);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Box2D.NET.Samples/Samples/Shapes/Explosion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public override void UpdateGui()
def.radius = m_radius;
def.falloff = m_falloff;
def.impulsePerLength = m_impulse;
b2World_Explode(m_worldId, ref def);
b2World_Explode(m_worldId, def);
}

ImGui.SliderFloat("radius", ref m_radius, 0.0f, 20.0f, "%.1f");
Expand Down
2 changes: 1 addition & 1 deletion src/Box2D.NET.Samples/Samples/Worlds/LargeWorld.cs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public override void Step()
def.radius = radius;
def.falloff = 0.1f;
def.impulsePerLength = 1.0f;
b2World_Explode(m_worldId, ref def);
b2World_Explode(m_worldId, def);

m_cycleIndex = (m_cycleIndex + 1) % m_cycleCount;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Box2D.NET/B2Worlds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2449,7 +2449,7 @@ internal static bool ExplosionCallback(int proxyId, ulong userData, ref B2Explos
return true;
}

public static void b2World_Explode(B2WorldId worldId, ref B2ExplosionDef explosionDef)
public static void b2World_Explode(B2WorldId worldId, in B2ExplosionDef explosionDef)
{
ulong maskBits = explosionDef.maskBits;
B2Vec2 position = explosionDef.position;
Expand Down
2 changes: 1 addition & 1 deletion test/Box2D.NET.Test/B2WorldTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public void TestWorldCoverage()
Assert.That(v.Y, Is.EqualTo(g.Y));

B2ExplosionDef explosionDef = b2DefaultExplosionDef();
b2World_Explode(worldId, ref explosionDef);
b2World_Explode(worldId, explosionDef);

b2World_SetContactTuning(worldId, 10.0f, 2.0f, 4.0f);

Expand Down
Loading