[Games] Add Warsow support.

This commit is contained in:
CosminPerRam 2023-06-27 01:15:04 +03:00
parent 58f7ff8aab
commit 0f9a10f2fb
6 changed files with 16 additions and 0 deletions

View file

@ -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)),
};

View file

@ -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
View 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)
}