In Harry Potter and the Deathly Hallows: Part 2 (2011), even though he’s fighting on the other side, Snape is still helping the Order of the Phoenix.
In particular, this is seen when he not only doesn't attack, but also when he re-directs McGonagall’s spells to the Death Eaters behind him.