mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-09 16:45:44 -07:00
Limit max radius that return to spawn behavior applies to, only submit 1 return to spawn pulse at a time.
This commit is contained in:
parent
e9d56fa57f
commit
90e731f7a6
1 changed files with 4 additions and 0 deletions
|
|
@ -447,10 +447,14 @@ public class NPC extends Entity {
|
|||
if (
|
||||
!pathBoundMovement
|
||||
&& walkRadius > 0
|
||||
&& walkRadius <= 20
|
||||
&& !getLocation().withinDistance(getProperties().getSpawnLocation(), (int)(walkRadius * 1.5))
|
||||
&& !getAttribute("no-spawn-return", false)
|
||||
)
|
||||
{
|
||||
MovementPulse current = getAttribute("return-to-spawn-pulse");
|
||||
if (current != null && current.isRunning()) return;
|
||||
|
||||
if(!isNeverWalks()){
|
||||
if(walkRadius == 0)
|
||||
walkRadius = 3;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue