version 1.69 | | version 1.70 |
---|
| | |
/* | | /* |
* static char *rcsid_c_object_c = | | * static char *rcsid_c_object_c = |
* "$Id: c_object.c,v 1.69 2005/10/03 03:29:41 cavesomething Exp $"; | | * "$Id: c_object.c,v 1.70 2005/10/18 16:54:31 gros Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
{ | | { |
char buf[MAX_BUF]; | | char buf[MAX_BUF]; |
object *floor; | | object *floor; |
event *evt; | | |
| | |
if (QUERY_FLAG(tmp, FLAG_NO_DROP)) { | | if (QUERY_FLAG(tmp, FLAG_NO_DROP)) { |
#if 0 | | #if 0 |
| | |
esrv_del_item (op->contr, tmp2_tag); | | esrv_del_item (op->contr, tmp2_tag); |
else | | else |
esrv_send_item (op, tmp2); | | esrv_send_item (op, tmp2); |
}; | | } |
} else | | } else |
remove_ob (tmp); | | remove_ob (tmp); |
/* GROS: Handle for plugin drop event */ | | /* Lauwenmark: Handle for plugin drop event */ |
if ((evt = find_event(tmp, EVENT_DROP)) != NULL) | | if (execute_event(tmp, EVENT_DROP,op,NULL,NULL,SCRIPT_FIX_ALL)!= 0) |
{ | | return; |
CFParm CFP; | | |
CFParm *CFR; | | |
int k, l, m, rtn_script; | | |
m = 0; | | |
k = EVENT_DROP; | | |
l = SCRIPT_FIX_ALL; | | |
CFP.Value[0] = &k; | | |
CFP.Value[1] = op; | | |
CFP.Value[2] = tmp; | | |
CFP.Value[3] = NULL; | | |
CFP.Value[4] = NULL; | | |
CFP.Value[5] = &nrof; | | |
CFP.Value[6] = &m; | | |
CFP.Value[7] = &m; | | |
CFP.Value[8] = &l; | | |
CFP.Value[9] = (void*)evt->hook; | | |
CFP.Value[10]= (void*)evt->options; | | |
if (findPlugin(evt->plugin)>=0) | | |
{ | | |
CFR = ((PlugList[findPlugin(evt->plugin)].eventfunc) (&CFP)); | | |
rtn_script = *(int *)(CFR->Value[0]); | | |
if (rtn_script!=0) return; | | |
} | | |
} | | |
if (QUERY_FLAG (tmp, FLAG_STARTEQUIP)) { | | if (QUERY_FLAG (tmp, FLAG_STARTEQUIP)) { |
sprintf(buf,"You drop the %s.", query_name(tmp)); | | sprintf(buf,"You drop the %s.", query_name(tmp)); |
new_draw_info(NDI_UNIQUE, 0,op,buf); | | new_draw_info(NDI_UNIQUE, 0,op,buf); |