group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
PlayerColor Struct Reference

Replicated tint assigned to a player on connect. More...

#include <PlayerColor.hpp>

Public Attributes

glm::vec3 rgb {1.0f}
 Tint color in linear-ish RGB.
int paletteIdx {-1}
 Slot in player_colors::k_palette; -1 = unassigned.

Detailed Description

Replicated tint assigned to a player on connect.

Server picks the least-used slot from player_colors::k_palette in ServerGame::initNewPlayerEntity and attaches this component. Replicated via the Synced tuple so clients pick it up automatically; the renderer reads rgb when filling SkinnedInstance.tint.

Member Data Documentation

◆ paletteIdx

int PlayerColor::paletteIdx {-1}

Slot in player_colors::k_palette; -1 = unassigned.

◆ rgb

glm::vec3 PlayerColor::rgb {1.0f}

Tint color in linear-ish RGB.


The documentation for this struct was generated from the following file: