Warped Coast/Sea split correct on small spheres

This commit is contained in:
Zeno Rogue 2017-10-29 14:29:31 +01:00
parent 00d61aae1c
commit 96978027a5
1 changed files with 26 additions and 7 deletions

View File

@ -1474,14 +1474,33 @@ auto cellhooks = addHook(clearmemory, 500, clearCellMemory);
int getHemisphere(cell *c, int which) {
if(torus) return 0;
if(c->type != 6) {
if(ctof(c)) {
int id = c->master->fiftyval;
int hemitable[3][12] = {
{ 6, 3, 3, 3, 3, 3,-6,-3,-3,-3,-3,-3},
{ 6, 3, 6, 3, 0, 0,-6,-3,-6,-3, 0, 0},
{-3, 0, 3, 0,-6,-6, 3, 0,-3, 0, 6, 6}
};
return hemitable[which][id];
if(S7 == 5) {
int hemitable[3][12] = {
{ 6, 3, 3, 3, 3, 3,-6,-3,-3,-3,-3,-3},
{ 6, 3, 6, 3, 0, 0,-6,-3,-6,-3, 0, 0},
{-3, 0, 3, 0,-6,-6, 3, 0,-3, 0, 6, 6}
};
return hemitable[which][id];
}
else if(S7 == 4) {
int hemitable[3][6] = {
{ 2, 2, 2,-1,-1,-1},
{ 2,-1, 2, 2,-1,-1},
{ 2,-1,-1, 2, 2,-1},
};
return hemitable[which][id];
}
else if(S7 == 3) {
int hemitable[3][4] = {
{ 2, 2,-1,-1},
{ 2,-1, 2,-1},
{ 2,-1,-1, 2},
};
return hemitable[which][id];
}
else return 0;
}
else {
int score = 0;