version 1.6 | | version 1.7 |
---|
| | |
/* | | /* |
* static char *rcsid_skills_c = | | * static char *rcsid_skills_c = |
* "$Id: skills.c,v 1.6 2000/05/26 09:50:49 jec Exp $"; | | * "$Id: skills.c,v 1.7 2000/05/29 16:31:26 jec Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
| | |
void do_throw(object *op, object *toss_item, int dir) { | | void do_throw(object *op, object *toss_item, int dir) { |
object *throw_ob=toss_item, *left=NULL; | | object *throw_ob=toss_item, *left=NULL; |
| | tag_t left_tag; |
int eff_str = 0,maxc,str=op->stats.Str,dam=0; | | int eff_str = 0,maxc,str=op->stats.Str,dam=0; |
int pause_f,weight_f=0; | | int pause_f,weight_f=0; |
float str_factor=1.0,load_factor=1.0,item_factor=1.0; | | float str_factor=1.0,load_factor=1.0,item_factor=1.0; |
| | |
} /* if object can't be thrown */ | | } /* if object can't be thrown */ |
| | |
left = throw_ob; /* these are throwing objects left to the player */ | | left = throw_ob; /* these are throwing objects left to the player */ |
| | left_tag = left->count; |
| | |
/* sometimes get_split_ob can't split an object (because op->nrof==0?) | | /* sometimes get_split_ob can't split an object (because op->nrof==0?) |
* and returns NULL. We must use 'left' then | | * and returns NULL. We must use 'left' then |
| | |
esrv_del_item(op->contr, left->count); | | esrv_del_item(op->contr, left->count); |
} | | } |
else if (op->type==PLAYER) { | | else if (op->type==PLAYER) { |
if (QUERY_FLAG(left, FLAG_FREED)) | | if (was_destroyed (left, left_tag)) |
esrv_del_item(op->contr, left->count); | | esrv_del_item(op->contr, left_tag); |
else | | else |
esrv_update_item(UPD_NROF, op, left); | | esrv_update_item(UPD_NROF, op, left); |
} | | } |