Almost moved character to flecs

This commit is contained in:
2025-09-01 03:19:03 +03:00
parent 6ec256195b
commit e0045ffeb1
7 changed files with 653 additions and 712 deletions

View File

@@ -386,9 +386,6 @@ public:
// getRenderWindow());
mDbgDraw.reset(new Ogre::Bullet::DebugDrawer(
mScnMgr->getRootSceneNode(), mDynWorld->getBtWorld()));
ECS::setup();
Sound::setup();
Sound::ding();
}
void locateResources() override
{
@@ -535,7 +532,8 @@ public:
Ogre::Timer mTerrainUpd;
void updateTerrain(float delta)
{
Ogre::Vector3 pos = mCharacterController->getPosition();
// Ogre::Vector3 pos = mCharacterController->getPosition();
Ogre::Vector3 pos(0, 0, 0);
if (!mTerrainReady && m_terrain.isLoadedAt(pos) &&
mCharacterController->checkGround()) {
std::cout << "terrain ready\n";
@@ -595,6 +593,9 @@ public:
"Skybox/Dynamic", "General");
OgreAssert(m, "Sky box material not found.");
m->load();
ECS::setup(mScnMgr, mDynWorld.get(), mCameraNode, mCamera);
Sound::setup();
Sound::ding();
}
void create_entity_node(const Ogre::String &name, int key)
{