-
Notifications
You must be signed in to change notification settings - Fork 1
/
kots_conpersist.h
30 lines (22 loc) · 914 Bytes
/
kots_conpersist.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef KOTS_CONPERSIST_H
#define KOTS_CONPERSIST_H
#include "kots_character.h"
/*
The way this is done is kind of crappy and doesn't really solve the real issue.
The whole reason for this is that there seems to be some sort of issue with R1Q2 performing hard reconnects occasionally.
This causes all the persisted client data to be erased.
The way it works is every time a map ends all data is cleared and new data is saved.
Characters that sucessfully make it to the next map and attempt to login are cleared.
After a new map loads the player has 30 seconds to connect and reclaim their persistent data.
Persistant data is matched by name AND IP Address.
*/
typedef struct
{
char name[16];
kots_persist_t persist;
} kots_conpersist_t;
void Kots_LoadConPersistData(edict_t *ent);
void Kots_ClearConPersistData(edict_t *ent);
void Kots_ClearAllConPersistData();
void Kots_SaveAllConPersistData();
#endif