Age | Commit message (Collapse) | Author | Files | Lines |
|
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
|
|
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
|
|
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
|
|
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
|
|
This prevents some weird things happening especially on crowded
maps.
I also removed the unused findSimplePath() function.
Reviewed-by: Thorbjorn.
|
|
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.
|
|
We've got DEFAULT_TILE_LENGTH in defines.h for that.
Trivial fix.
|
|
Also added an header to the autoattack.{h,cpp} files.
Big but trivial fix.
|