struct SMFXRunTimeEffectParams { const int MAX_SOUND_PARAMS = 4; uint16 inWater : 1; uint16 inZeroG : 1; uint16 playSoundFP : 1; uint16 soundNoObstruction : 1; uint16 padding : 12; uint16 playflags; float fLastTime; float fDecalPlacementTestMaxSize; EntityId src; EntityId trg; int srcSurfaceId; int trgSurfaceId; IRenderNode* srcRenderNode; IRenderNode* trgRenderNode; int partID; Vec3 pos; Vec3 decalPos; Vec3 dir[2]; Vec3 normal; float angle; float scale; SMFXParticleEffectParams particleParams; EntityId audioProxyEntityId; Vec3 audioProxyOffset; float soundDistanceMult; float soundScale; int numSoundParams; SMFXSoundEffectParam soundParams[MAX_SOUND_PARAMS]; };
IMaterialEffects.h
float angle;
EntityId audioProxyEntityId;
if set, uses this Entity's audio proxy to execute audio triggers. otherwise creates independent sound
Vec3 audioProxyOffset;
in case of audio proxy, uses this offset
Vec3 decalPos;
Vec3 dir[2];
float fDecalPlacementTestMaxSize;
float fLastTime;
last time this effect was played
uint16 inWater : 1;
effect medium in in water
uint16 inZeroG : 1;
effect medium is in zeroG
const int MAX_SOUND_PARAMS = 4;
Vec3 normal;
int numSoundParams;
uint16 padding : 12;
SMFXParticleEffectParams particleParams;
particle related
int partID;
uint16 playflags;
see EMFXPlayFlags
uint16 playSoundFP : 1;
play sound as 2D (temp until Tomas fixes!), appends "_fp" to soundname
Vec3 pos;
float scale;
float soundDistanceMult;
uint16 soundNoObstruction : 1;
don't use obstruction on sound
SMFXSoundEffectParam soundParams[MAX_SOUND_PARAMS];
float soundScale;
EntityId src;
IRenderNode* srcRenderNode;
int srcSurfaceId;
EntityId trg;
IRenderNode* trgRenderNode;
int trgSurfaceId;
bool AddSoundParam(const char* name, float val);
void ResetSoundParams();
SMFXRunTimeEffectParams();