Commit Graph

8 Commits

Author SHA1 Message Date
Loïc Blot 454dbf83a9
Server class code cleanups (#9769)
* Server::overrideDayNightRatio doesn't require to return bool
There is no sense to sending null player, the caller should send a valid object

* Server::init: make private & cleanup
This function is always called before start() and loads some variables which can be loaded in constructor directly.
Make it private and call it directly in start

* Split Server inventory responsibility to a dedicated object

This splits permit to found various historical issues:
* duplicate lookups on player connection
* sending inventory to non related player when a player connects
* non friendly lookups on detached inventories ownership

This reduce the detached inventory complexity and also increased the
lookup performance in a quite interesting way for servers with thousands
of inventories.
2020-05-07 22:38:41 +02:00
Loic Blot 5146086a64 Drop content_sao.{cpp,h}
Move LuaEntitySAO to a new dedicated file
Drop TestSAO (useless object)
Drop the old static startup initialized SAO factory, which was pretty useless.
This factory was using a std::map for 2 elements, now just use a simple condition owned by ServerEnvironment, which will be lightweight, that will also drop a one time useful test on each LuaEntitySAO creation. This should reduce server load on massive SAO creation
2020-04-11 16:07:17 +02:00
Loic Blot 894a34aef4 Move PlayerSAO to dedicated files 2020-04-11 16:07:17 +02:00
Loic Blot 6d43736172 Move serveractiveobject & unitsao
Move serverobject.{cpp,h} to server/serveractiveobject.{cpp,h}
Move UnitSAO class to dedicated files
2020-04-11 16:07:17 +02:00
Loïc Blot eda35100b6
Add an activeobject manager to hold active objects (#7939)
* Add an activeobject manager to hold active objects
* Add unittests
2018-12-13 20:18:54 +01:00
lhofhansl 94cd2bfeac Revert 6587 - Optimize entity-entity collision (#7539) 2018-07-08 21:30:55 +01:00
Vitaliy 528908a4c3 Optimize entity-entity collision (#6587)
* Add IrrLicht type aliases
* Add hash for IrrLicht vector
* Add object map
2018-04-03 08:23:46 +02:00
Loïc Blot 6c184947c3
Server: delegate mod management & config to ServerModConfiguration (#7131)
* Server: delegate mod management & config to ServerModConfiguration (rename it to ServerModManager)

* Use c++11 range based loops
* Add unittests + experimental/default mod as a test case to permit testing mod loading in future tests
2018-03-16 08:41:33 +01:00