#pragma once

#ifdef GAMEQC
REGISTER_NET_TEMP(TE_CSQC_RACE)
REGISTER_NET_TEMP(TE_CSQC_PINGPLREPORT)
REGISTER_NET_TEMP(TE_CSQC_WEAPONCOMPLAIN)
REGISTER_NET_TEMP(TE_CSQC_SERVERWELCOME)
REGISTER_NET_TEMP(TE_CSQC_VEHICLESETUP)
REGISTER_NET_TEMP(TE_CSQC_WEAPONPICKUP)

enum
{
	RACE_NET_CHECKPOINT_HIT_QUALIFYING, // byte checkpoint, short time, short recordtime, string recordholder
	RACE_NET_CHECKPOINT_CLEAR,
	RACE_NET_CHECKPOINT_NEXT_QUALIFYING, // byte nextcheckpoint, short recordtime, string recordholder
	RACE_NET_CHECKPOINT_HIT_RACE, // byte checkpoint, short delta, byte lapsdelta, string opponent
	RACE_NET_CHECKPOINT_HIT_RACE_BY_OPPONENT, // byte checkpoint, short delta, byte lapsdelta, string opponent
	RACE_NET_CHECKPOINT_NEXT_SPEC_QUALIFYING, // byte nextcheckpoint, float laptime, short recordtime, string recordholder
	RACE_NET_PENALTY_RACE, // byte penaltytime, string reason
	RACE_NET_PENALTY_QUALIFYING, // byte penaltytime, string reason
	RACE_NET_SERVER_RECORD, // server record, sent to client
	RACE_NET_SPEED_AWARD, // speed award, sent to client
	RACE_NET_SPEED_AWARD_BEST, // all time best speed award, sent to client
	RACE_NET_SERVER_RANKINGS,
	RACE_NET_SERVER_STATUS,
	RACE_NET_CHECKPOINT_HIT_SELF_QUALIFYING, // byte checkpoint, short time, short recordtime
	RACE_NET_CHECKPOINT_NEXT_SELF_QUALIFYING, // byte nextcheckpoint, short recordtime
	RACE_NET_RANKINGS_CNT
};

REGISTER_NET_LINKED(_ENT_CLIENT_INIT)
#ifdef CSQC
NET_HANDLE(_ENT_CLIENT_INIT, bool isNew)
{
	make_pure(this);
	return true;
}
#endif
/** Sent as a temp entity from a persistent linked entity */
REGISTER_NET_TEMP(ENT_CLIENT_INIT)

REGISTER_NET_LINKED(ENT_CLIENT_SCORES_INFO)
REGISTER_NET_LINKED(ENT_CLIENT_SCORES)
REGISTER_NET_LINKED(ENT_CLIENT_TEAMSCORES)
REGISTER_NET_LINKED(ENT_CLIENT_NAGGER) // flags [votecalledvote]
REGISTER_NET_LINKED(ENT_CLIENT_RADARLINK) // flags [startorigin] [endorigin] [startcolor+16*endcolor]
REGISTER_NET_LINKED(ENT_CLIENT_PROJECTILE)
REGISTER_NET_LINKED(ENT_CLIENT_CLIENTDATA)
REGISTER_NET_LINKED(ENT_CLIENT_RANDOMSEED)
REGISTER_NET_LINKED(ENT_CLIENT_ACCURACY)
REGISTER_NET_LINKED(ENT_CLIENT_ELIMINATEDPLAYERS)

REGISTER_NET_LINKED(ENT_CLIENT_WARPZONE)
REGISTER_NET_LINKED(ENT_CLIENT_WARPZONE_CAMERA)
REGISTER_NET_LINKED(ENT_CLIENT_WARPZONE_TELEPORTED)

REGISTER_NET_LINKED(ENT_CLIENT_ARC_BEAM)
REGISTER_NET_LINKED(ENT_CLIENT_HOOK)
REGISTER_NET_LINKED(ENT_CLIENT_TUBANOTE)

REGISTER_NET_LINKED(ENT_CLIENT_SPAWNPOINT)
REGISTER_NET_LINKED(ENT_CLIENT_SPAWNEVENT)
REGISTER_NET_LINKED(ENT_CLIENT_WALL)

#include <lib/csqcmodel/net.qh>

REGISTER_NET_C2S(fpsreport)
#endif // GAMEQC
