mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Add pit win conditions #34
This commit is contained in:
1 parent
f2de67b338
commit
82cc2dcf1b
11 files changed
+219
-12
No files matched your search
@@ -71,7 +71,7 @@ impl SurrenderTracker {
|
||||
let threshold = self.players.len() / 2;
|
||||
let declined = if total_no_votes > threshold {
|
||||
Some(rlnl::events::ingame::SurrenderDeclined {
|
||||
surrendering_player_id: player_id.or_else(|| self.players.keys().next().map(|x| *x)).unwrap_or(0) as i32,
|
||||
surrendering_player_id: player_id.or_else(|| self.players.keys().next().copied()).unwrap_or(0) as i32,
|
||||
game_time_elapsed,
|
||||
})
|
||||
} else {
|
||||
@@ -148,7 +148,7 @@ impl SurrenderGameTracker {
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
return result;
|
||||
result
|
||||
}
|
||||
|
||||
pub async fn request_new<L: crate::matches::CustomGameLogic>(&self, team: u8, initiator: u8, players: impl std::iter::Iterator<Item=u8>, generic: &crate::matches::GenericGamemodeEngine<L>) -> SurrenderVoteResult {
|
||||
|
||||
Reference in new issue
Block a user