| 1681 | } |
| 1682 | |
| 1683 | void 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 | |
| 1705 | void 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) |
no test coverage detected