From: Ian Jackson Date: Sat, 3 Apr 2021 17:44:06 +0000 (+0100) Subject: clock: Allow clearing another player from a place at the clock X-Git-Tag: otter-0.5.0~228 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=ade615d0a011d869d726911c3d7ae6eb7469bc83;p=otter.git clock: Allow clearing another player from a place at the clock I don't think this really calls for Wresting. It's not like you'd do it by mistake. Signed-off-by: Ian Jackson --- diff --git a/src/clock.rs b/src/clock.rs index 46d405ec..1102c13a 100644 --- a/src/clock.rs +++ b/src/clock.rs @@ -659,11 +659,8 @@ impl PieceTrait for Clock { }, "unclaim-x" | "unclaim-y" => { let user = get_user(); - if state.users[user].player != player { - throw!(OE::BadPieceStateForOperation); - } state.users[user].player = default(); - (Unpredictable, format!("released player {} at the", user)) + (Unpredictable, format!("cleared player {} at the", user)) }, _ => { throw!(OE::BadPieceStateForOperation);