MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / executeScriptEvent

Method executeScriptEvent

Engine/source/afx/afxMagicSpell.cpp:1683–1703  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1681}
1682
1683void afxMagicSpell::executeScriptEvent(const char* method, afxConstraint* cons,
1684 const MatrixF& xfm, const char* data)
1685{
1686 SceneObject* cons_obj = (cons) ? cons->getSceneObject() : NULL;
1687
1688 char *arg_buf = Con::getArgBuffer(256);
1689 Point3F pos;
1690 xfm.getColumn(3,&pos);
1691 AngAxisF aa(xfm);
1692 dSprintf(arg_buf,256,"%g %g %g %g %g %g %g",
1693 pos.x, pos.y, pos.z,
1694 aa.axis.x, aa.axis.y, aa.axis.z, aa.angle);
1695
1696 // CALL SCRIPT afxChoreographerData::method(%spell, %caster, %constraint, %transform, %data)
1697 Con::executef(mExeblock, method,
1698 getIdString(),
1699 (mCaster) ? mCaster->getIdString() : "",
1700 (cons_obj) ? cons_obj->getIdString() : "",
1701 arg_buf,
1702 data);
1703}
1704
1705void afxMagicSpell::inflictDamage(const char * label, const char* flavor, SimObjectId target_id,
1706 F32 amount, U8 n, F32 ad_amount, F32 radius, Point3F pos, F32 impulse)

Callers 1

ea_updateMethod · 0.45

Calls 6

getArgBufferFunction · 0.85
dSprintfFunction · 0.85
executefFunction · 0.85
getColumnMethod · 0.80
getIdStringMethod · 0.80
getSceneObjectMethod · 0.45

Tested by

no test coverage detected