I am pretty sure this is all in the LUA if I had time to extract it and learn lua… but I am guessing from the various bugs that I have seen that the scheduling model for the game is incorrect, or the model is correct but the locking mechanism is poorly implemented.
For example, when an agent goes to sit, it should be presented with a list of chairs that are EMPTY. When an agent sits in a chair it should lock the chair blocking other agents from sitting in that chair/seeing that chair on the empty chair list, obviously this lock is not in place. This lock used to be in place, but it’s not now. I am guessing this is because all the various agent locks are in various parts of the code… this is also why agents now all go for the same object. It might be even worse, maybe there were no locks, and pathfinding was used as an implicit lock and now that cached/shared pathfinding has been implemented, all the implicit locking breaks. This sort of problem can easily happen when people over optimize or optimize early.
I actually think you guys are at least decent devs and know all this already, so I am not sure who I am writing to, please don’t be offended
Actually, I wrote all this because I would love to talk though these design issues, but I can’t really commit to coding them up. maybe someone in the modding community would be interested in submitting the patches…