Recently, peer-to-peer infrastructure has been proposed to support massively multiplayer games in the literature. However, when underlying network partitions due to network outages, the game world will partition into several parallel game worlds and it is difficult and costly to merge them when the network partitions disappear. Existing approaches resort to a centralized server to arbitrate. Aiming at mitigating the effects brought by network partitions, we propose a fully distributed algorithm based on state-stack matching. Our theoretical analysis and numerical results show that our approach can resolve the merging issue at the least loss of game states with high probability.