Misc fixes
This commit is contained in:
parent
6b32d0f0c4
commit
c82c89dfec
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
@file:Suppress("unused")
|
||||||
|
|
||||||
package ru.dbotthepony.kbox2d.dynamics
|
package ru.dbotthepony.kbox2d.dynamics
|
||||||
|
|
||||||
import ru.dbotthepony.kbox2d.api.*
|
import ru.dbotthepony.kbox2d.api.*
|
||||||
@ -273,7 +276,7 @@ class B2Body(def: BodyDef, world: B2World) {
|
|||||||
val broadPhase = world.contactManager.broadPhase
|
val broadPhase = world.contactManager.broadPhase
|
||||||
|
|
||||||
for (fixture in fixtureIterator) {
|
for (fixture in fixtureIterator) {
|
||||||
(fixture as B2Fixture).createProxies(broadPhase, transform)
|
fixture.createProxies(broadPhase, transform)
|
||||||
}
|
}
|
||||||
|
|
||||||
world.notifyNewContacts()
|
world.notifyNewContacts()
|
||||||
@ -284,7 +287,7 @@ class B2Body(def: BodyDef, world: B2World) {
|
|||||||
val broadPhase = world.contactManager.broadPhase
|
val broadPhase = world.contactManager.broadPhase
|
||||||
|
|
||||||
for (fixture in fixtureIterator) {
|
for (fixture in fixtureIterator) {
|
||||||
(fixture as B2Fixture).destroyProxies(broadPhase)
|
fixture.destroyProxies(broadPhase)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destroy the attached contacts.
|
// Destroy the attached contacts.
|
||||||
@ -478,8 +481,6 @@ class B2Body(def: BodyDef, world: B2World) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fixture as B2Fixture
|
|
||||||
|
|
||||||
if (isEnabled) {
|
if (isEnabled) {
|
||||||
fixture.destroyProxies(world.contactManager.broadPhase)
|
fixture.destroyProxies(world.contactManager.broadPhase)
|
||||||
}
|
}
|
||||||
@ -868,11 +869,11 @@ class B2Body(def: BodyDef, world: B2World) {
|
|||||||
transform1.position = sweep.c0 - transform1.rotation.times(sweep.localCenter)
|
transform1.position = sweep.c0 - transform1.rotation.times(sweep.localCenter)
|
||||||
|
|
||||||
for (fixture in fixtureIterator) {
|
for (fixture in fixtureIterator) {
|
||||||
(fixture as B2Fixture).synchronize(broadPhase, transform1, transform)
|
fixture.synchronize(broadPhase, transform1, transform)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (fixture in fixtureIterator) {
|
for (fixture in fixtureIterator) {
|
||||||
(fixture as B2Fixture).synchronize(broadPhase, transform, transform)
|
fixture.synchronize(broadPhase, transform, transform)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -464,7 +464,7 @@ abstract class Chunk<WorldType : World<WorldType, This>, This : Chunk<WorldType,
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun randomLongFor(x: Int, y: Int): Long {
|
override fun randomLongFor(x: Int, y: Int): Long {
|
||||||
return super.randomLongFor(x, y) xor (world?.seed ?: 0L)
|
return super.randomLongFor(x, y) xor world.seed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -442,8 +442,6 @@ abstract class World<This : World<This, ChunkType>, ChunkType : Chunk<This, Chun
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
potentialAABB = worldaabb + deltaMovement
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user