|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
/* $Id: field.c,v 1.9 2003/05/05 15:53:27 stpohle Exp $ */
|
|
|
|
|
/* $Id: field.c,v 1.10 2003/05/05 16:33:57 stpohle Exp $ */
|
|
|
|
|
/* field.c - procedures which are needed to control the field */
|
|
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
@ -283,6 +283,12 @@ field_new (char *filename)
|
|
|
|
|
|
|
|
|
|
// Clean and create the field //
|
|
|
|
|
if (fmap == NULL) {
|
|
|
|
|
/* if we can't load the map check first the fieldsize settings */
|
|
|
|
|
if (bman.fieldsize.x < MIN_FIELDSIZE_X)
|
|
|
|
|
bman.fieldsize.x = MIN_FIELDSIZE_X;
|
|
|
|
|
if (bman.fieldsize.x > MAX_FIELDSIZE_X)
|
|
|
|
|
bman.fieldsize.x = MAX_FIELDSIZE_X;
|
|
|
|
|
|
|
|
|
|
for (x = 0; x < bman.fieldsize.x; x++)
|
|
|
|
|
for (y = 0; y < bman.fieldsize.y; y++) {
|
|
|
|
|
if ((y == 0) || (y == bman.fieldsize.y - 1))
|
|
|
|
|