Nuclide
Software Development Kit for id Technology (BETA)
Main Page
Related Pages
Classes
UserInfoManager.h
1
/*
2
* Copyright (c) 2025 Vera Visions LLC.
3
*
4
* Permission to use, copy, modify, and distribute this software for any
5
* purpose with or without fee is hereby granted, provided that the above
6
* copyright notice and this permission notice appear in all copies.
7
*
8
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
13
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
14
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15
*/
16
25
class
26
ncUserInfoManager
27
{
28
public
:
29
void
ncUserInfoManager
(
void
);
30
31
nonvirtual
void
InitWithSlots(
int
maxUserSlots);
32
nonvirtual
void
Shutdown(
void
);
33
34
nonvirtual
void
UpdateRanking(
void
);
35
nonvirtual
void
UpdateCachedSlot(
int
cachedSlot);
36
37
nonvirtual
int
NumSlots(
void
);
38
39
nonvirtual
void
DebugPrint(
void
);
40
41
/* Returns the player info according to internal index. Invalid queries return -1. */
42
nonvirtual
ncUserInfo
InfoByIndex(
int
targetIndex);
43
44
/* Returns the player info according to the server ranking. Invalid queries return -1. */
45
nonvirtual
ncUserInfo
InfoByRanking(
int
rankingIndex);
46
47
/* Return the local player info. */
48
nonvirtual
ncUserInfo
LocalPlayerInfo(
void
);
49
50
private
:
51
52
int
m_numUsers;
53
ncUserInfo
*m_users;
54
55
/* each index = id of a player slot */
56
int
*m_serverRanking;
57
};
58
59
ncUserInfoManager
g_userInfo;
ncUserInfoManager
A cache/manager for userinfo on the client.
Definition:
UserInfoManager.h:27
ncUserInfo
Definition:
UserInfo.h:19
src
client
UserInfoManager.h
2009-2025 (C) Nuclide is a project by
Vera Visions, L.L.C.
and is available under the
ISC License
.