mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-17 00:56:07 +09:00
how do atomicsomething work
This commit is contained in:
@@ -59,12 +59,13 @@ open class FixtureItemBase(originalID: ItemID, val fixtureClassName: String) : G
|
|||||||
|
|
||||||
override fun effectWhileEquipped(actor: ActorWithBody, delta: Float) {
|
override fun effectWhileEquipped(actor: ActorWithBody, delta: Float) {
|
||||||
// println("ghost: ${ghostItem}; ghostInit = $ghostInit; instance: $hash")
|
// println("ghost: ${ghostItem}; ghostInit = $ghostInit; instance: $hash")
|
||||||
if (!ghostInit.get()) {
|
if (!ghostInit.compareAndExchangeAcquire(false, true)) {
|
||||||
ghostItem.getAndSet(makeFixture())
|
ghostItem.set(makeFixture())
|
||||||
ghostInit.getAndSet(true)
|
|
||||||
// printdbg(this, "ghost item initialised: $ghostItem")
|
// printdbg(this, "ghost item initialised: $ghostItem")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
(INGAME as TerrarumIngame).blockMarkingActor.let {
|
(INGAME as TerrarumIngame).blockMarkingActor.let {
|
||||||
it.setGhost(ghostItem.get())
|
it.setGhost(ghostItem.get())
|
||||||
it.isVisible = true
|
it.isVisible = true
|
||||||
|
|||||||
Reference in New Issue
Block a user