mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-18 09:35:50 +00:00
Half-Life Deathmatch: Source support.
This commit is contained in:
parent
663fb6a66e
commit
d671bb0310
6 changed files with 20 additions and 1 deletions
12
src/games/hldms.rs
Normal file
12
src/games/hldms.rs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
use crate::GDResult;
|
||||
use crate::protocols::valve;
|
||||
use crate::protocols::valve::{game, SteamID};
|
||||
|
||||
pub fn query(address: &str, port: Option<u16>) -> GDResult<game::Response> {
|
||||
let valve_response = valve::query(address, match port {
|
||||
None => 27015,
|
||||
Some(port) => port
|
||||
}, SteamID::HLDMS.as_app(), None, None)?;
|
||||
|
||||
Ok(game::Response::new_from_valve_response(valve_response))
|
||||
}
|
||||
|
|
@ -55,3 +55,5 @@ pub mod cs;
|
|||
pub mod arma2oa;
|
||||
/// Day of Infamy
|
||||
pub mod doi;
|
||||
/// Half-Life Deathmatch: Source
|
||||
pub mod hldms;
|
||||
|
|
|
|||
|
|
@ -159,6 +159,8 @@ pub enum SteamID {
|
|||
DODS = 300,
|
||||
/// Half-Life 2 Deathmatch
|
||||
HL2DM = 320,
|
||||
/// Half-Life Deathmatch: Source
|
||||
HLDMS = 360,
|
||||
/// Team Fortress 2
|
||||
TF2 = 440,
|
||||
/// Left 4 Dead
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue