summaryrefslogtreecommitdiff
path: root/src/game-server/map.h
AgeCommit message (Collapse)AuthorFilesLines
2013-05-10Partial rewrite and improvements of Warp objectPrzemysław Grzywacz1-0/+3
2013-04-25Simplified BeingComponent::updateDirectionThorbjørn Lindeijer1-1/+1
Same as in the client.
2012-03-13Added script bind to set walkmask for beingsErik Schilling1-3/+3
TODO: Inform client about this change. Reviewed-by: bjorn.
2011-10-20Return a const & from NameMap to avoid potential deep copiesThorbjørn Lindeijer1-2/+2
When I introduced NameMap it was only used with pointers, but now it is also used with std::string so it probably makes sense to keep a default- constructed value around so that a reference can be returned rather than a copy. NameMap::find was renamed to NameMap::value to make it more clear that it doesn't return an iterator, like std::map::find. Reviewed-by: Yohann Ferreira Reviewed-by: Ben Longbons
2011-10-19Took interpreting the objects out of the map readerThorbjørn Lindeijer1-0/+3
The map reader is now only concerned with parsing the XML, whereas the MapComposite turns some of the objects into Warps, Spawns and NPCs. Reviewed-by: Yohann Ferreira
2011-10-15Added script bindings for reading map objectsErik Schilling1-2/+58
map_get_objects([string filter]): returns all object of the current map optionally filtered by type. map_get_object_property(handle object, string key): returns the value of the property of the object. map_get_object_bounds(handle object): returns x, y, width, height of an object. map_get_object_name(handle object): returns name of an object. map_get_object_type(handle object): returns type of an object. Mantis-issue: 397 Reviewed-by: Thorbjørn Lindeijer
2011-03-11Split path finding out of the Map classThorbjørn Lindeijer1-62/+27
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
2011-03-10Server-Wrap the open and closed list members in path finding.Yohann Ferreira1-10/+3
This prevents some weird things happening especially on crowded maps. I also removed the unused findSimplePath() function. Reviewed-by: Thorbjorn.
2011-01-09Removed the superfluous point struct.Yohann Ferreira1-14/+2
It was too close from the Position class and it leads to making the server handle one or another type through the code. Still bugged me many times while making changes. Reviewed-by: Jaxad.
2011-01-03Got rid of the superfluous DEFAULT_TILE_HEIGHT/WIDTH.Yohann Ferreira1-5/+2
We've got DEFAULT_TILE_LENGTH in defines.h for that. Trivial fix.
2010-11-14Renamed .hpp files into .h for consistency.Yohann Ferreira1-0/+216
Also added an header to the autoattack.{h,cpp} files. Big but trivial fix.