Go to the documentation of this file.
193 if (info[0] ==
'f' || info[0] ==
'F')
206 if (info[0] !=
'f' && info[0] !=
'F' && info[0] !=
'm' && info[0] !=
'M')
246 message =
"does a back flip into the lava";
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";
292 message =
"should have used a smaller gun";
308 self->client->resp.score--;
313 self->enemy = attacker;
314 if (attacker && attacker->
client)
322 message =
"was gunned down by";
326 message2 =
"'s super shotgun";
329 message =
"was machinegunned by";
332 message =
"was cut in half by";
333 message2 =
"'s chaingun";
337 message2 =
"'s grenade";
341 message2 =
"'s shrapnel";
345 message2 =
"'s rocket";
349 message2 =
"'s rocket";
353 message2 =
"'s hyperblaster";
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";
376 message2 =
"'s handgrenade";
380 message2 =
"'s pain";
384 message2 =
"'s personal space";
404 self->client->resp.score--;
420 item =
self->client->pers.weapon;
421 if (! self->client->pers.inventory[self->client->ammo_index] )
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;
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;
490 if (self->client->killer_yaw < 0)
491 self->client->killer_yaw += 360;
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;
550 if (self->health < -40)
553 for (n= 0; n < 4; n++)
568 if (self->client->ps.pmove.pm_flags &
PMF_DUCKED)
697 float bestplayerdistance;
700 float playerdistance;
703 bestplayerdistance = 9999999;
718 if (playerdistance < bestplayerdistance)
719 bestplayerdistance = playerdistance;
722 return bestplayerdistance;
738 float range, range1, range2;
741 range1 = range2 = 99999;
742 spot1 = spot2 =
NULL;
753 else if (
range < range2)
765 spot1 = spot2 =
NULL;
770 selection = rand() %
count;
776 if (spot == spot1 || spot == spot2)
778 }
while(selection--);
792 float bestdistance, bestplayerdistance;
803 if (bestplayerdistance > bestdistance)
806 bestdistance = bestplayerdistance;
935 if (self->health < -40)
938 for (n= 0; n < 4; n++)
940 self->s.origin[2] -= 48;
995 self->client->ps.pmove.pm_time = 14;
997 self->client->respawn_time =
level.time;
1102 vec3_t spawn_origin, spawn_angles;
1148 memset (&resp, 0,
sizeof(resp));
1175 ent->
model =
"players/male/tris.md2";
1223 for (
i=0 ;
i<3 ;
i++)
1277 if (
level.intermissiontime)
1319 if (ent->
inuse ==
true)
1325 for (
i=0 ;
i<3 ;
i++)
1339 if (
level.intermissiontime)
1379 strcpy (userinfo,
"\\name\\badinfo\\skin\\male/grunt");
1488 if (ent->
inuse ==
false)
1559 for (
i=0 ;
i<c ;
i++)
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) {
1770 if (
level.intermissiontime)
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 ClientConnect(edict_t *ent, char *userinfo)
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 SP_info_player_deathmatch(edict_t *self)
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 PMF_NO_PREDICTION
void SP_misc_teleporter_dest(edict_t *ent)
void SP_info_player_start(edict_t *self)
client_persistant_t coop_respawn
void SP_info_player_intermission(void)
qboolean IsNeutral(edict_t *ent)
void G_TouchTriggers(edict_t *ent)
edict_t * G_Find(edict_t *from, int fieldofs, char *match)
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]
int groundentity_linkcount
void TossClientWeapon(edict_t *self)
void CopyToBodyQue(edict_t *ent)
void G_InitEdict(edict_t *e)
char * va(char *format,...)
void ClientDisconnect(edict_t *ent)
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 ClientThink(edict_t *ent, usercmd_t *ucmd)
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 PrintPmove(pmove_t *pm)
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 SP_info_player_coop(edict_t *self)
void(* pain)(edict_t *self, edict_t *other, float kick, int damage)
void(* Pmove)(pmove_t *pmove)
qboolean IsFemale(edict_t *ent)
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 ClientBegin(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)
void ClientEndServerFrame(edict_t *ent)
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)
void ClientBeginServerFrame(edict_t *ent)
void ChangeWeapon(edict_t *ent)
void Com_Printf(char *fmt,...)
void InitClientResp(gclient_t *client)
void(* linkentity)(edict_t *ent)
void SaveClientData(void)
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,...)