Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ UserInterfaceState.xcuserstate
*.sublime-workspace
*.sublime-project

# Vscode
.vscode/

# Windows related
Thumbs.db

Expand Down
10 changes: 8 additions & 2 deletions Sources/Client/NetClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <Core/TMPUtils.h>

DEFINE_SPADES_SETTING(cg_unicode, "1");
DEFINE_SPADES_SETTING(cg_persistentBlockColor, "1");

namespace spades {
namespace client {
Expand Down Expand Up @@ -1017,10 +1018,15 @@ namespace spades {
default: SPRaise("Received invalid weapon: %d", weapon);
}

auto p =
stmp::make_unique<Player>(*GetWorld(), pId, wType, team, savedPlayerPos[pId],
auto p = stmp::make_unique<Player>(*GetWorld(), pId, wType, team, savedPlayerPos[pId],
GetWorld()->GetTeam(team).color);
p->SetPosition(pos);
// Don't reset my block color when I respawn
if(cg_persistentBlockColor && GetLocalPlayerOrNull() && pId == GetWorld()->GetLocalPlayerIndex()) {
p->SetHeldBlockColor(GetWorld()->GetLocalPlayer()->GetBlockColor());
SendHeldBlockColor();
}

GetWorld()->SetPlayer(pId, std::move(p));

Player &pRef = GetWorld()->GetPlayer(pId).value();
Expand Down