PlayerSAO/LocalPlayer refactor: (#4612)
authorNer'zhul <nerzhul@users.noreply.github.com>
Sun, 30 Oct 2016 13:53:26 +0000 (14:53 +0100)
committerGitHub <noreply@github.com>
Sun, 30 Oct 2016 13:53:26 +0000 (14:53 +0100)
commit9d25242c5c1411d692254cf910345d51c9a24fa3
treeedec8475b32562379d463757e77031bdc994e971
parentd43326021a9a7def27773ed1f7ec01992ed3abf6
PlayerSAO/LocalPlayer refactor: (#4612)

* Create UnitSAO, a common part between PlayerSAO & LuaEntitySAO
* Move breath to PlayerSAO & LocalPlayer
* Migrate m_yaw from (Remote)Player & LuaEntitySAO to UnitSAO
* Migrate m_yaw from Player to LocalPlayer for client
* Move some functions outside of player class to PlayerSAO/RemotePlayer or LocalPlayer depending on which class needs it
* Move pitch to LocalPlayer & PlayerSAO
* Move m_position from Player to LocalPlayer
* Move camera_barely_in_ceiling to LocalPlayer as it's used only there
* use PlayerSAO::m_base_position for Server side positions
* remove a unused variable
* ServerActiveObject::setPos now uses const ref
* use ServerEnv::loadPlayer unconditionnaly as it creates RemotePlayer only if it's not already loaded
* Move hp from Player to LocalPlayer
* Move m_hp from LuaEntitySAO to UnitSAO
* Use m_hp from PlayerSAO/UnitSAO instead of RemotePlayer
18 files changed:
src/clientiface.cpp
src/collision.cpp
src/content_sao.cpp
src/content_sao.h
src/environment.cpp
src/environment.h
src/localplayer.cpp
src/localplayer.h
src/network/clientpackethandler.cpp
src/network/serverpackethandler.cpp
src/player.cpp
src/player.h
src/remoteplayer.cpp
src/remoteplayer.h
src/script/lua_api/l_object.cpp
src/server.cpp
src/serverobject.h
src/unittest/test_player.cpp