mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-23 19:35:10 -06:00
Allow poofClear to cope with regions not being loaded, preventing the anim from being queued until somebody enters the region
This commit is contained in:
parent
868845eaa9
commit
f76ac0efcf
2 changed files with 7 additions and 2 deletions
|
|
@ -372,7 +372,9 @@ class RevenantController : TickListener, Commands {
|
|||
if (routeIdx == -1) {
|
||||
GameWorld.Pulser.submit(object : Pulse() {
|
||||
override fun pulse(): Boolean {
|
||||
Graphics.send(Graphics(86), revenantNPC.location)
|
||||
if (revenantNPC.location.region.isActive) {
|
||||
Graphics.send(Graphics(86), revenantNPC.location)
|
||||
}
|
||||
return true
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -541,7 +541,10 @@ fun poofClear(npc: NPC) {
|
|||
override fun pulse(): Boolean {
|
||||
when (counter++) {
|
||||
2 -> {
|
||||
npc.isInvisible = true; Graphics.send(Graphics(86), npc.location)
|
||||
npc.isInvisible = true;
|
||||
if (npc.location.region.isActive) {
|
||||
Graphics.send(Graphics(86), npc.location)
|
||||
}
|
||||
}
|
||||
3 -> npc.clear().also { return true }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue