• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

TFS 1.X+ TFS 1.5 NEKIRO 8.60 Push Target player exhausted when attack

545658

Member
Joined
Nov 6, 2016
Messages
45
Reaction score
12
Hey, I need some help. I've been looking for a solution to this problem on forums, but I can't find it anywhere. The thing is, when Player 1 attacks Player 2—even when using just a weapon—there's a delay: sometimes you can push them, and sometimes you can't.

In the video below, I showed what I mean: when I don't attack him with a weapon, the push works perfectly the moment I select him—sometimes it pushes, sometimes it doesn't. I know I can enable it in the config by setting classicAttackSpeed = true, and then it works perfectly, but it causes massive CPU usage. With 200 people on the server, you can't even move anymore. Is there any way to fix this?

 
Hey, I need some help. I've been looking for a solution to this problem on forums, but I can't find it anywhere. The thing is, when Player 1 attacks Player 2—even when using just a weapon—there's a delay: sometimes you can push them, and sometimes you can't.

In the video below, I showed what I mean: when I don't attack him with a weapon, the push works perfectly the moment I select him—sometimes it pushes, sometimes it doesn't. I know I can enable it in the config by setting classicAttackSpeed = true, and then it works perfectly, but it causes massive CPU usage. With 200 people on the server, you can't even move anymore. Is there any way to fix this?

HTML:
https://github.com/otland/forgottenserver/pull/4677
 
There are 2 different delays here.

1.
classicAttackSpeed / attack-action coupling

In Nekiro 8.60, pushing goes through:
src/game.cpp -> Game::playerMoveCreature()

and that function starts with:

C++:
if (!player->canDoAction()) {
    uint32_t delay = player->getNextActionTime();
    ...
    return;
}

So yes, while attacking, push can get delayed because it shares nextAction.

That is why classicAttackSpeed = true changes the behavior.

But:

2.
there is also a built-in push delay even before that

Check:
src/game.h

Default values are:

C++:
static constexpr int32_t MOVE_CREATURE_INTERVAL = 1000;
static constexpr int32_t RANGE_MOVE_CREATURE_INTERVAL = 1500;

and they are used in:
src/game.cpp

C++:
if (Position::areInRange<1, 1, 0>(movingCreature->getPosition(), player->getPosition())) {
    SchedulerTask* task = createSchedulerTask(MOVE_CREATURE_INTERVAL, ...);
    player->setNextActionTask(task);
}

So if you only turned on classicAttackSpeed, you still kept the default push timing.

PR #4677 only fixes the classicAttackSpeed scheduler bug / event spam.
It does NOT mean classicAttackSpeed becomes free with 200 players.

If your goal is only smooth push while attacking, I would not enable classicAttackSpeed globally.
I would test this instead:

  • lower MOVE_CREATURE_INTERVAL
  • lower RANGE_MOVE_CREATURE_INTERVAL
  • if still needed, patch Game::playerMoveCreature() so pushing a player is not blocked by the same canDoAction() logic as attack/item actions

So:
pushCreatureDelay is not the real fix here
classicAttackSpeed is a workaround with higher cost
the real places to inspect are:
  • src/game.h
  • src/game.cpp
  • src/player.cpp
 
Back
Top