Baby Cribs, Playing Cops and Robbers, and Locking Doors on Shabbos

Does the Shabbos melacha of tzad (trapping) apply to people or only to animals? The Gemara discusses a case where you intend to trap a fish and he ends up saving someone from drowning.