Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
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
|
|
Just seems a bit more organized to me.
|
|
The F cost represents the estimate of the total cost from source to
destination. It is only relevant to sort the locations to be checked, so
there is no point in assigning it to each coordinate of the map.
With maps up to 200x200, the memory usage is reduced by 160 kB! :P
Reviewed-by: Bertram
|
|
It was done in both the Character and the Monster destructors, but I
don't see how any Actor should be excluded from this. Now it also
happens for NPC, Effect and Item, though only NPC has a relevant
walkmask.
Also fixed a small issue introduced in 97e0a9eb170499 and added an
assert to freeTile. We should be able to assert that a tile can only be
freed if it was blocked.
Reviewed-by: Stefan Dombrowski
|
|
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.
|
|
The default argument values had no effect, because they are
not in the declaration.
Updating the codeblock project, because protocol.h had been renamed.
Reviewed-by: Bertram
|
|
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.
|
|
The speed conversion needs a standard tile length anyway
and can be improved later once the movement code
will start to handle beings size.
Reviewed-by: Crush.
|
|
|
|
Also updated the headers to refer to the GPL by URL instead of
suggesting to contact the FSF by snail mail, as per the latest
GPL usage instructions.
|
|
|
|
|
|
to map.
|
|
|
|
PvP is governed by the map property "pvp". Currently it can be either "none" for no PvP combat or "free" for unrestricted PvP combat. "none" is the default value which is used when pvp is undefined. Later addition of more sophisticated PvP modes is possible.
|
|
|
|
|
|
|
|
crash caused by the new blocking system (thanks to peavey for reporting).
|
|
|
|
player characters and other monsters, player characters only by monsters.
|
|
|
|
new one is too cpu intensive.
|
|
spawn areas.
|
|
serialize and deserialize functions on both the accountserver and the gameserver.
|
|
|