BF2:Switching classes when revived

From BattleWiki

Occasionally when a person is revived from the death by a medic, their kit will change. This is not a bug. This happens because when revived, you simply pick up the nearest kit, and if someone died on top of you or took your kit after you bit it, you'll simply get whatever's closest to your body (or, reportedly, an assault kit if there's nothing nearby for some reason).

You can actually gain locked weapons this way too. Even if you haven't unlocked a certain weapon, you will pick it up from the nearest kit if the original owner was using it.

Occasionally, if you are a medic, your teammate might take your kit and revive you with it. You will get theirs when revived.