summaryrefslogtreecommitdiff
path: root/src/game-server/npc.h
AgeCommit message (Collapse)AuthorFilesLines
2012-03-11Removed the create_npc wrapper and the last two NPC callbacksThorbjørn Lindeijer1-11/+20
When creating an NPC, you now provide its optional talk and update functions directly rather than them being stored in a table on the Lua side and then called in response to a global callback. Also fixed an issue with a missing gender parameter to the delayed NPC creation callback used by NPCs defined on the map (found by Erik while reviewing this patch). Reviewed-by: Erik Schilling
2012-03-10Moved the managing of NPC script coroutines into C++Thorbjørn Lindeijer1-22/+5
Rather than wrapping NPC functions up in coroutines in the Lua side, they are now managed on the C++ side as "script threads", which are essentially the same thing. The main purpose is that the server can now know whether any of these long running script interactions are still active, which will probably be useful when adding the ability to reload scripts. Reviewed-by: Erik Schilling
2012-03-03Added further missing callbacksErik Schilling1-0/+25
Reviewed-by: bjorn.
2011-03-11Split path finding out of the Map classThorbjørn Lindeijer1-3/+2
Extracted the path finding algorithm out of the Map class and introduced a new class called PathInfo that has the path finding information that used to be part of MetaTile. This allows a single vector of path information to be shared between all maps running on the server, significantly reducing the memory overhead per map (for 200x200 maps, the memory reduction is about 1 MB per map). Part of this change is some cleanup, like moving the 'occupation' counts into MetaTile, inlining some methods for performance reasons, and using STL to simplify memory management. Mantis-issue: 106 Reviewed-by: Bertram
2010-11-14Renamed .hpp files into .h for consistency.Yohann Ferreira1-0/+90
Also added an header to the autoattack.{h,cpp} files. Big but trivial fix.