MCPcopy Create free account
hub / github.com/JACoders/OpenJK / FX_AddPrimitive

Function FX_AddPrimitive

code/cgame/FxUtil.cpp:387–400  ·  view source on GitHub ↗

from FXScheduler.cpp so i don't have to pass it in on EVERY FX_ADD

Source from the content-addressed store, hash-verified

385//-------------------------
386extern bool gEffectsInPortal; //from FXScheduler.cpp so i don't have to pass it in on EVERY FX_ADD*
387void FX_AddPrimitive( CEffect **pEffect, int killTime )
388{
389 SEffectList *item = FX_GetValidEffect();
390
391 item->mEffect = *pEffect;
392 item->mKillTime = theFxHelper.mTime + killTime;
393 item->mPortal = gEffectsInPortal; //global set in AddScheduledEffects
394
395 activeFx++;
396
397 // Stash these in the primitive so it has easy access to the vals
398 (*pEffect)->SetTimeStart( theFxHelper.mTime );
399 (*pEffect)->SetTimeEnd( theFxHelper.mTime + killTime );
400}
401
402
403//-------------------------

Callers 12

CG_AddSaberBladeGoFunction · 0.70
FX_AddParticleFunction · 0.70
FX_AddLineFunction · 0.70
FX_AddElectricityFunction · 0.70
FX_AddTailFunction · 0.70
FX_AddCylinderFunction · 0.70
FX_AddEmitterFunction · 0.70
FX_AddLightFunction · 0.70
FX_AddOrientedParticleFunction · 0.70
FX_AddPolyFunction · 0.70
FX_AddBezierFunction · 0.70
FX_AddFlashFunction · 0.70

Calls 3

FX_GetValidEffectFunction · 0.70
SetTimeStartMethod · 0.45
SetTimeEndMethod · 0.45

Tested by

no test coverage detected