#include "g_local.h"
#include "m_player.h"
Go to the source code of this file.
|
void | ClientUserinfoChanged (edict_t *ent, char *userinfo) |
|
void | SP_misc_teleporter_dest (edict_t *ent) |
|
static void | SP_FixCoopSpots (edict_t *self) |
|
static void | SP_CreateCoopSpots (edict_t *self) |
|
void | SP_info_player_start (edict_t *self) |
|
void | SP_info_player_deathmatch (edict_t *self) |
|
void | SP_info_player_coop (edict_t *self) |
|
void | SP_info_player_intermission (void) |
|
void | player_pain (edict_t *self, edict_t *other, float kick, int damage) |
|
qboolean | IsFemale (edict_t *ent) |
|
qboolean | IsNeutral (edict_t *ent) |
|
void | ClientObituary (edict_t *self, edict_t *inflictor, edict_t *attacker) |
|
void | Touch_Item (edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *surf) |
|
void | TossClientWeapon (edict_t *self) |
|
void | LookAtKiller (edict_t *self, edict_t *inflictor, edict_t *attacker) |
|
void | player_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point) |
|
void | InitClientPersistant (gclient_t *client) |
|
void | InitClientResp (gclient_t *client) |
|
void | SaveClientData (void) |
|
void | FetchClientEntData (edict_t *ent) |
|
float | PlayersRangeFromSpot (edict_t *spot) |
|
edict_t * | SelectRandomDeathmatchSpawnPoint (void) |
|
edict_t * | SelectFarthestDeathmatchSpawnPoint (void) |
|
edict_t * | SelectDeathmatchSpawnPoint (void) |
|
edict_t * | SelectCoopSpawnPoint (edict_t *ent) |
|
void | SelectSpawnPoint (edict_t *ent, vec3_t origin, vec3_t angles) |
|
void | InitBodyQue (void) |
|
void | body_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point) |
|
void | CopyToBodyQue (edict_t *ent) |
|
void | respawn (edict_t *self) |
|
void | spectator_respawn (edict_t *ent) |
|
void | PutClientInServer (edict_t *ent) |
|
void | ClientBeginDeathmatch (edict_t *ent) |
|
void | ClientBegin (edict_t *ent) |
|
qboolean | ClientConnect (edict_t *ent, char *userinfo) |
|
void | ClientDisconnect (edict_t *ent) |
|
trace_t | PM_trace (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end) |
|
unsigned | CheckBlock (void *b, int c) |
|
void | PrintPmove (pmove_t *pm) |
|
void | ClientThink (edict_t *ent, usercmd_t *ucmd) |
|
void | ClientBeginServerFrame (edict_t *ent) |
|
◆ body_die()
◆ CheckBlock()
unsigned CheckBlock |
( |
void * |
b, |
|
|
int |
c |
|
) |
| |
◆ ClientBegin()
◆ ClientBeginDeathmatch()
◆ ClientBeginServerFrame()
◆ ClientConnect()
◆ ClientDisconnect()
◆ ClientObituary()
Definition at line 211 of file p_client.c.
231 message =
"suicides";
234 message =
"cratered";
237 message =
"was squished";
240 message =
"sank like a rock";
246 message =
"does a back flip into the lava";
253 message =
"found a way out";
256 message =
"saw the light";
259 message =
"got blasted";
264 message =
"was in the wrong place";
267 if (attacker ==
self)
272 message =
"tried to put the pin back in";
277 message =
"tripped on its own grenade";
279 message =
"tripped on her own grenade";
281 message =
"tripped on his own grenade";
285 message =
"blew itself up";
287 message =
"blew herself up";
289 message =
"blew himself up";
292 message =
"should have used a smaller gun";
296 message =
"killed itself";
298 message =
"killed herself";
300 message =
"killed himself";
308 self->client->resp.score--;
313 self->enemy = attacker;
314 if (attacker && attacker->
client)
319 message =
"was blasted by";
322 message =
"was gunned down by";
325 message =
"was blown away by";
326 message2 =
"'s super shotgun";
329 message =
"was machinegunned by";
332 message =
"was cut in half by";
333 message2 =
"'s chaingun";
336 message =
"was popped by";
337 message2 =
"'s grenade";
340 message =
"was shredded by";
341 message2 =
"'s shrapnel";
345 message2 =
"'s rocket";
348 message =
"almost dodged";
349 message2 =
"'s rocket";
352 message =
"was melted by";
353 message2 =
"'s hyperblaster";
356 message =
"was railed by";
359 message =
"saw the pretty lights from";
363 message =
"was disintegrated by";
364 message2 =
"'s BFG blast";
367 message =
"couldn't hide from";
372 message2 =
"'s handgrenade";
375 message =
"didn't see";
376 message2 =
"'s handgrenade";
380 message2 =
"'s pain";
383 message =
"tried to invade";
384 message2 =
"'s personal space";
404 self->client->resp.score--;
Referenced by player_die().
◆ ClientThink()
Definition at line 1580 of file p_client.c.
1587 level.current_entity = ent;
1590 if (
level.intermissiontime)
1594 if (
level.time >
level.intermissiontime + 5.0
1596 level.exitintermission =
true;
1611 memset (&
pm, 0,
sizeof(
pm));
1625 for (
i=0 ;
i<3 ;
i++)
1649 for (
i=0 ;
i<3 ;
i++)
1696 for (
j=0 ;
j<
i ;
j++)
1736 if (ucmd->
upmove >= 10) {
Referenced by GetGameAPI().
◆ ClientUserinfoChanged()
void ClientUserinfoChanged |
( |
edict_t * |
ent, |
|
|
char * |
userinfo |
|
) |
| |
◆ CopyToBodyQue()
◆ FetchClientEntData()
◆ InitBodyQue()
◆ InitClientPersistant()
◆ InitClientResp()
◆ IsFemale()
◆ IsNeutral()
Definition at line 198 of file p_client.c.
206 if (info[0] !=
'f' && info[0] !=
'F' && info[0] !=
'm' && info[0] !=
'M')
Referenced by ClientObituary().
◆ LookAtKiller()
Definition at line 463 of file p_client.c.
467 if (attacker && attacker !=
world && attacker !=
self)
471 else if (inflictor && inflictor !=
world && inflictor !=
self)
477 self->client->killer_yaw =
self->s.angles[
YAW];
482 self->client->killer_yaw = 180/
M_PI*atan2(dir[1], dir[0]);
484 self->client->killer_yaw = 0;
486 self->client->killer_yaw = 90;
488 self->client->killer_yaw = -90;
491 self->client->killer_yaw += 360;
Referenced by player_die().
◆ player_die()
Definition at line 501 of file p_client.c.
510 self->s.modelindex2 = 0;
512 self->s.angles[0] = 0;
513 self->s.angles[2] = 0;
516 self->client->weapon_sound = 0;
525 self->client->respawn_time =
level.time + 1.0;
527 self->client->ps.pmove.pm_type =
PM_DEAD;
538 self->client->resp.coop_respawn.inventory[n] =
self->client->pers.inventory[n];
539 self->client->pers.inventory[n] = 0;
544 self->client->quad_framenum = 0;
545 self->client->invincible_framenum = 0;
546 self->client->breather_framenum = 0;
547 self->client->enviro_framenum = 0;
553 for (n= 0; n < 4; n++)
Referenced by Cmd_Kill_f(), and PutClientInServer().
◆ player_pain()
◆ PlayersRangeFromSpot()
float PlayersRangeFromSpot |
( |
edict_t * |
spot | ) |
|
◆ PM_trace()
◆ PrintPmove()
◆ PutClientInServer()
Definition at line 1097 of file p_client.c.
1099 vec3_t mins = {-16, -16, -24};
1100 vec3_t maxs = {16, 16, 32};
1102 vec3_t spawn_origin, spawn_angles;
1121 resp = client->
resp;
1122 memcpy (userinfo, client->
pers.
userinfo,
sizeof(userinfo));
1131 resp = client->
resp;
1132 memcpy (userinfo, client->
pers.
userinfo,
sizeof(userinfo));
1148 memset (&resp, 0,
sizeof(resp));
1152 saved = client->
pers;
1153 memset (client, 0,
sizeof(*client));
1154 client->
pers = saved;
1157 client->
resp = resp;
1175 ent->
model =
"players/male/tris.md2";
1188 memset (&ent->
client->
ps, 0,
sizeof(client->
ps));
1196 client->
ps.
fov = 90;
1201 if (client->
ps.
fov < 1)
1202 client->
ps.
fov = 90;
1203 else if (client->
ps.
fov > 160)
1204 client->
ps.
fov = 160;
1223 for (
i=0 ;
i<3 ;
i++)
Referenced by ClientBegin(), ClientBeginDeathmatch(), respawn(), and spectator_respawn().
◆ respawn()
◆ SaveClientData()
◆ SelectCoopSpawnPoint()
◆ SelectDeathmatchSpawnPoint()
◆ SelectFarthestDeathmatchSpawnPoint()
Definition at line 789 of file p_client.c.
792 float bestdistance, bestplayerdistance;
799 while ((spot =
G_Find (spot,
FOFS(classname),
"info_player_deathmatch")) !=
NULL)
803 if (bestplayerdistance > bestdistance)
806 bestdistance = bestplayerdistance;
Referenced by SelectDeathmatchSpawnPoint().
◆ SelectRandomDeathmatchSpawnPoint()
Definition at line 733 of file p_client.c.
738 float range, range1, range2;
741 range1 = range2 = 99999;
742 spot1 = spot2 =
NULL;
744 while ((spot =
G_Find (spot,
FOFS(classname),
"info_player_deathmatch")) !=
NULL)
753 else if (
range < range2)
765 spot1 = spot2 =
NULL;
770 selection = rand() %
count;
775 spot =
G_Find (spot,
FOFS(classname),
"info_player_deathmatch");
776 if (spot == spot1 || spot == spot2)
778 }
while(selection--);
Referenced by SelectDeathmatchSpawnPoint().
◆ SelectSpawnPoint()
◆ SP_CreateCoopSpots()
◆ SP_FixCoopSpots()
◆ SP_info_player_coop()
◆ SP_info_player_deathmatch()
◆ SP_info_player_intermission()
void SP_info_player_intermission |
( |
void |
| ) |
|
◆ SP_info_player_start()
◆ SP_misc_teleporter_dest()
◆ spectator_respawn()
◆ TossClientWeapon()
Definition at line 410 of file p_client.c.
420 item =
self->client->pers.weapon;
423 if (item && (strcmp (item->
pickup_name,
"Blaster") == 0))
429 quad = (
self->client->quad_framenum > (
level.framenum + 10));
438 self->client->v_angle[
YAW] -= spread;
440 self->client->v_angle[
YAW] += spread;
446 self->client->v_angle[
YAW] += spread;
448 self->client->v_angle[
YAW] -= spread;
Referenced by player_die().
◆ Touch_Item()
◆ pm_passent
gitem_t * FindItem(char *pickup_name)
void UpdateChaseCam(edict_t *ent)
void(* dprintf)(char *fmt,...)
void spectator_respawn(edict_t *ent)
edict_t * SelectRandomDeathmatchSpawnPoint(void)
#define MOD_TARGET_BLASTER
void MoveClientToIntermission(edict_t *client)
qboolean Info_Validate(char *s)
trace_t(* trace)(vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, edict_t *passent, int contentmask)
CONST PIXELFORMATDESCRIPTOR int
void ThrowGib(edict_t *self, char *gibname, int damage, int type)
#define VectorSubtract(a, b, c)
void Touch_Item(edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *surf)
gitem_t * FindItemByClassname(char *classname)
void(* multicast)(vec3_t origin, multicast_t to)
#define ITEM_TARGETS_USED
#define PMF_NO_PREDICTION
void SP_misc_teleporter_dest(edict_t *ent)
client_persistant_t coop_respawn
qboolean(* pickup)(struct edict_s *ent, struct edict_s *other)
qboolean IsNeutral(edict_t *ent)
void G_TouchTriggers(edict_t *ent)
edict_t * G_Find(edict_t *from, int fieldofs, char *match)
qboolean Pickup_Health(edict_t *ent, edict_t *other)
qboolean SV_FilterPacket(char *from)
struct gclient_s * client
void(* sound)(edict_t *ent, int channel, int soundindex, float volume, float attenuation, float timeofs)
edict_t * SelectDeathmatchSpawnPoint(void)
void Think_Weapon(edict_t *ent)
void ClientUserinfoChanged(edict_t *ent, char *userinfo)
unsigned CheckBlock(void *b, int c)
#define DF_SPAWN_FARTHEST
char userinfo[MAX_INFO_STRING]
#define STAT_SELECTED_ITEM
int groundentity_linkcount
void TossClientWeapon(edict_t *self)
void CopyToBodyQue(edict_t *ent)
int(* imageindex)(char *name)
void G_InitEdict(edict_t *e)
char * va(char *format,...)
void(* use)(struct edict_s *ent, struct gitem_s *item)
static void SP_CreateCoopSpots(edict_t *self)
#define PMF_TIME_TELEPORT
trace_t(* trace)(vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end)
void G_FreeEdict(edict_t *e)
#define DROPPED_PLAYER_ITEM
struct edict_s * groundentity
void(* configstring)(int num, char *string)
int(* soundindex)(char *name)
vec_t VectorLength(vec3_t v)
int(* pointcontents)(vec3_t point)
char * Info_ValueForKey(char *s, char *key)
int(* modelindex)(char *name)
void GetChaseTarget(edict_t *ent)
edict_t * PlayerTrail_LastSpot(void)
void player_pain(edict_t *self, edict_t *other, float kick, int damage)
void respawn(edict_t *self)
cvar_t * spectator_password
void(* think)(edict_t *self)
trace_t PM_trace(vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end)
struct edict_s * touchents[MAXTOUCH]
void body_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
void player_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
int Q_stricmp(char *s1, char *s2)
void(* pain)(edict_t *self, edict_t *other, float kick, int damage)
void(* Pmove)(pmove_t *pmove)
qboolean IsFemale(edict_t *ent)
void(* setmodel)(edict_t *ent, char *name)
void ClientObituary(edict_t *self, edict_t *inflictor, edict_t *attacker)
void(* unlinkentity)(edict_t *ent)
void(* WriteShort)(int c)
void FetchClientEntData(edict_t *ent)
void Cmd_Help_f(edict_t *ent)
void(* error)(char *fmt,...)
void Info_SetValueForKey(char *s, char *key, char *value)
edict_t * SelectFarthestDeathmatchSpawnPoint(void)
void(* AddCommandString)(char *text)
void(* cprintf)(edict_t *ent, int printlevel, char *fmt,...)
void(* unicast)(edict_t *ent, qboolean reliable)
qboolean visible(edict_t *self, edict_t *other)
void ThrowClientHead(edict_t *self, int damage)
#define STAT_PICKUP_STRING
void ClientEndServerFrame(edict_t *ent)
void G_UseTargets(edict_t *ent, edict_t *activator)
edict_t * Drop_Item(edict_t *ent, gitem_t *item)
void ChaseNext(edict_t *ent)
void LookAtKiller(edict_t *self, edict_t *inflictor, edict_t *attacker)
void PlayerNoise(edict_t *who, vec3_t where, int type)
void SelectSpawnPoint(edict_t *ent, vec3_t origin, vec3_t angles)
static void SP_FixCoopSpots(edict_t *self)
qboolean KillBox(edict_t *ent)
void(* touch)(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
void PutClientInServer(edict_t *ent)
#define VectorSet(v, x, y, z)
void ChangeWeapon(edict_t *ent)
void Com_Printf(char *fmt,...)
void InitClientResp(gclient_t *client)
void(* linkentity)(edict_t *ent)
void PlayerTrail_Add(vec3_t spot)
int(* pointcontents)(vec3_t point)
void ClientBeginDeathmatch(edict_t *ent)
void(* WriteString)(char *s)
float PlayersRangeFromSpot(edict_t *spot)
void(* die)(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
void InitClientPersistant(gclient_t *client)
#define MOD_FRIENDLY_FIRE
edict_t * SelectCoopSpawnPoint(edict_t *ent)
void(* bprintf)(int printlevel, char *fmt,...)