Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2002:
[Freeciv-Dev] Re: Unit move rate cleanup (PR#1343)
Home

[Freeciv-Dev] Re: Unit move rate cleanup (PR#1343)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Unit move rate cleanup (PR#1343)
From: "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx>
Date: Mon, 25 Mar 2002 00:40:19 -0800 (PST)

On Sun, 24 Mar 2002, Raahul Kumar wrote:
> This cleans up unit move rate by getting rid of struct player *pplayer and
> replacing val with move_rate. I've also made it return a static int, and
> introduced an assert and -1 return value for errors.

 /***************************************************************
-...
+Unit move rate calculates the move rate of the unit taking into
+account the penalty for reduced hitpoints(affects sea and land units

Nitpick:                                  ^--space

+  default:
+    assert(0);
+    exit(1);
+    move_rate = -1;

No, never exit(1) when the game can be continued in a playable state!

And if you must exit, first call freelog(LOG_FATAL, ...) for a proper
error message, and then do exit(EXIT_FAILURE).

Other than that, I think the patch is very good and should go in.

Yours,
Per

"Capitalism is the extraordinary belief that the nastiest of men,
for the nastiest of reasons, will somehow work for the benefit of
us all." -- John Maynard Keynes




[Prev in Thread] Current Thread [Next in Thread]