summaryrefslogtreecommitdiff
path: root/src/game-server/mapcomposite.cpp
AgeCommit message (Collapse)AuthorFilesLines
2013-02-01Silenced to Wreorder warnings.Yohann Ferreira1-2/+2
2013-01-29Silenced some eclipse warningsErik Schilling1-0/+3
2012-09-22Extended warnings for parsing warpsErik Schilling1-1/+1
Reviewed-by: bjorn.
2012-09-22Fixed marking map as activatedErik Schilling1-19/+36
The patch that allowed to use map objects as warp targets broke this. During run of map initalize mActive was still false. This broke creating objects (npc, triggers) in atinit. Reviewed-by: bjorn.
2012-09-02Allow map objects as warp targetsErik Schilling1-13/+50
This patch allows map objects as warp targets. For use: - Create object in tiled with type="WARP_DEST" - Set name to anything you want - Create usual WARP object - Leave out the DEST_{X,Y} part - Add DEST_NAME property with the name of the first object This requires the game server to parse all maps at startup. Change is tested. Reviewed-by: bjorn.
2012-09-02Dropped .gz suffix for mapsErik Schilling1-2/+0
Reviewed-by: bjorn.
2012-08-05Fixed the atinit functionErik Schilling1-0/+2
Previously each map had its own scope. They got merged now but the atinit function was forgotten to adapt. Reviewed-by: bjorn.
2012-04-04Renamed Thing to EntityThorbjørn Lindeijer1-13/+13
In preparation for using an entity/component system for the entities in the game world, this name will be more recognizable and easier to talk about. Reviewed-by: Yohann Ferreira
2012-03-26Some general cleanups and merged Being::perform() into update()Thorbjørn Lindeijer1-6/+0
The main change here is to remove the separate calling of 'perform' on all beings, and rather rely on the beings to do whatever they were doing in that function when the virtual 'update' function is called. Reviewed-by: Yohann Ferreira
2012-03-17Added map update function, moved schedules there to keep map contextErik Schilling1-0/+30
Reviewed-by: bjorn.
2012-03-11Removed the create_npc wrapper and the last two NPC callbacksThorbjørn Lindeijer1-0/+2
When creating an NPC, you now provide its optional talk and update functions directly rather than them being stored in a table on the Lua side and then called in response to a global callback. Also fixed an issue with a missing gender parameter to the delayed NPC creation callback used by NPCs defined on the map (found by Erik while reviewing this patch). Reviewed-by: Erik Schilling
2012-03-11Added callbacks for map/worldvar changesErik Schilling1-0/+35
Reviewed-by: bjorn.
2012-03-03Added further missing callbacksErik Schilling1-4/+13
Reviewed-by: bjorn.
2012-03-02Merged all the different Lua states into oneThorbjørn Lindeijer1-45/+12
No more Lua state for each status effect, monster, item effect or map. All scripts are loaded into the same state. This should be more efficient overall and make it easier to implement dynamic reloading of the scripts in the future. Now, this introduces the problem of name collisions between different Lua scripts. For now this is solved by using more specific function names, like 'tick_plague' and 'tick_jump' rather than just 'tick'. The plan is however to get rid of these globals, and register these callbacks from the script, so that they can be local functions without the danger of colliding with other scripts. Reviewed-by: Erik Schilling Reviewed-by: Yohann Ferreira
2011-11-07Merged three global script states into oneThorbjørn Lindeijer1-2/+2
These scripts could trivially share one script state, since the methods called on them from the server are not overlapping. This does leave them open to access each other's global variables, but that's the problem with global variables. The one remaining global script file name is now configurable, so that it may also be set to a script in a different scripting language. The two related script options are: script_mainFile (default: scripts/main.lua) script_defaultEngine (default: lua) - renamed from defaultScriptEngine Reviewed-by: jurkan Reviewed-by: Yohann Ferreira
2011-10-23Added function to determine the script engine by the file name extensionjurkan1-8/+31
Reviewed-by: Bjorn, Bertram.
2011-10-19Took interpreting the objects out of the map readerThorbjørn Lindeijer1-27/+180
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
2011-03-17Micro-optimizations related to std::stringThorbjørn Lindeijer1-2/+2
* Rely on the fact that a std::string is empty by default * Use std::string::empty() rather than comparing to "" * Construct with std::string() rather than from "" Reviewed-by: Bertram
2011-03-06Small fixes coming from my comment on issue #77.Yohann Ferreira1-6/+6
Trivial.
2011-03-04Implemented persistent world and map variablesPhilipp Sehmisch1-0/+26
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-01-09Removed the superfluous point struct.Yohann Ferreira1-1/+1
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.
2010-11-14Renamed .hpp files into .h for consistency.Yohann Ferreira1-5/+5
Also added an header to the autoattack.{h,cpp} files. Big but trivial fix.
2010-10-17Dehardcode the tileWidth and height, except for the speed conversion.Yohann Ferreira1-2/+4
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.
2010-09-15Reordered the manaserv.xml.example file and made related code cleanups.Yohann Ferreira1-6/+6
Reviewed-by: Thorbjorn.
2010-04-02Remove empty LOG print when deallocatingChuck Miller1-2/+0
2010-03-30Remove unneed debug outputChuck Miller1-1/+0
The issue this output was created to help debug has long been fixed
2010-02-23Removed some unnecessary log messagesPhilipp Sehmisch1-2/+2
2010-02-07Update Copyright date for Manaserv.Bertram1-1/+1
2009-12-06Fixed name of the project in copyright headersThorbjørn Lindeijer1-7/+6
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.
2009-07-10Prevent Actors from getting ID 0Jared Adams1-0/+1
Causes client problems.
2009-05-29Fixes crashes that sometimes happens when allocate and deallocating from map ↵Chuck Miller1-29/+29
buckets
2009-05-20Fix crash caused by non-removal of target.David Athay1-12/+17
2009-04-26Standardize on the position of the const keywordBjørn Lindeijer1-13/+17
Same as for the client.
2009-04-26Merged MovingObject into the Being classBjørn Lindeijer1-28/+28
Also renamed Object to Actor, to make it sound a little less generic. Cleans up a bit the rather big hierarchy of different object types we have.
2009-03-30Merge branch 'master' of git@gitorious.org:tmwserv/mainlineDavid Athay1-0/+9
2009-03-30Added debuggingDavid Athay1-0/+7
2009-03-24Added config option to set default PvP modePhilipp Sehmisch1-0/+3
2009-03-19Implemented the possibility to have maps with or without PvP combat.Philipp Sehmisch1-0/+6
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.
2009-01-28Moved MapContent into header file.David Athay1-118/+24
2008-11-16Got rid of CVS/Subversion $Id$ markersBjørn Lindeijer1-2/+0
2008-10-22Fixed NPC id bug. Changed time between server reconnection attempts.David Athay1-1/+1
2007-08-10Improved helper functions for Lua scripts. Associated scripts to maps.Guillaume Melquiond1-3/+8
2007-07-28Revert to the old pathfinding system without collision with beings, as the ↵Guillaume Melquiond1-4/+0
new one is too cpu intensive.
2007-07-07Simplified code by using map pointers only, instead of using both map IDs ↵Guillaume Melquiond1-41/+156
and map pointers.
2007-06-30Implemented basic monster AI and fixed a stability problem caused by the ↵Philipp Sehmisch1-0/+8
spawn areas.
2007-03-14Modified the game-server to use AbstractCharacterData, some renamingRogier Polak1-23/+23
2007-03-05Added an abstrart base class for characterdata, in order to use the same ↵Rogier Polak1-1/+1
serialize and deserialize functions on both the accountserver and the gameserver.
2007-01-07 r150@saline: gmelquio | 2007-01-07 15:48:59 +0100Guillaume Melquiond1-0/+13
Commented buckets a bit.
2007-01-06Removed world timer usage from account server, instead letting ENet wait duringBjørn Lindeijer1-1/+1
each host service to reduce CPU usage. Modified timer code to gracefully handle jumps back in time.
2007-01-04Server-side implementation of item pick-up.Guillaume Melquiond1-0/+7