mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-08 12:51:51 +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) {
|
||||
// println("ghost: ${ghostItem}; ghostInit = $ghostInit; instance: $hash")
|
||||
if (!ghostInit.get()) {
|
||||
ghostItem.getAndSet(makeFixture())
|
||||
ghostInit.getAndSet(true)
|
||||
if (!ghostInit.compareAndExchangeAcquire(false, true)) {
|
||||
ghostItem.set(makeFixture())
|
||||
// printdbg(this, "ghost item initialised: $ghostItem")
|
||||
|
||||
}
|
||||
|
||||
|
||||
(INGAME as TerrarumIngame).blockMarkingActor.let {
|
||||
it.setGhost(ghostItem.get())
|
||||
it.isVisible = true
|
||||
|
||||
Reference in New Issue
Block a user