foxygit / doom Log in
commit 52d99f42430a2c3faec4ac0bb824a691605b98f7
Author:     Jonathan Dowland <jon@dow.land>
AuthorDate: Fri Mar 1 03:12:51 2019 +0000
Commit:     Jonathan Dowland <jon@dow.land>
CommitDate: Fri Mar 1 03:12:51 2019 +0000

    remove redundant else blocks

    As Simon points out, they are not needed; since if M_StringJoin
    fails it will terminate the program.
---
 src/net_client.c        | 3 ---
 src/setup/multiplayer.c | 5 -----
 2 files changed, 8 deletions(-)

diff --git a/src/net_client.c b/src/net_client.c
index 45624b43..3799b0e1 100644
--- a/src/net_client.c
+++ b/src/net_client.c
@@ -1216,9 +1216,6 @@ void NET_CL_Init(void)
     {
         net_player_name = NET_GetRandomPetName();
     }
-
-    if (net_player_name == NULL)
-        net_player_name = "Player";
 }

 void NET_Init(void)
diff --git a/src/setup/multiplayer.c b/src/setup/multiplayer.c
index 823fda74..860a644d 100644
--- a/src/setup/multiplayer.c
+++ b/src/setup/multiplayer.c
@@ -1100,11 +1100,6 @@ void SetPlayerNameDefault(void)
     {
         net_player_name = NET_GetRandomPetName();
     }
-
-    if (net_player_name == NULL)
-    {
-        net_player_name = M_StringDuplicate("player");
-    }
 }

 void MultiplayerConfig(TXT_UNCAST_ARG(widget), void *user_data)