From: Enar <eva...@us...> - 2007-01-07 16:37:45
|
Update of /cvsroot/planeshift/planeshift/src/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19103 Modified Files: gem.h gem.cpp usermanager.cpp Log Message: Sitting is now possible only when the character is not moving and on the ground. Index: gem.h =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/gem.h,v retrieving revision 1.178 retrieving revision 1.179 diff -C2 -d -r1.178 -r1.179 *** gem.h 16 Dec 2006 01:01:25 -0000 1.178 --- gem.h 7 Jan 2007 16:37:41 -0000 1.179 *************** *** 428,432 **** uint8_t DRcounter; /// increments in loop to prevent out of order packet overwrites of better data csTicks lastDR; - bool moving; /** Production Start Pos is used to record the place where people started digging. */ --- 428,431 ---- *************** *** 604,607 **** --- 603,608 ---- bool IsFalling() { return isFalling; } + bool AtRest() const { return atRest; } + virtual bool GetVisibility() { return visible; } virtual void SetVisibility(bool visible); Index: gem.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/gem.cpp,v retrieving revision 1.399 retrieving revision 1.400 diff -C2 -d -r1.399 -r1.400 *** gem.cpp 5 Jan 2007 18:59:49 -0000 1.399 --- gem.cpp 7 Jan 2007 16:37:41 -0000 1.400 *************** *** 1608,1612 **** lastDR = 0; DRcounter = 0; - moving = 0; // Set the initial valid location to be the spot the actor was created at. --- 1608,1611 ---- Index: usermanager.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/usermanager.cpp,v retrieving revision 1.279 retrieving revision 1.280 diff -C2 -d -r1.279 -r1.280 *** usermanager.cpp 21 Dec 2006 11:54:52 -0000 1.279 --- usermanager.cpp 7 Jan 2007 16:37:41 -0000 1.280 *************** *** 273,277 **** else if (msg.command == "/sit" ) { ! if ((msg.filter == "down" || msg.filter == "") && client->GetActor()->GetMode() == PSCHARACTER_MODE_PEACE) { client->GetActor()->SetMode(PSCHARACTER_MODE_SIT); --- 273,278 ---- else if (msg.command == "/sit" ) { ! if ((msg.filter == "down" || msg.filter == "") && client->GetActor()->GetMode() == PSCHARACTER_MODE_PEACE && ! client->GetActor()->AtRest() && !client->GetActor()->IsFalling()) { client->GetActor()->SetMode(PSCHARACTER_MODE_SIT); |