=== modified file 'src/tron/gWinZone.cpp' --- src/tron/gWinZone.cpp 2008-08-24 00:23:54 +0000 +++ src/tron/gWinZone.cpp 2009-01-12 06:31:29 +0000 @@ -3489,7 +3489,29 @@ { return; } - + //check to see if player already has a flag + bool playerHasFlag = false; + const tList& gameObjects = Grid()->GameObjects(); + for (int i=gameObjects.Len()-1;i>=0;i--) + { + gFlagZoneHack *otherFlag=dynamic_cast(gameObjects(i)); + if ((otherFlag)){ + if (otherFlag->Owner()){ + //make sure they are on the oposite team else pointless to continue + if(otherFlag->Team() != target->Player()->CurrentTeam()) + { + ePlayerNetID *flagHolder = otherFlag->Owner()->Player(); + if (flagHolder){ + if (flagHolder == target->Player()) + { + playerHasFlag = true; + } + } + } + } + } + } + // check if the player is on our team or not (check will fail if team not enabled) if (target->Player()->CurrentTeam() == team) { @@ -3505,7 +3527,7 @@ } } // check if this player dropped the flag previously - else if ((target != ownerDropped_) || (time > (ownerDroppedTime_ + sg_flagDropTime))) + else if (((target != ownerDropped_) || (time > (ownerDroppedTime_ + sg_flagDropTime))) && (!playerHasFlag)) { // take the flag owner_ = target; === modified file 'src/tron/gWinZone.h' --- src/tron/gWinZone.h 2008-08-24 00:23:54 +0000 +++ src/tron/gWinZone.h 2009-01-12 06:32:44 +0000 @@ -302,6 +302,7 @@ void GoHome(); void RemoveOwner(); void OwnerDropped(); + gCycle* Owner(){return owner_;} protected: bool init_;