summaryrefslogtreecommitdiffstats
path: root/src/game-server
Commit message (Collapse)AuthorAgeFilesLines
...
* Split path finding out of the Map classThorbjørn Lindeijer2011-03-117-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
* Fixed Actor::setPosition to update the blockmask correctlyThorbjørn Lindeijer2011-03-111-8/+6
| | | | | | It was freeing the new tile rather than the previous tile. Reviewed-by: Stefan Dombrowski
* Avoid sqrt and double in circle-to-circle collision detectionThorbjørn Lindeijer2011-03-111-4/+6
| | | | | | We can just stick with integers by trading a sqrt for a multiplication. Reviewed-by: Bertram
* Server-Wrap the open and closed list members in path finding.Yohann Ferreira2011-03-102-76/+43
| | | | | | | | | This prevents some weird things happening especially on crowded maps. I also removed the unused findSimplePath() function. Reviewed-by: Thorbjorn.
* Renamed GameState::insertSafe() to inserOrDelete.Yohann Ferreira2011-03-094-7/+7
| | | | | | This reflects much more what the function does IMHO. Trivial.
* Small fixes coming from my comment on issue #77.Yohann Ferreira2011-03-064-15/+18
| | | | Trivial.
* Implemented persistent world and map variablesPhilipp Sehmisch2011-03-047-13/+170
| | | | | | | | | | | | | | | | | | | | | 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
* Fixing dead born monstersStefan Dombrowski2011-02-241-2/+5
| | | | Reviewed-by: Bertram
* Implementing @killmonstersStefan Dombrowski2011-02-221-0/+26
| | | | Reviewed-by: Crush
* Remove obsolete reset of SIGSEGV handlingStefan Dombrowski2011-02-211-3/+0
| | | | Reviewed-by: Thorbjorn
* Adding CSV support from Jaxad's client implementation.Yohann Ferreira2011-02-201-8/+45
| | | | | | Reviewed-by: Jaxad0127. Resolves: Mana-Mantis #286.
* Removing dublicate deinitialize of enetStefan Dombrowski2011-02-191-3/+3
| | | | | | Both servers deinitialize enet now from deinitializeServer(). Reviewed-by: Bertram, Jaxad0127
* Add support for zlib map layer compression.Yohann Ferreira2011-02-191-3/+6
| | | | Trivial fix.
* Removing unused variable configPathChangedStefan Dombrowski2011-02-161-3/+0
|
* Fixed doc about stroll range, which is coded in pixels.Yohann Ferreira2011-02-161-2/+2
| | | | | | Not in tiles, as suggested by the header. Trivial fix.
* Fixed registering the players items to the buysell handler.Yohann Ferreira2011-02-151-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.
* Revert "Fixed the money handling."Jared Adams2011-01-303-8/+2
| | | | | | This reverts commit b2209cbe93aa12dcd4e4e3b9a7cd8b13ed5713e9. Money should be handled through attributes, not magic numbers.
* Fixed the money handling.Yohann Ferreira2011-01-313-2/+8
| | | | | - At character's attributes recalculation when necessary. - In the lua scripting functions.
* Made the code tell a bit more when a monster is lacking values.Yohann Ferreira2011-01-301-14/+30
|
* Trivial code format fixes in monstermanager.cpp.Yohann Ferreira2011-01-301-28/+45
|
* Added the missing Magical dodge monster property.Yohann Ferreira2011-01-301-0/+2
| | | | Now this can be loaded with the 'magic-evade' xml tag.
* Made the monsters' attributes compute fine again.Yohann Ferreira2011-01-303-10/+59
| | | | | | As a consequence, the monsters can spawn again. Reviewed-by: Freeyorp.
* Made the being direction be updated only at the end of the movement.Yohann Ferreira2011-01-221-3/+3
| | | | | | | This saves a bit of cpu and make use of pixel points where tile points where used before and could lead to discrepancies. Reviewed-by: Thorbjorn.
* Made the servers report their protocol version.Yohann Ferreira2011-01-112-2/+5
| | | | | | | | | | | | | As the protocol version isn't something the maintainers should set, I removed the net_clientVersion irrelevant option, replaced by the corresponding define PROTOCOL_VERSION in the manaserv_protocol.h file. A corresponding change in the client will be made. N.B.: Now, the Enet version is also reported in the log. Reviewed-by: Jaxad.
* Removing default argument values from Map definitionStefan Dombrowski2011-01-101-2/+1
| | | | | | | | 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
* Fix being direction discrepancies by syncing the BeingDirection.Yohann Ferreira2011-01-095-15/+112
| | | | | | | | | The server was actually using the bitmask enum while the the client still sent another one, creating discrepancies. A second problem is that the being direction was not properly initialized and not updated while it was moving. Reviewed-by: Jaxad.
* Removed the superfluous point struct.Yohann Ferreira2011-01-099-24/+13
| | | | | | | | 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.
* Get rid of the server tick magic number.Yohann Ferreira2011-01-064-9/+11
| | | | Reviewed-by: CodyMartin.
* Got rid of the superfluous DEFAULT_TILE_HEIGHT/WIDTH.Yohann Ferreira2011-01-034-10/+10
| | | | | | We've got DEFAULT_TILE_LENGTH in defines.h for that. Trivial fix.
* Change Actor::mActionTime to mMoveTime member to reflect more its actual use.Yohann Ferreira2011-01-033-12/+14
| | | | Trivial.
* Cleaned up and document a bit more the speed conversion functions.Yohann Ferreira2011-01-032-2/+3
| | | | Trivial fix.
* Namespaced the manaserv protocol to ease the porting of the enums.Yohann Ferreira2011-01-031-0/+1
| | | | Trivial.
* protocol.h -> manaserv_protocol.h to avoid conflicts with mysql files.Yohann Ferreira2010-12-292-2/+2
| | | | Resolves: Mana-Mantis #278.
* Moved parts needing to be in sync with the client in protocol.h.Yohann Ferreira2010-12-295-60/+19
| | | | Trivial fix.
* Implemented @log and @logsay commands.Philipp Sehmisch2010-12-271-0/+42
| | | | | | | | | | The @log command is the equivalent to tmwAthena's @l. It allows to log a text as a transaction for documentation purpose. The @logsay command works like @t on tmwAthena. It says something in public chat while also logging it as a separate trasaction. Reviewed-by: Thorbjorn
* Added @kick and @kill commands.Philipp Sehmisch2010-12-271-0/+71
| | | | | | | | | | | | | | | @kick disconnects the client connection of a character. The new error- code 11 (ERRMSG_ADMINISTRATIVE_LOGOFF) is not supported by the client yet. It will show a generic "The connection to server was lost" message instead. @kill kills the character by setting its HP to 0. Added @kick transaction code I forgot in last commit. Considering that this was just minutes ago I think that noone updated his database yet. So I don't think that a new database version is justified for this. Reviewed-by: Bertram
* Transaction logging of various command, new transaction codes and style fix.Philipp Sehmisch2010-12-271-4/+28
| | | | | | | | | | | | | | The @mute, @goto, @attribute and @announce commands now logs transactions to the database. Added new transaction codes to database. I've preliminarily added a lot of codes for not yet supported commands so that we needn't do a database update with every single commit which implements one. Also using the equivalent "say" helper function in place of the "GameState::sayTo" method in the command handler. Reviewed-by: Kage
* Implemented @die chat commandPhilipp Sehmisch2010-12-171-2/+11
| | | | | | | | | | | | The @die chat command kills the evoking character by setting its hit points to 0. The example permissions.xml assigns it to the "tester" rights group and not "players" because server admins who are not aware of this command might run into trouble when they assume that players don't have a method to teleport to their spawn point voluntarily. Resolves: mantis ticket #192 Reviewed-by: Jaxad0127
* Deharcoded the host and port options for each servers.Yohann Ferreira2010-12-162-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: ============================================================ For the account server: ------------------------------------------------------------ Old -> New ------------------------------------------------------------ net_accountServerAddress, net_listenHost -> net_accountHost net_accountServerPort -> net_accountListenToClientPort net_accountServerPort +1 -> net_accountListenToGamePort For the game server: ------------------------------------------------------------ Old -> New ------------------------------------------------------------ net_gameServerAddress -> net_gameHost net_gameServerPort -> net_gameListenToClientPort For the chat server: ------------------------------------------------------------ Old -> New ------------------------------------------------------------ -> net_chatHost net_accountServerPort + 2 -> net_chatListenToClientPort Special fallback feature, as requested by Freeyorp: When the net_accountListenToClientPort (default to 9601) is set, the 3 others ports will automatically offset from it, if they're not set, following this rule: net_accountListenToGamePort = net_accountListenToClientPort + 1 net_chatListenToClientPort = net_accountListenToClientPort + 2 net_gameListenToClientPort = net_accountListenToClientPort + 3 Resolves: Mana-Mantis #216. Reviewed-by: Jaxad0127.
* Fix string comparison in map readingJared Adams2010-12-151-14/+14
|
* Allow names and types in map files to be of any caseJared Adams2010-12-151-14/+14
| | | | Trivial fix, so no review.
* Fix many compiler warnings.Freeyorp2010-12-086-22/+25
| | | | Reviewed-by: Bertram
* Improve warp commandsJared Adams2010-12-061-15/+120
| | | | | | | | @warp no longer takes a character. @charwarp was added to handle that ('#' still means the player). Both can take a map name, map id (preceded by '#') or '#' for the player's current map. Logging of warp commands now logs destination map and player warped (for @charwarp).
* Renamed .hpp files into .h for consistency.Yohann Ferreira2010-11-1466-312/+352
| | | | | | Also added an header to the autoattack.{h,cpp} files. Big but trivial fix.
* Readd the calculation of base attributes at character's login.Yohann Ferreira2010-11-131-0/+3
| | | | Reviewed-by: CodyMartin.
* Fully shift being scope attributes into being.Freeyorp2010-11-044-66/+115
| | | | | | Also split updateDerivedAttributes and remove the calc check workaround. Reviewed-by: Bertram.
* Fix some errors in dispelling non-timed attributesFreeyorp2010-11-043-17/+48
| | | | Reviewed-by: Bertram.
* [PATCH 1/3] Alter the way attribute dependencies are updated.Yohann Ferreira2010-11-041-32/+50
| | | | | | Also fix movement speed dependency. Reviewed-by: Bertram
* Renamed write{Byte,Short,Long} to writeInt{8,16,32}Thorbjørn Lindeijer2010-11-037-217/+217
| | | | | Mainly for consistency with the client, and the general consensus was that these numbered versions were clearer.
* Some random code cleanups.Yohann Ferreira2010-11-024-72/+112
| | | | | | | | Also renamed MonsterClass::getType() to getId() since it was misleading with the use of ThingType::getType() and didn't represent the actual meaning, IMHO. Trivial.