summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-03-11Simplified check_schedule a bitThorbjørn Lindeijer1-14/+9
2011-03-11Split path finding out of the Map classThorbjørn Lindeijer7-176/+176
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-11Include Lua files in the projectThorbjørn Lindeijer1-0/+1
2011-03-11Fixed Actor::setPosition to update the blockmask correctlyThorbjørn Lindeijer1-8/+6
It was freeing the new tile rather than the previous tile. Reviewed-by: Stefan Dombrowski
2011-03-11Change the monster talking delay to 0.5 to minimize test failures.Yohann Ferreira1-1/+1
This should do the trick until we have a better time management system. This closed issue: Mana-Mantis #205.
2011-03-11Avoid sqrt and double in circle-to-circle collision detectionThorbjørn Lindeijer1-4/+6
We can just stick with integers by trading a sqrt for a multiplication. Reviewed-by: Bertram
2011-03-10Removed two superfluous semicolonsThorbjørn Lindeijer2-2/+2
2011-03-10Added a script to create and update a Qt Creator projectThorbjørn Lindeijer2-0/+24
2011-03-10Avoid running newly scheduled jobs by using a fixed time point.Yohann Ferreira1-1/+2
Reviewed-by: Thorbjorn.
2011-03-10Server-Wrap the open and closed list members in path finding.Yohann Ferreira2-76/+43
This prevents some weird things happening especially on crowded maps. I also removed the unused findSimplePath() function. Reviewed-by: Thorbjorn.
2011-03-09Prevented a potential crash in storage::getAllWorldStateVars()Yohann Ferreira1-2/+10
Minor other fixes. Trivial.
2011-03-09Renamed GameState::insertSafe() to inserOrDelete.Yohann Ferreira5-8/+8
This reflects much more what the function does IMHO. Trivial.
2011-03-09Show a way to make monsters speak at spawn time.Yohann Ferreira2-2/+12
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.
2011-03-09Made the monster creation delayed, to avoid crashing.Yohann Ferreira1-5/+1
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.
2011-03-06Small fixes coming from my comment on issue #77.Yohann Ferreira5-19/+22
Trivial.
2011-03-04Implemented persistent world and map variablesPhilipp Sehmisch12-22/+370
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
2011-03-02Enabling of warp to respawn location after deathStefan Dombrowski1-1/+1
Reviewed-by: Thorbjorn
2011-02-24Fixing dead born monstersStefan Dombrowski1-2/+5
Reviewed-by: Bertram
2011-02-23Changed stroll radius to pixels in monsters.xmlYohann Ferreira1-3/+3
To simply follow the documentation. Monsters behaviour is a bit less strange now.
2011-02-22Implementing @killmonstersStefan Dombrowski2-0/+27
Reviewed-by: Crush
2011-02-21Remove obsolete reset of SIGSEGV handlingStefan Dombrowski2-6/+0
Reviewed-by: Thorbjorn
2011-02-20Made use of npc_disable(), npc_enable() on the template map.Yohann Ferreira1-0/+4
2011-02-20Fixed enabling/disabling npcs by enqueuing the insertion.Yohann Ferreira1-2/+1
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.
2011-02-20Fixed the check_schedule() lua function.Yohann Ferreira1-0/+5
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.
2011-02-20Adding CSV support from Jaxad's client implementation.Yohann Ferreira1-8/+45
Reviewed-by: Jaxad0127. Resolves: Mana-Mantis #286.
2011-02-20Update barbers and hair display.Yohann Ferreira16-90/+16
2011-02-19Removing dublicate deinitialize of enetStefan Dombrowski2-6/+3
Both servers deinitialize enet now from deinitializeServer(). Reviewed-by: Bertram, Jaxad0127
2011-02-19Add support for zlib map layer compression.Yohann Ferreira1-3/+6
Trivial fix.
2011-02-19Updated the C::B project file to permit the choice of DB.Yohann Ferreira1-7/+57
Reviewed-by: Mpa4Hu. Resolves: Mana-Mantis #61.
2011-02-16Removing unused variable configPathChangedStefan Dombrowski2-6/+0
2011-02-16Fixed doc about stroll range, which is coded in pixels.Yohann Ferreira1-2/+2
Not in tiles, as suggested by the header. Trivial fix.
2011-02-15Added a merchant and a blacksmith on the template map.Yohann Ferreira5-79/+130
They're both using a fully working merchant lua function. Resolves: Mana-mantis #295.
2011-02-15Fixed registering the players items to the buysell handler.Yohann Ferreira1-24/+46
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.
2011-02-11Added the schedule_per_date() lua function.Yohann Ferreira1-0/+11
Reviewed-by: Ablu, Freeyorp.
2011-02-11Finally fix Harmony giving some GP to characters.Yohann Ferreira1-7/+4
2011-02-11Fix the GP base and mod values for newly created characters.Yohann Ferreira1-0/+11
Reviewed-by: Freeyorp.
2011-02-11Fix basic money handling using the ATTR_GP attribute.Yohann Ferreira2-7/+23
Reviewed-by: Freeyorp.
2011-02-11Synced the libmana-constants.lua file with the current protocol.Yohann Ferreira1-59/+68
Trivial.
2011-02-11Added lua attributes getters/setters thanks to Freeyorp.Yohann Ferreira1-68/+155
2011-02-08Implemented LUA binding to get the gender of a characterPhilipp Sehmisch3-1/+27
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
2011-01-30Revert "Fixed the money handling."Jared Adams5-34/+7
This reverts commit b2209cbe93aa12dcd4e4e3b9a7cd8b13ed5713e9. Money should be handled through attributes, not magic numbers.
2011-01-31Added first visible npcs and play with them a bit.Yohann Ferreira5-6/+55
2011-01-31Fixed the money handling.Yohann Ferreira5-7/+34
- At character's attributes recalculation when necessary. - In the lua scripting functions.
2011-01-30Made the code tell a bit more when a monster is lacking values.Yohann Ferreira1-14/+30
2011-01-30Trivial code format fixes in monstermanager.cpp.Yohann Ferreira1-28/+45
2011-01-30Added the missing Magical dodge monster property.Yohann Ferreira2-1/+3
Now this can be loaded with the 'magic-evade' xml tag.
2011-01-30Made the monsters' attributes compute fine again.Yohann Ferreira4-18/+67
As a consequence, the monsters can spawn again. Reviewed-by: Freeyorp.
2011-01-27Simply fixing the map script header while i see it.Yohann Ferreira1-4/+4
2011-01-27Updates to the example data.Yohann Ferreira42-8/+794
- 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.
2011-01-27Add collisions to the template map.Yohann Ferreira2-2/+10