MCPcopy Create free account
hub / github.com/arx/ArxLibertatis / SendInitScriptEvent

Function SendInitScriptEvent

Sources/DANAE/ARX_Script.cpp:3783–3820  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3781
3782
3783long SendInitScriptEvent(INTERACTIVE_OBJ * io)
3784{
3785 if (!io) return -1;
3786
3787 INTERACTIVE_OBJ * oes = EVENT_SENDER;
3788 EVENT_SENDER = NULL;
3789 long num = GetInterNum(io);
3790
3791 if (ValidIONum(num))
3792 {
3793 if (inter.iobj[num] && inter.iobj[num]->script.data)
3794 {
3795 GLOB = 0;
3796 SendScriptEvent(&inter.iobj[num]->script, SM_INIT, "", inter.iobj[num], NULL);
3797 }
3798
3799 if (inter.iobj[num] && inter.iobj[num]->over_script.data)
3800 {
3801 GLOB = 0;
3802 SendScriptEvent(&inter.iobj[num]->over_script, SM_INIT, "", inter.iobj[num], NULL);
3803 }
3804
3805 if (inter.iobj[num] && inter.iobj[num]->script.data)
3806 {
3807 GLOB = 0;
3808 SendScriptEvent(&inter.iobj[num]->script, SM_INITEND, "", inter.iobj[num], NULL);
3809 }
3810
3811 if (inter.iobj[num] && inter.iobj[num]->over_script.data)
3812 {
3813 GLOB = 0;
3814 SendScriptEvent(&inter.iobj[num]->over_script, SM_INITEND, "", inter.iobj[num], NULL);
3815 }
3816 }
3817
3818 EVENT_SENDER = oes;
3819 return ACCEPT;
3820}
3821
3822//*************************************************************************************
3823//*************************************************************************************

Callers 9

ARX_SPELLS_LaunchFunction · 0.85
ARX_SPELLS_UpdateFunction · 0.85
ApplySPWepFunction · 0.85
ApplySPBowFunction · 0.85
ApplySPArmFunction · 0.85
CloneIOItemFunction · 0.85
ARX_CHANGELEVEL_Pop_IOFunction · 0.85
SendScriptEventFunction · 0.85
TakeFromInventoryFunction · 0.85

Calls 3

GetInterNumFunction · 0.85
ValidIONumFunction · 0.85
SendScriptEventFunction · 0.85

Tested by

no test coverage detected