Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
hetuw committed Jul 17, 2020
2 parents efc31f7 + 0d3e99f commit ac9716f
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 7 deletions.
23 changes: 23 additions & 0 deletions documentation/changeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,29 @@ This file only list changes to game code. Changes to content can be found here:
http://onehouronelife.com/updateLog.php



Version 350 2020-July-16

--Support for +causeAutoOrientV tag (opposite of +causeAutoOrientH).

--Fixed color of background box in category editor to not interfere with long
text.

--Support for -wall tag in object description, to push what would otherwise be
drawn in the wall layer into the non-wall layer (so that pipes through fences
can visually connect properly, and not overlap other pipes in a weird way).





Server Fixes

--Fixed rare crash when client sends an illegal chat character (impossible with
official client) when character is drunk.



Version 348 2020-July-10

--Support for moving objects that leave floors behind, or land on and change
Expand Down
2 changes: 1 addition & 1 deletion gameSource/EditorCategoryPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ void EditorCategoryPage::draw( doublePair inViewCenter,

doublePair pos = { 200, 150 };

setDrawColor( 1, 1, 1, 1 );
setDrawColor( 0.75, 0.75, 0.75, 1 );
drawSquare( pos, 50 );

if( mCurrentObject != -1 ) {
Expand Down
2 changes: 1 addition & 1 deletion gameSource/game.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
int versionNumber = 348;
int versionNumber = 350;
int dataVersionNumber = 0;

int binVersionNumber = versionNumber;
Expand Down
17 changes: 14 additions & 3 deletions gameSource/objectBank.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -591,9 +591,15 @@ static void setupWall( ObjectRecord *inR ) {
}

if( inR->wallLayer ) {
char *frontWallPos = strstr( inR->description, "+frontWall" );
if( frontWallPos != NULL ) {
inR->frontWall = true;
char *noWallPos = strstr( inR->description, "-wall" );
if( noWallPos != NULL ) {
inR->wallLayer = false;
}
else {
char *frontWallPos = strstr( inR->description, "+frontWall" );
if( frontWallPos != NULL ) {
inR->frontWall = true;
}
}
}
}
Expand Down Expand Up @@ -904,6 +910,7 @@ float initObjectBankStep() {

r->isAutoOrienting = false;
r->causeAutoOrientHOnly = false;
r->causeAutoOrientVOnly = false;
r->horizontalVersionID = -1;
r->verticalVersionID = -1;
r->cornerVersionID = -1;
Expand Down Expand Up @@ -2356,6 +2363,9 @@ void initObjectBankFinish() {
if( strstr( o->description, "+causeAutoOrientH" ) ) {
o->causeAutoOrientHOnly = true;
}
else if( strstr( o->description, "+causeAutoOrientV" ) ) {
o->causeAutoOrientVOnly = true;
}
}
}
}
Expand Down Expand Up @@ -3784,6 +3794,7 @@ int addObject( const char *inDescription,

r->isAutoOrienting = false;
r->causeAutoOrientHOnly = false;
r->causeAutoOrientVOnly = false;
r->horizontalVersionID = -1;
r->verticalVersionID = -1;
r->cornerVersionID = -1;
Expand Down
1 change: 1 addition & 0 deletions gameSource/objectBank.h
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ typedef struct ObjectRecord {
// all three objects know the IDs of all three objects
char isAutoOrienting;
char causeAutoOrientHOnly;
char causeAutoOrientVOnly;
int horizontalVersionID;
int verticalVersionID;
int cornerVersionID;
Expand Down
5 changes: 4 additions & 1 deletion server/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6761,7 +6761,10 @@ static int neighborWallAgree( int inX, int inY, ObjectRecord *inSetO,

if( nO->isAutoOrienting ) {

if( n < 2 ||
if( // watch for E/W neighbors that aren't supposed to affect
// us
( n < 2 && ! nO->causeAutoOrientVOnly )
||
// watch for N/S neighbors that aren't supposed to
// affect us
( n >= 2 && ! nO->causeAutoOrientHOnly ) ) {
Expand Down
11 changes: 10 additions & 1 deletion server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20797,7 +20797,16 @@ int main() {
}
}

makePlayerSay( nextPlayer, m.saidText );
// trim whitespace and make sure we're not
// adding an empty string
// empty or whitespace strings causes trouble
// elsewhere in code
char *cleanSay = trimWhitespace( m.saidText );

if( strcmp( cleanSay, "" ) != 0 ) {
makePlayerSay( nextPlayer, cleanSay );
}
delete [] cleanSay;
}
else if( m.type == KILL ) {
playerIndicesToSendUpdatesAbout.push_back( i );
Expand Down

0 comments on commit ac9716f

Please sign in to comment.