Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
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
|
|
|
|
It was freeing the new tile rather than the previous tile.
Reviewed-by: Stefan Dombrowski
|
|
This should do the trick until we have a better time management
system.
This closed issue: Mana-Mantis #205.
|
|
We can just stick with integers by trading a sqrt for a multiplication.
Reviewed-by: Bertram
|
|
|
|
|
|
Reviewed-by: Thorbjorn.
|
|
This prevents some weird things happening especially on crowded
maps.
I also removed the unused findSimplePath() function.
Reviewed-by: Thorbjorn.
|
|
Minor other fixes.
Trivial.
|
|
This reflects much more what the function does IMHO.
Trivial.
|
|
Even when events are inserted before game state update time,
the monsters don't speak since they still don't have an id (-1).
As I thought that reworking the mapcomposite engine for that particular
point was ineffective, here is another working way to make monsters
speak at spawn time by using the schedule_in function with
0.3 second (or 3 ticks).
Resolves: Mana-Mantis #205.
Reviewed-by: Thorbjorn.
|
|
Creation of monsters shouldn't be done during game state
update. So we delay their insertion after the update
to avoid a crash in debug builds and weird stuff happening
in release builds.
Reviewed-by: Thorbjorn.
|
|
Trivial.
|
|
The gameserver now receive a copy of all world state variables when
they are accepted by the accountserver and receive a copy of all
map state variables of a map when they register it successfully.
Implemented LUA script bindings for getting and setting these variables.
When such a variable is set, the accountserver is notified about this
change. Changes to world state variables are then propagated to all
gameservers by the accountserver.
Be aware that when a gameserver is updating a map, there is no check if
it is actually responsible for said map. But I consider this not a
security flaw, because authenticated game servers are considered to be
trustworthy in a lot of other situations, too.
Also renamed "quest" to "character variable" in the sourcecode.
Reviewed-by: Bertram
|
|
Reviewed-by: Thorbjorn
|
|
Reviewed-by: Bertram
|
|
To simply follow the documentation. Monsters behaviour is a bit
less strange now.
|
|
Reviewed-by: Crush
|
|
Reviewed-by: Thorbjorn
|
|
|
|
This permits to handle such operation after the object locking,
thus avoiding to fail on the assertion: assert(!dbgLockObjects);
when inserting a npc.
Reviewed-by: Ablu.
|
|
An misleading error was raised when the function dealt
with its last remaining job as it didn't return after removing it.
Reviewed-by: Ablu.
|
|
Reviewed-by: Jaxad0127.
Resolves: Mana-Mantis #286.
|
|
|
|
Both servers deinitialize enet now from deinitializeServer().
Reviewed-by: Bertram, Jaxad0127
|
|
Trivial fix.
|
|
Reviewed-by: Mpa4Hu.
Resolves: Mana-Mantis #61.
|
|
|
|
Not in tiles, as suggested by the header.
Trivial fix.
|
|
They're both using a fully working merchant lua function.
Resolves: Mana-mantis #295.
|
|
Now buy/sell lua functions can access the player inventory
again.
This is not using the delayed mode, so it won't be a problem.
Reviewed-by: Freeyorp.
|
|
Reviewed-by: Ablu, Freeyorp.
|
|
|
|
Reviewed-by: Freeyorp.
|
|
Reviewed-by: Freeyorp.
|
|
Trivial.
|
|
|
|
The function is named mana.chr_get_gender. It returns 0 for male
and 1 for female. libmana-constants.lua defines the variables
GENDER_MALE and GENDER_FEMALE with these values. Also made the
banker NPC refer to the gender of the player character.
Reviewed-by: Jaxad0127
|
|
This reverts commit b2209cbe93aa12dcd4e4e3b9a7cd8b13ed5713e9.
Money should be handled through attributes, not magic numbers.
|
|
|
|
- At character's attributes recalculation when necessary.
- In the lua scripting functions.
|
|
|
|
|
|
Now this can be loaded with the 'magic-evade' xml tag.
|
|
As a consequence, the monsters can spawn again.
Reviewed-by: Freeyorp.
|
|
|
|
- Fixed monsters Id.
- Added collision layer to the desert map.
- Added a few simple NPCs on the map (They still need a sprite.)
- Added player and hairstyles sprites files and definition in items.xml.
|
|
|