> Another more important thing is that the island and random map
> generators don't work - any maps created with them will exit with a
> failed assertion within a few seconds of starting.  I've not been able
> to trace the source of the error - is this something you can easily fix?


$ grep ressourcesGradient *.cpp | grep new
Map.cpp: ressourcesGradient[t][r][s]=new Uint8[size];
Map.cpp: ressourcesGradient[t][r][s]=new Uint8[size];

// mhhh, two times

$ grep forbiddenGradient *.cpp | grep new
Map.cpp: forbiddenGradient[t][s] = new Uint8[size];

// mhh, one time :/


It is because the "forbiddenGradient" and "guardAreasGradient" are not
initalized into Map::addTeam(), which is used by MapGenerator. But when you load
the map, the mallocation is manualy inlined!

I "fixed" the bug and commite dit right now, but it is still inlined. Maybe one
solution would be to change the
Map::addTeam()
by
Map::initTeam(int teamNumber)
Which would actualy be mroe correct given what the method does.


Luc-Olivier


_______________________________________________
glob2-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/glob2-devel

Reply via email to