@@ -565,6 +565,8 @@ EXPOSE_SINGLE_INTERFACE_GLOBALVAR(CServerGameDLL, IServerGameDLL, INTERFACEVERSI
565565// When bumping the version to this interface, check that our assumption is still valid and expose the older version in the same way
566566COMPILE_TIME_ASSERT ( INTERFACEVERSION_SERVERGAMEDLL_INT == 10 );
567567
568+ static bool bParsedParticles = false ;
569+
568570bool CServerGameDLL::DLLInit ( CreateInterfaceFn appSystemFactory,
569571 CreateInterfaceFn physicsFactory, CreateInterfaceFn fileSystemFactory,
570572 CGlobalVars *pGlobals)
@@ -727,7 +729,11 @@ bool CServerGameDLL::DLLInit( CreateInterfaceFn appSystemFactory,
727729 InvalidateQueryCache ();
728730
729731 // Parse the particle manifest file & register the effects within it
730- ParseParticleEffects ( false , false );
732+ if ( engine->IsDedicatedServer () )
733+ {
734+ ParseParticleEffects ( false , false );
735+ bParsedParticles = true ;
736+ }
731737
732738 // try to get debug overlay, may be NULL if on HLDS
733739 debugoverlay = (IVDebugOverlay *)appSystemFactory ( VDEBUG_OVERLAY_INTERFACE_VERSION, NULL );
@@ -958,6 +964,11 @@ bool CServerGameDLL::LevelInit( const char *pMapName, char const *pMapEntities,
958964 if ( pItemSchema )
959965 {
960966 pItemSchema->BInitFromDelayedBuffer ();
967+ // First valid class must be non-zero if we have a valid schema
968+ if ( pItemSchema->GetFirstValidClass () == 0 )
969+ {
970+ InventoryManager ()->InitializeInventory ();
971+ }
961972 }
962973#endif // USES_ECON_ITEMS
963974
@@ -970,6 +981,12 @@ bool CServerGameDLL::LevelInit( const char *pMapName, char const *pMapEntities,
970981 UpdateRichPresence ();
971982 }
972983
984+ if ( !bParsedParticles )
985+ {
986+ ParseParticleEffects ( false , false );
987+ bParsedParticles = true ;
988+ }
989+
973990 // Tony; parse custom manifest if exists!
974991 ParseParticleEffectsMap ( pMapName, false );
975992
0 commit comments