[crossfire] r21264 broke the server build

Preston Crow pc-crossfire06 at crowcastle.net
Thu Aug 13 15:55:35 CDT 2020


Oops.  Stupid partial commit.  I'll revert that.  Sorry!

On 2020-08-13 16:51, Kevin Zheng wrote:
> Hi there,
>
> It looks like r21264 broke the server build for several of us. The
> offending part of the diff is:
>
> diff --git a/common/map.c b/common/map.c
> index 724cbccc..7175f3d0 100644
> --- a/common/map.c
> +++ b/common/map.c
> @@ -652,6 +652,21 @@ static void load_objects(mapstruct *m, FILE *fp,
> int mapflags) {
>               continue;
>           }
>
> +        /*
> +         * Generators normally start with a speed_left of -0.1.  They
> +         * trigger as soon as they go positive, then get 1 subtracted from
> +         * their speed_left.  If asked to randomize the times to avoid
> +         * waves of monsters from identical generators, we set the
> +         * speed_left to a random value between -0.6 and +0.4, so the
> +         * average is still the same.
> +         *
> +         * Note the comparison is tricky, as it has to be cast exactly the
> +         * same way it's set in arch.c:first_arch_pass()
> +         */
> +        if ( settings.generator_init_time_random && QUERY_FLAG(op,
> FLAG_GENERATOR) && op->speed_left == (float)-0.1 ) {
> +            op->speed_left = (cf_random() % 100000) / 100000. - 0.6;
> +        }
> +
>
> Specifically, there's no settings.generator_init_time_random.
>
> Did you mean to have this change in a separate commit?
>
> Thanks,
> Kevin


More information about the crossfire mailing list