[Freeciv-Dev] Re: [PATCH] Formatting cleanup.
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
At 01:55 PM 01/09/17 +0200, Gaute B Strokkenes wrote:
>On Sat, 15 Sep 2001, rwetmore@xxxxxxxxxxxx wrote:
[...]
>I did it like that in order not to change the behaviour of the server,
>which would be out of the scope of this patch.
[...]
>--
>Big Gaute http://www.srcf.ucam.org/~gs234/
>This PIZZA symbolizes my COMPLETE EMOTIONAL RECOVERY!!
Then I don't understand why you changed the behavious of the server for
normalize_map_pos() or in the following code.
Here it explicitly tests and captures the unreal tiles. There is no
possibility of requiring a "nearest_real_pos" action.
There is however a missing normalize_map_pos, which can be handled
in the way that has previously been shown, i.e. substitute it for
the is_real_tile call and drop your unnecessary function.
Submitting a patch like this patch should really disqualify anyone
from CVS privileges. There was nothing in it that was of value, and
several things like the above that intentionally followed bad coding
paths in ways that tried to make them seem justified.
Go back an reread the earlier postings before you try this again. The
entire mailing list can't be wrong, and you should figure out a way
to admit this, rather than prolong the agony and damage to what is
left of your reputation. The quoted analogy to Clinton is very apt :-).
Cheers,
RossW
=====
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/maphand.c,v
retrieving revision 1.84
diff -u -r1.84 maphand.c
--- server/maphand.c 2001/09/02 13:37:59 1.84
+++ server/maphand.c 2001/09/11 19:00:29
@@ -952,12 +952,11 @@
struct player_tile *map_get_player_tile(int x, int y,
struct player *pplayer)
{
- if (y < 0 || y >= map.ysize) {
+ if (!is_real_tile(x, y)) {
freelog(LOG_ERROR, "Trying to get nonexistant tile at %i,%i", x, y);
- return pplayer->private_map
- + map_adjust_x(x) + map_adjust_y(y) * map.xsize;
- } else
- return pplayer->private_map + map_adjust_x(x) + y * map.xsize;
+ }
+ nearest_real_pos(&x, &y);
+ return pplayer->private_map + map_inx(x, y);
}
|
|