MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / CreateParticleLine

Method CreateParticleLine

CrySystem/ScriptObjectParticle.cpp:221–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221int CScriptObjectParticle::CreateParticleLine(IFunctionHandler *pH)
222{
223CHECK_PARAMETERS(4);
224 _SmartScriptObject pObj(m_pScriptSystem,true);
225 CScriptObjectVector oVec(m_pScriptSystem,true);
226 CScriptObjectColor oCol(m_pScriptSystem,true);
227 Vec3 v3Pos,v3SysDir,v3Offset(0,0,0), vSpaceLoopBoxSize(0,0,0);
228
229 float fDensity;
230
231 pH->GetParam(1,*oVec);
232 v3Pos=oVec.Get();
233 pH->GetParam(2,*oVec);
234 v3SysDir=oVec.Get();
235 pH->GetParam(3,*pObj);
236 pH->GetParam(4,fDensity);
237
238 float focus = 0;
239 Vec3 col;
240 Vec3 vcol(0,0,0);//dummy
241
242 float speed = 0;
243 int count = 0;
244
245 float size = 1;
246 float size_speed = 0;
247
248 float gravity = 0;
249 float lifetime = 0;
250
251 int tid = 0;
252 int frames = 0;
253
254 int color_based_blending = 0;
255
256 int iParticleType = 0;
257
258 float fTailLength = 0.0f;
259
260 int bRealPhys = 0;
261
262 if(!pObj->GetValue( "color",*oCol ))
263 m_pScriptSystem->RaiseError( "<CreateParticles> color field not specified" );
264 vcol = oCol.Get();
265 if(!pObj->GetValue( "focus",focus ))
266 m_pScriptSystem->RaiseError( "<CreateParticles> focus field not specified" );
267 if(!pObj->GetValue( "speed",speed ))
268 m_pScriptSystem->RaiseError( "<CreateParticles> speed field not specified" );
269 if(!pObj->GetValue( "count",count ))
270 m_pScriptSystem->RaiseError( "<CreateParticles> count field not specified" );
271 if(!pObj->GetValue( "size" ,size ))
272 m_pScriptSystem->RaiseError( "<CreateParticles> size field not specified" );
273
274 pObj->GetValue( "size_speed",size_speed ) ;
275
276 if(!pObj->GetValue( "gravity",gravity ))
277 m_pScriptSystem->RaiseError( "<CreateParticles> gravity field not specified" );
278 if(!pObj->GetValue( "lifetime",lifetime )){

Callers

nothing calls this directly

Calls 7

RaiseErrorMethod · 0.80
EndFunctionMethod · 0.80
GetParamMethod · 0.45
GetMethod · 0.45
GetValueMethod · 0.45
LengthMethod · 0.45
SpawnParticlesMethod · 0.45

Tested by

no test coverage detected