mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
[Games] Generic query add support for GS2 protocol and Halo:CE game
This commit is contained in:
parent
e44a680a59
commit
a377b76a55
4 changed files with 41 additions and 2 deletions
|
|
@ -54,6 +54,7 @@ pub static GAMES: Map<&'static str, Game> = phf_map! {
|
|||
"ffow" => game!("Frontlines: Fuel of War", 5478, Protocol::FFOW),
|
||||
"gm" => game!("Garry's Mod", 27016, Protocol::Valve(SteamApp::GM)),
|
||||
"hl2dm" => game!("Half-Life 2 Deathmatch", 27015, Protocol::Valve(SteamApp::HL2DM)),
|
||||
"haloce" => game!("Halo: Combat Evolved", 2302, Protocol::Gamespy(GameSpyVersion::Two)),
|
||||
"hldms" => game!("Half-Life Deathmatch: Source", 27015, Protocol::Valve(SteamApp::HLDMS)),
|
||||
"hll" => game!("Hell Let Loose", 26420, Protocol::Valve(SteamApp::HLL)),
|
||||
"ins" => game!("Insurgency", 27015, Protocol::Valve(SteamApp::INS)),
|
||||
|
|
|
|||
|
|
@ -153,6 +153,7 @@ pub fn query(game: &Game, address: &IpAddr, port: Option<u16>) -> GDResult<proto
|
|||
Protocol::Gamespy(version) => {
|
||||
match version {
|
||||
GameSpyVersion::One => protocols::gamespy::one::query(&socket_addr, None).map(|r| r.into())?,
|
||||
GameSpyVersion::Two => protocols::gamespy::two::query(&socket_addr, None).map(|r| r.into())?,
|
||||
GameSpyVersion::Three => protocols::gamespy::three::query(&socket_addr, None).map(|r| r.into())?,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue