From af08ce4934034624f4d2a2dc8354574f32783db5 Mon Sep 17 00:00:00 2001 From: Manuel K Date: Wed, 5 Jun 2019 17:28:44 +0200 Subject: [PATCH] Use MAX_PLRS (dX part) --- SourceX/DiabloUI/selconn.cpp | 6 +++--- SourceX/dvlnet/udp_p2p.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SourceX/DiabloUI/selconn.cpp b/SourceX/DiabloUI/selconn.cpp index d4f93c2bc..77792a723 100644 --- a/SourceX/DiabloUI/selconn.cpp +++ b/SourceX/DiabloUI/selconn.cpp @@ -57,15 +57,15 @@ void selconn_Esc() void selconn_Focus(int value) { - int players = 4; + int players = MAX_PLRS; switch (value) { case 0: sprintf(selconn_Description, "All computers must be connected to a TCP-compatible network."); - players = 4; + players = MAX_PLRS; break; case 1: sprintf(selconn_Description, "All computers must be connected to a UDP-compatible network."); - players = 4; + players = MAX_PLRS; break; case 2: sprintf(selconn_Description, "Play by yourself with no network exposure."); diff --git a/SourceX/dvlnet/udp_p2p.cpp b/SourceX/dvlnet/udp_p2p.cpp index 1a143cdeb..f2148442c 100644 --- a/SourceX/dvlnet/udp_p2p.cpp +++ b/SourceX/dvlnet/udp_p2p.cpp @@ -65,7 +65,7 @@ int udp_p2p::join(std::string addrstr, std::string passwd) SDL_Delay(1000); } } - return (plr_self == PLR_BROADCAST ? 4 : plr_self); + return (plr_self == PLR_BROADCAST ? MAX_PLRS : plr_self); } void udp_p2p::poll()