Complex sentence: The riflemen in the fort held out, mainly because the British guns became stuck in snow drifts, but as the British main body threatened to surround them, they retreated and abandoned the town.
Split into simpler sentences: The riflemen in the fort held out, mainly because the guns became stuck in snow drifts. However, as the British main body threatened to surround them, they retreated and abandoned the town.