| 3781 | |
| 3782 | |
| 3783 | long 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 | //************************************************************************************* |
no test coverage detected