[Freeciv-Dev] settlers & players territory
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
With this patch autosettlers don't treat allies as enemies.
(They used to do nothing if ally unit is near)
I changed the meaning of territory[][] table.
was now
one player near | 1<<player_no | 1<<player_no
more players near| 0 | bitfield
noone near | 0xFFFFFFFF | 0
Also added:
+static int enemy_bits[MAX_NUM_PLAYERS];
It is bitmask for each player recalculated each turn.
It is used like:
+ && !(territory[x][y]&enemy_bits[pplayer->player_no])
instead of:
- && (territory[x][y]&(1<<pplayer->player_no))
---
Is anyone cleaning up settlers.c?
---
mateusz
enemy-territory.0.diff
Description: Binary data
- [Freeciv-Dev] settlers & players territory,
mateusz stefek <=
|
|