version 1.23 | | version 1.24 |
---|
| | |
/* | | /* |
* static char *rcsid_map_c = | | * static char *rcsid_map_c = |
* "$Id: map.c,v 1.23 2001/09/18 21:24:54 avogl Exp $"; | | * "$Id: map.c,v 1.24 2001/10/07 06:45:39 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
| | Copyright (C) 2001 Mark Wedel & Crossfire Development Team |
Copyright (C) 1992 Frank Tore Johansen | | Copyright (C) 1992 Frank Tore Johansen |
Copyright (C) 2000 Mark Wedel | | |
| | |
This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify |
it under the terms of the GNU General Public License as published by | | it under the terms of the GNU General Public License as published by |
| | |
along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software |
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| | |
The author can be reached via e-mail to mwedel@scruz.net | | The authors can be reached via e-mail at crossfire-devel@real-time.com |
*/ | | */ |
| | |
| | |
| | |
} | | } |
switch(i) { | | switch(i) { |
case LL_NORMAL: | | case LL_NORMAL: |
insert_ob_in_map(op,m,op,INS_NO_MERGE | INS_NO_WALK_ON); | | insert_ob_in_map(op,m,op,INS_NO_MERGE | INS_NO_WALK_ON | INS_ON_TOP); |
if (op->inv) sum_weight(op); | | if (op->inv) sum_weight(op); |
prev=op,last_more=op; | | prev=op,last_more=op; |
break; | | break; |
| | |
middle = tmp->face; | | middle = tmp->face; |
anywhere =1; | | anywhere =1; |
} | | } |
/* Find the highest visible face around */ | | /* Find the highest visible face around. If equal |
else if (tmp->face->visibility > middle->visibility && !anywhere) | | * visibilities, we still want the one nearer to the |
| | * top |
| | */ |
| | else if (middle == blank_face || (tmp->face->visibility > middle->visibility && !anywhere)) |
middle = tmp->face; | | middle = tmp->face; |
} | | } |
if (tmp==tmp->above) { | | if (tmp==tmp->above) { |
| | |
/* Fill in top if needed */ | | /* Fill in top if needed */ |
if (top == blank_face) { | | if (top == blank_face) { |
top = tmp->face; | | top = tmp->face; |
| | if (top == middle) middle=blank_face; |
} else { | | } else { |
/* top is already set - we should only get here if | | /* top is already set - we should only get here if |
* middle is not set | | * middle is not set |