-
Notifications
You must be signed in to change notification settings - Fork 549
Pathing NPCs can (fairly consistently) crash server #6250
Comments
That and pathing NPC (patrol) after reaching last co-ordinator stop moving. |
It is all npc’s I remember demo changing some scripts to avoid it but it was never proper fixed. They need to “pause” when an event is triggered and then resume their event is done (messageSpecial should be able to just go without stopping them I think.. but I think neither of these behaviors happens now) As for paths stopping - there is supposed to be a script command to check for end of path and another to restart it. This implies their full set of coordinates already takes them back to where they started or else they teleport. I don’t know of one or both of these are broken or just missing. |
Judging by the call stack, I think this case might just be NPCs that call I can harass Jorin all I want without him throwing the server in the garbage bin...! edit: Unless you meant it is all pathing npcs. In which case, nevermind me...! |
yes, I did mean that. All npc's that get interrupted when pathing. (which we used |
I brought this up a very long time ago. The solution I was given was "Don't click on the NPC that many times so fast" I fixed this by removing all "wait" commands from NPC scripting. Pathfind is borked and needs reworked. |
Could we potentially use |
If it even worked it’d be a non optimal pita - you’d need to store the original speed and set it back after. Might not even really work though. I wonder if it just set move speed and the pathing engine would keep moving the object to the next pos anyway while they appeared to just slide instead of walk. |
/************************************************************************
* Function: wait()
* Purpose : Makes a non-PC inactive for a set amount of time
* Example : npc:wait(10000) -- wait 10 seconds
* Notes : Default is 4 seconds unless specified in ms
************************************************************************/
inline int32 CLuaBaseEntity::wait(lua_State* L)
{
DSP_DEBUG_BREAK_IF(m_PBaseEntity->objtype == TYPE_PC);
CBattleEntity* PBattle = (CBattleEntity*)m_PBaseEntity;
int32 waitTime = 4000;
if (lua_isnumber(L, 1))
{
waitTime = (int32)lua_tonumber(L, 1);
}
PBattle->PAI->Inactive(std::chrono::milliseconds(waitTime), true);
return 0;
} This is the version of wait NPC's use. The mob AI controller has a diff version that involves the server tick. I do not think we should be expecting this to work with I think we need to do something different at the core to genuinely do "wait till my event ends". |
I have:
Client Version (type
/ver
in game) : 301907xx_xSource Branch (master/stable) : master
Additional Information (Steps to reproduce/Expected behavior) :
Was working on some addons, and figured I would use Red Ghost in Port Jeuno to test. Problem is he somewhat consistently crashes the server if he's spoken to a couple times after the first (after which his pathing breaks and he stops walking).
I suspect all NPCs set to path could cause this same crashing behavior.
I do use Enternity, so that may (or may not) be involved.
Debugger Output:
DEBUG_BREAK_IF thrown in CAIContainer, Line 160
Call Stack:
Autos:
The text was updated successfully, but these errors were encountered: