diff --git a/documentation/changeLog.txt b/documentation/changeLog.txt index 14ad3c26e..6873e453f 100644 --- a/documentation/changeLog.txt +++ b/documentation/changeLog.txt @@ -10,6 +10,10 @@ Server Fixes --Fixed bug that caused Eve spawn to jump to the west of a donkeytown homeland. Fixes #633. +--New method for putting Eve to west of homelands. Completely ignore any + d-town or tutorial homelands, and compute the average location of the rest. + Place Eve to the west of the furthest-west homeland that is not > 1500 to the + west of this average. diff --git a/server/map.cpp b/server/map.cpp index 383015c10..900e844a5 100644 --- a/server/map.cpp +++ b/server/map.cpp @@ -539,7 +539,10 @@ typedef struct Homeland { // did the creation of this homeland tapout-trigger // a +primaryHomeland object? char primary; - + + // should Eve placement ignore this homeland? + char ignoredForEve; + } Homeland; @@ -6958,6 +6961,7 @@ static char runTapoutOperation( int inX, int inY, // from server.cpp extern int getPlayerLineage( int inID ); +extern char isPlayerIgnoredForEvePlacement( int inID ); @@ -7311,7 +7315,8 @@ void setMapObjectRaw( int inX, int inY, int inID ) { false, // changed true, - tappedOutPrimaryHomeland }; + tappedOutPrimaryHomeland, + isPlayerIgnoredForEvePlacement( p ) }; homelands.push_back( newH ); } else if( h->expired ) { @@ -8461,7 +8466,8 @@ void getEvePosition( const char *inEmail, int inID, int *outX, int *outY, for( int i=0; iexpired ) { + // any d-town or tutorial homelands are ignored + if( ! h->expired && ! h->ignoredForEve ) { homelandXCount ++; homelandXSum += h->x; } @@ -8474,11 +8480,11 @@ void getEvePosition( const char *inEmail, int inID, int *outX, int *outY, Homeland *h = homelands.getElement( i ); - // d-town placed 20K away - // by looking for homelands not more than 9K past average - // in negative (west) direction - // we avoid d-town homelands - if( ! h->expired && h->x > homelandXAve - 9000 ) { + // avoid extreme outlier homelands that are more + // than 1500 to the West of the average homeland location + if( ! h->expired && ! h->ignoredForEve && + h->x > homelandXAve - 1500 ) { + int xBoundary = h->x - 2 * h->radius; if( xBoundary < ave.x ) { diff --git a/server/server.cpp b/server/server.cpp index 5b13011d3..4375ec07e 100644 --- a/server/server.cpp +++ b/server/server.cpp @@ -1587,6 +1587,18 @@ int getPlayerLineage( int inID ) { +char isPlayerIgnoredForEvePlacement( int inID ) { + LiveObject *o = getLiveObject( inID ); + if( o != NULL ) { + return ( o->curseStatus.curseLevel > 0 ) || o->isTutorial; + } + + // player id doesn't even exist + return true; + } + + + static double pickBirthCooldownSeconds() { // Kumaraswamy distribution