Merge remote-tracking branch 'upstream/development' into imageAsset_refactor_rev3

This commit is contained in:
marauder2k7 2025-05-12 14:45:41 +01:00
commit e1c01cd49a
152 changed files with 7312 additions and 4132 deletions

View file

@ -1127,7 +1127,7 @@ bool Explosion::onNewDataBlock( GameBaseData *dptr, bool reload )
if (mDataBlock->isTempClone())
return true;
scriptOnNewDataBlock();
scriptOnNewDataBlock(reload);
return true;
}

View file

@ -143,7 +143,10 @@ public:
ExplosionData* cloneAndPerformSubstitutions(const SimObject*, S32 index=0);
bool allowSubstitutions() const override { return true; }
void onShapeChanged() {}
void onShapeChanged()
{
reloadOnLocalClient();
}
};

View file

@ -852,8 +852,11 @@ void GroundCover::unpackUpdate( NetConnection *connection, BitStream *stream )
// It's sloppy, but it works for now.
_freeCells();
if ( isProperlyAdded() )
if (isProperlyAdded())
{
_initMaterial();
_initShapes();
}
}
}

View file

@ -341,7 +341,7 @@ protected:
RectF mBillboardRects[MAX_COVERTYPES];
/// The cover shape filenames.
DECLARE_SHAPEASSET_ARRAY(GroundCover, Shape, MAX_COVERTYPES);
DECLARE_SHAPEASSET_ARRAY(GroundCover, Shape, MAX_COVERTYPES, onShapeChanged);
DECLARE_ASSET_ARRAY_NET_SETGET(GroundCover, Shape, -1);
/// The cover shape instances.
@ -409,6 +409,12 @@ protected:
S32 randSeed );
void _debugRender( ObjectRenderInst *ri, SceneRenderState *state, BaseMatInstance *overrideMat );
void onShapeChanged()
{
_initShapes();
setMaskBits(U32(-1));
}
};
#endif // _GROUNDCOVER_H_

View file

@ -474,7 +474,7 @@ bool Lightning::onNewDataBlock( GameBaseData *dptr, bool reload )
if ( !mDataBlock || !Parent::onNewDataBlock( dptr, reload ) )
return false;
scriptOnNewDataBlock();
scriptOnNewDataBlock(reload);
return true;
}

View file

@ -1134,7 +1134,7 @@ bool ParticleEmitter::onNewDataBlock( GameBaseData *dptr, bool reload )
return true;
}
scriptOnNewDataBlock();
scriptOnNewDataBlock(reload);
return true;
}

View file

@ -254,7 +254,7 @@ bool ParticleEmitterNode::onNewDataBlock( GameBaseData *dptr, bool reload )
return false;
// Todo: Uncomment if this is a "leaf" class
scriptOnNewDataBlock();
scriptOnNewDataBlock(reload);
return true;
}

View file

@ -598,7 +598,7 @@ bool Precipitation::onNewDataBlock( GameBaseData *dptr, bool reload )
initMaterials();
}
scriptOnNewDataBlock();
scriptOnNewDataBlock(reload);
return true;
}

View file

@ -159,7 +159,7 @@ bool RibbonNode::onNewDataBlock( GameBaseData *dptr, bool reload )
return false;
// Todo: Uncomment if this is a "leaf" class
scriptOnNewDataBlock();
scriptOnNewDataBlock(reload);
return true;
}

View file

@ -440,7 +440,7 @@ bool Splash::onNewDataBlock( GameBaseData *dptr, bool reload )
if (!mDataBlock || !Parent::onNewDataBlock(dptr, reload))
return false;
scriptOnNewDataBlock();
scriptOnNewDataBlock(reload);
return true;
}