| 5654 | } |
| 5655 | |
| 5656 | bool GuideBot::DoUse(int me) { |
| 5657 | int p_handle; |
| 5658 | int sad_sound; |
| 5659 | int buddy_handle; |
| 5660 | |
| 5661 | // NOTE: Use is done on the inventory item and/or the real guidebot |
| 5662 | // don't set and guidebot global variables in here. Do it in the |
| 5663 | // EVT_CREATE in the f_valid block |
| 5664 | |
| 5665 | gb_com command; |
| 5666 | |
| 5667 | Obj_Value(me, VF_GET, OBJV_I_PARENT_HANDLE, &p_handle); |
| 5668 | |
| 5669 | if (p_handle == OBJECT_HANDLE_NONE) { |
| 5670 | p_handle = memory->my_player; |
| 5671 | } else { |
| 5672 | memory->my_player = p_handle; |
| 5673 | } |
| 5674 | |
| 5675 | mprintf(0, "1 Player %d\n", p_handle); |
| 5676 | mprintf(0, "2 Player %d\n", memory->my_player); |
| 5677 | |
| 5678 | Player_Value(p_handle, VF_GET, PLYV_I_BUDDY_HANDLE, &buddy_handle); |
| 5679 | |
| 5680 | command.action = COM_REINIT; |
| 5681 | tOSIRISEventInfo ei; |
| 5682 | ei.extra_info = (void *)&command; |
| 5683 | ei.evt_ai_notify.notify_type = AIN_USER_DEFINED; |
| 5684 | |
| 5685 | return Obj_CallEvent(buddy_handle, EVT_AI_NOTIFY, &ei); |
| 5686 | } |
| 5687 | |
| 5688 | bool GuideBot::DoInit(int me, bool f_reinit) { |
| 5689 | vector fvec; |
nothing calls this directly
no test coverage detected