mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
refacto: don't use RenderingEngine singleton on CAO
* we don't need on CAO side more than SceneManager, and temporary. Pass only required SceneManager as a parameter to build CAO and add them to the current scene * Use temporary the RenderingEngine singleton from ClientEnvironment, waitfor for better solution * Make ClientActiveObject::addToScene virtual function mandatory to be defined by children to ensure we don't forget to properly define it
This commit is contained in:
parent
1bc855646e
commit
809e68fdc0
5 changed files with 20 additions and 21 deletions
|
@ -33,13 +33,17 @@ class LocalPlayer;
|
|||
struct ItemStack;
|
||||
class WieldMeshSceneNode;
|
||||
|
||||
namespace irr { namespace scene {
|
||||
class ISceneManager;
|
||||
}}
|
||||
|
||||
class ClientActiveObject : public ActiveObject
|
||||
{
|
||||
public:
|
||||
ClientActiveObject(u16 id, Client *client, ClientEnvironment *env);
|
||||
virtual ~ClientActiveObject();
|
||||
|
||||
virtual void addToScene(ITextureSource *tsrc) {}
|
||||
virtual void addToScene(ITextureSource *tsrc, irr::scene::ISceneManager *smgr) = 0;
|
||||
virtual void removeFromScene(bool permanent) {}
|
||||
|
||||
virtual void updateLight(u32 day_night_ratio) {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue