version 1.176 | | version 1.177 |
---|
| | |
/* | | /* |
* static char *rcsid_apply_c = | | * static char *rcsid_apply_c = |
* "$Id: apply.c,v 1.176 2006/09/04 07:21:05 mwedel Exp $"; | | * "$Id: apply.c,v 1.177 2006/09/09 20:32:12 qal21 Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
else { | | else { |
/* player is trying to board a transport */ | | /* player is trying to board a transport */ |
int pc=0, p_limit; | | int pc=0, p_limit; |
object *inv; | | object *inv, *old_transport; |
const char *kv; | | const char *kv; |
| | |
if (aflag & AP_UNAPPLY) return 1; | | if (aflag & AP_UNAPPLY) return 1; |
| | |
return 1; | | return 1; |
} | | } |
| | |
| | /* If the player is holding the transport, drop it. */ |
| | if (transport->env == pl) { |
| | old_transport = transport; |
| | transport = drop_object(pl, transport, 1); |
| | /* Did it fail to drop? */ |
| | if(!transport) { |
| | new_draw_info_format(NDI_UNIQUE, 0, pl, |
| | "You need to drop the %s to use it.", |
| | query_name(old_transport)); |
| | return 1; |
| | } |
| | } |
| | |
/* Does this transport have space for more players? */ | | /* Does this transport have space for more players? */ |
for (inv=transport->inv; inv; inv=inv->below) { | | for (inv=transport->inv; inv; inv=inv->below) { |
if (inv->type == PLAYER) pc++; | | if (inv->type == PLAYER) pc++; |