mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-18 09:35:50 +00:00
[Games] Add Warsow support.
This commit is contained in:
parent
58f7ff8aab
commit
0f9a10f2fb
6 changed files with 16 additions and 0 deletions
|
|
@ -83,4 +83,5 @@ pub static GAMES: Map<&'static str, Game> = phf_map! {
|
|||
"ut" => game!("Unreal Tournament", 7778, Protocol::Gamespy(GameSpyVersion::One)),
|
||||
"vr" => game!("V Rising", 27016, Protocol::Valve(SteamApp::VR)),
|
||||
"jc2mp" => game!("Just Cause 2: Multiplayer", 7777, Protocol::PROPRIETARY(ProprietaryProtocol::JC2MP)),
|
||||
"warsow" => game!("Warsow", 44400, Protocol::Quake(QuakeVersion::Three)),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -111,6 +111,8 @@ pub mod unturned;
|
|||
pub mod ut;
|
||||
/// V Rising
|
||||
pub mod vr;
|
||||
/// Warsow
|
||||
pub mod warsow;
|
||||
|
||||
use crate::protocols::gamespy::GameSpyVersion;
|
||||
use crate::protocols::quake::QuakeVersion;
|
||||
|
|
|
|||
9
src/games/warsow.rs
Normal file
9
src/games/warsow.rs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
use crate::protocols::quake;
|
||||
use crate::protocols::quake::two::Player;
|
||||
use crate::protocols::quake::Response;
|
||||
use crate::GDResult;
|
||||
use std::net::{IpAddr, SocketAddr};
|
||||
|
||||
pub fn query(address: &IpAddr, port: Option<u16>) -> GDResult<Response<Player>> {
|
||||
quake::three::query(&SocketAddr::new(*address, port.unwrap_or(44400)), None)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue