mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-10 23:32:06 +00:00
Fixed item dropping, specmode selection on death and helmet probs.
This commit is contained in:
parent
a3f576a514
commit
0dcbd89981
5 changed files with 100 additions and 18 deletions
Binary file not shown.
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.95 2002/11/13 00:50:38 jbravo
|
||||||
|
// Fixed item dropping, specmode selection on death and helmet probs.
|
||||||
|
//
|
||||||
// Revision 1.94 2002/10/30 21:24:47 jbravo
|
// Revision 1.94 2002/10/30 21:24:47 jbravo
|
||||||
// Minor helmet tweaking
|
// Minor helmet tweaking
|
||||||
//
|
//
|
||||||
|
@ -974,6 +977,7 @@ void ThrowItem(gentity_t * ent)
|
||||||
xr_drop->count = -1;
|
xr_drop->count = -1;
|
||||||
client->ps.stats[STAT_HOLDABLE_ITEM] &= ~(1 << client->teamplayItem);
|
client->ps.stats[STAT_HOLDABLE_ITEM] &= ~(1 << client->teamplayItem);
|
||||||
client->uniqueItems--;
|
client->uniqueItems--;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (client->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_BANDOLIER)) {
|
if (client->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_BANDOLIER)) {
|
||||||
|
@ -982,18 +986,21 @@ void ThrowItem(gentity_t * ent)
|
||||||
xr_drop->count = -1;
|
xr_drop->count = -1;
|
||||||
client->ps.stats[STAT_HOLDABLE_ITEM] &= ~(1 << HI_BANDOLIER);
|
client->ps.stats[STAT_HOLDABLE_ITEM] &= ~(1 << HI_BANDOLIER);
|
||||||
client->uniqueItems--;
|
client->uniqueItems--;
|
||||||
|
return;
|
||||||
} else if (client->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_SLIPPERS)) {
|
} else if (client->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_SLIPPERS)) {
|
||||||
xr_item = BG_FindItemForHoldable(HI_SLIPPERS);
|
xr_item = BG_FindItemForHoldable(HI_SLIPPERS);
|
||||||
xr_drop = dropWeapon(ent, xr_item, 0, FL_DROPPED_ITEM | FL_THROWN_ITEM);
|
xr_drop = dropWeapon(ent, xr_item, 0, FL_DROPPED_ITEM | FL_THROWN_ITEM);
|
||||||
xr_drop->count = -1;
|
xr_drop->count = -1;
|
||||||
client->ps.stats[STAT_HOLDABLE_ITEM] &= ~(1 << HI_SLIPPERS);
|
client->ps.stats[STAT_HOLDABLE_ITEM] &= ~(1 << HI_SLIPPERS);
|
||||||
client->uniqueItems--;
|
client->uniqueItems--;
|
||||||
|
return;
|
||||||
} else if (client->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_SILENCER)) {
|
} else if (client->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_SILENCER)) {
|
||||||
xr_item = BG_FindItemForHoldable(HI_SILENCER);
|
xr_item = BG_FindItemForHoldable(HI_SILENCER);
|
||||||
xr_drop = dropWeapon(ent, xr_item, 0, FL_DROPPED_ITEM | FL_THROWN_ITEM);
|
xr_drop = dropWeapon(ent, xr_item, 0, FL_DROPPED_ITEM | FL_THROWN_ITEM);
|
||||||
xr_drop->count = -1;
|
xr_drop->count = -1;
|
||||||
client->ps.stats[STAT_HOLDABLE_ITEM] &= ~(1 << HI_SILENCER);
|
client->ps.stats[STAT_HOLDABLE_ITEM] &= ~(1 << HI_SILENCER);
|
||||||
client->uniqueItems--;
|
client->uniqueItems--;
|
||||||
|
return;
|
||||||
// JBravo: adding the helmet :)
|
// JBravo: adding the helmet :)
|
||||||
} else if (client->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_HELMET)) {
|
} else if (client->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_HELMET)) {
|
||||||
xr_item = BG_FindItemForHoldable(HI_HELMET);
|
xr_item = BG_FindItemForHoldable(HI_HELMET);
|
||||||
|
@ -1001,18 +1008,21 @@ void ThrowItem(gentity_t * ent)
|
||||||
xr_drop->count = -1;
|
xr_drop->count = -1;
|
||||||
client->ps.stats[STAT_HOLDABLE_ITEM] &= ~(1 << HI_HELMET);
|
client->ps.stats[STAT_HOLDABLE_ITEM] &= ~(1 << HI_HELMET);
|
||||||
client->uniqueItems--;
|
client->uniqueItems--;
|
||||||
|
return;
|
||||||
} else if (client->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_LASER)) {
|
} else if (client->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_LASER)) {
|
||||||
xr_item = BG_FindItemForHoldable(HI_LASER);
|
xr_item = BG_FindItemForHoldable(HI_LASER);
|
||||||
xr_drop = dropWeapon(ent, xr_item, 0, FL_DROPPED_ITEM | FL_THROWN_ITEM);
|
xr_drop = dropWeapon(ent, xr_item, 0, FL_DROPPED_ITEM | FL_THROWN_ITEM);
|
||||||
xr_drop->count = -1;
|
xr_drop->count = -1;
|
||||||
client->ps.stats[STAT_HOLDABLE_ITEM] &= ~(1 << HI_LASER);
|
client->ps.stats[STAT_HOLDABLE_ITEM] &= ~(1 << HI_LASER);
|
||||||
client->uniqueItems--;
|
client->uniqueItems--;
|
||||||
|
return;
|
||||||
} else if (client->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_KEVLAR)) {
|
} else if (client->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_KEVLAR)) {
|
||||||
xr_item = BG_FindItemForHoldable(HI_KEVLAR);
|
xr_item = BG_FindItemForHoldable(HI_KEVLAR);
|
||||||
xr_drop = dropWeapon(ent, xr_item, 0, FL_DROPPED_ITEM | FL_THROWN_ITEM);
|
xr_drop = dropWeapon(ent, xr_item, 0, FL_DROPPED_ITEM | FL_THROWN_ITEM);
|
||||||
xr_drop->count = -1;
|
xr_drop->count = -1;
|
||||||
client->ps.stats[STAT_HOLDABLE_ITEM] &= ~(1 << HI_KEVLAR);
|
client->ps.stats[STAT_HOLDABLE_ITEM] &= ~(1 << HI_KEVLAR);
|
||||||
client->uniqueItems--;
|
client->uniqueItems--;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1172,11 +1182,11 @@ void ClientThink_real(gentity_t * ent)
|
||||||
}
|
}
|
||||||
|
|
||||||
// JBravo: fixing telefragging and shit during spawnig. (Thanks NiceAss! :)
|
// JBravo: fixing telefragging and shit during spawnig. (Thanks NiceAss! :)
|
||||||
if (g_gametype.integer == GT_TEAMPLAY &&
|
if ((g_gametype.integer == GT_TEAMPLAY || g_gametype.integer == GT_TEAM) &&
|
||||||
((ent->client->ps.stats[STAT_RQ3] & RQ3_PLAYERSOLID) != RQ3_PLAYERSOLID) && !level.lights_camera_action) {
|
((ent->client->ps.stats[STAT_RQ3] & RQ3_PLAYERSOLID) != RQ3_PLAYERSOLID) && !level.lights_camera_action) {
|
||||||
UnstickPlayer(ent);
|
UnstickPlayer(ent);
|
||||||
}
|
}
|
||||||
if (g_gametype.integer == GT_TEAMPLAY &&
|
if ((g_gametype.integer == GT_TEAMPLAY || g_gametype.integer == GT_TEAM) &&
|
||||||
((ent->client->ps.stats[STAT_RQ3] & RQ3_PLAYERSOLID) != RQ3_PLAYERSOLID)) {
|
((ent->client->ps.stats[STAT_RQ3] & RQ3_PLAYERSOLID) != RQ3_PLAYERSOLID)) {
|
||||||
pm.tracemask = MASK_PLAYERSOLID & ~CONTENTS_BODY;
|
pm.tracemask = MASK_PLAYERSOLID & ~CONTENTS_BODY;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.122 2002/11/13 00:50:38 jbravo
|
||||||
|
// Fixed item dropping, specmode selection on death and helmet probs.
|
||||||
|
//
|
||||||
// Revision 1.121 2002/10/29 01:34:52 jbravo
|
// Revision 1.121 2002/10/29 01:34:52 jbravo
|
||||||
// Added g_RQ3_tdmMode (0 = TP style, 1 = DM style) including UI support.
|
// Added g_RQ3_tdmMode (0 = TP style, 1 = DM style) including UI support.
|
||||||
//
|
//
|
||||||
|
@ -1536,6 +1539,7 @@ void ClientSpawn(gentity_t * ent)
|
||||||
// find a spawn point
|
// find a spawn point
|
||||||
// do it before setting health back up, so farthest
|
// do it before setting health back up, so farthest
|
||||||
// ranging doesn't count this client
|
// ranging doesn't count this client
|
||||||
|
|
||||||
if (client->sess.sessionTeam == TEAM_SPECTATOR) {
|
if (client->sess.sessionTeam == TEAM_SPECTATOR) {
|
||||||
if (g_gametype.integer == GT_CTF &&
|
if (g_gametype.integer == GT_CTF &&
|
||||||
(client->sess.savedTeam == TEAM_RED || client->sess.savedTeam == TEAM_BLUE)) {
|
(client->sess.savedTeam == TEAM_RED || client->sess.savedTeam == TEAM_BLUE)) {
|
||||||
|
@ -1567,8 +1571,7 @@ void ClientSpawn(gentity_t * ent)
|
||||||
spawnPoint = SelectCTFSpawnPoint(client->sess.sessionTeam,
|
spawnPoint = SelectCTFSpawnPoint(client->sess.sessionTeam,
|
||||||
client->pers.teamState.state, spawn_origin, spawn_angles);
|
client->pers.teamState.state, spawn_origin, spawn_angles);
|
||||||
// JBravo: If we are in Teamplay mode, use the teamspawnpoints.
|
// JBravo: If we are in Teamplay mode, use the teamspawnpoints.
|
||||||
} else if (g_gametype.integer == GT_TEAMPLAY) {
|
} else if (g_gametype.integer == GT_TEAMPLAY || (g_gametype.integer == GT_TEAM && client->sess.teamSpawn)) {
|
||||||
|
|
||||||
// Freud: Assign the spawns from the spawning system (g_teamplay.c)
|
// Freud: Assign the spawns from the spawning system (g_teamplay.c)
|
||||||
level.team1spawnpoint = level.teamplay_spawns[0];
|
level.team1spawnpoint = level.teamplay_spawns[0];
|
||||||
level.team2spawnpoint = level.teamplay_spawns[1];
|
level.team2spawnpoint = level.teamplay_spawns[1];
|
||||||
|
@ -1865,7 +1868,12 @@ void ClientSpawn(gentity_t * ent)
|
||||||
ent->client->ps.stats[STAT_HOLDABLE_ITEM] |= (1 << HI_SILENCER);
|
ent->client->ps.stats[STAT_HOLDABLE_ITEM] |= (1 << HI_SILENCER);
|
||||||
ent->client->ps.stats[STAT_HOLDABLE_ITEM] |= (1 << HI_BANDOLIER);
|
ent->client->ps.stats[STAT_HOLDABLE_ITEM] |= (1 << HI_BANDOLIER);
|
||||||
ent->client->ps.stats[STAT_HOLDABLE_ITEM] |= (1 << HI_SLIPPERS);
|
ent->client->ps.stats[STAT_HOLDABLE_ITEM] |= (1 << HI_SLIPPERS);
|
||||||
ent->client->uniqueItems = 5;
|
if (g_RQ3_haveHelmet.integer) {
|
||||||
|
ent->client->ps.stats[STAT_HOLDABLE_ITEM] |= (1 << HI_HELMET);
|
||||||
|
ent->client->uniqueItems = 6;
|
||||||
|
} else {
|
||||||
|
ent->client->uniqueItems = 5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// JBravo: lock the player down
|
// JBravo: lock the player down
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.176 2002/11/13 00:50:38 jbravo
|
||||||
|
// Fixed item dropping, specmode selection on death and helmet probs.
|
||||||
|
//
|
||||||
// Revision 1.175 2002/10/30 20:04:34 jbravo
|
// Revision 1.175 2002/10/30 20:04:34 jbravo
|
||||||
// Adding helmet
|
// Adding helmet
|
||||||
//
|
//
|
||||||
|
@ -1085,7 +1088,7 @@ void SetTeam(gentity_t * ent, char *s)
|
||||||
// execute the team change
|
// execute the team change
|
||||||
//
|
//
|
||||||
//sLiCeR: Matchmode referee hear all protection
|
//sLiCeR: Matchmode referee hear all protection
|
||||||
if(g_gametype.integer == GT_TEAMPLAY && (oldTeam == TEAM_FREE || oldTeam == TEAM_SPECTATOR) && (team == TEAM_RED || team == TEAM_BLUE))
|
if(g_gametype.integer >= GT_TEAM && (oldTeam == TEAM_FREE || oldTeam == TEAM_SPECTATOR) && (team == TEAM_RED || team == TEAM_BLUE))
|
||||||
ent->client->sess.refHear = qfalse;
|
ent->client->sess.refHear = qfalse;
|
||||||
|
|
||||||
// if the player was dead leave the body
|
// if the player was dead leave the body
|
||||||
|
@ -1167,8 +1170,16 @@ void SetTeam(gentity_t * ent, char *s)
|
||||||
ClientUserinfoChanged(clientNum);
|
ClientUserinfoChanged(clientNum);
|
||||||
ClientBegin(clientNum);
|
ClientBegin(clientNum);
|
||||||
}
|
}
|
||||||
if (g_gametype.integer == GT_CTF)
|
if (g_gametype.integer == GT_CTF || (g_gametype.integer == GT_TEAM && client->sess.savedTeam == TEAM_SPECTATOR))
|
||||||
MakeSpectator (ent);
|
MakeSpectator (ent);
|
||||||
|
// JBravo: If the game is in progress, lets spawn players joining.
|
||||||
|
if (g_gametype.integer == GT_TEAM && level.team_round_going &&
|
||||||
|
(client->sess.savedTeam == TEAM_RED || client->sess.savedTeam == TEAM_BLUE)) {
|
||||||
|
client->ps.persistant[PERS_SAVEDTEAM] = client->sess.savedTeam;
|
||||||
|
client->ps.persistant[PERS_TEAM] = client->sess.savedTeam;
|
||||||
|
client->sess.sessionTeam = client->sess.savedTeam;
|
||||||
|
respawn (ent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.145 2002/11/13 00:50:38 jbravo
|
||||||
|
// Fixed item dropping, specmode selection on death and helmet probs.
|
||||||
|
//
|
||||||
// Revision 1.144 2002/10/30 20:04:34 jbravo
|
// Revision 1.144 2002/10/30 20:04:34 jbravo
|
||||||
// Adding helmet
|
// Adding helmet
|
||||||
//
|
//
|
||||||
|
@ -637,15 +640,27 @@ void CheckTeamRules()
|
||||||
|
|
||||||
void StartLCA()
|
void StartLCA()
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
|
gentity_t *player;
|
||||||
|
|
||||||
CleanLevel();
|
CleanLevel();
|
||||||
trap_Cvar_Set("g_RQ3_lca", "1");
|
trap_Cvar_Set("g_RQ3_lca", "1");
|
||||||
level.lights_camera_action = (41 * level.fps) / 10;
|
level.lights_camera_action = (41 * level.fps) / 10;
|
||||||
G_LogPrintf("LIGHTS...\n");
|
G_LogPrintf("LIGHTS...\n");
|
||||||
if (g_gametype.integer == GT_TEAMPLAY) {
|
if (g_gametype.integer == GT_TEAMPLAY || g_gametype.integer == GT_TEAM) {
|
||||||
SpawnPlayers();
|
SpawnPlayers();
|
||||||
} else {
|
} else if (g_gametype.integer == GT_CTF) {
|
||||||
RQ3_Respawn_CTB_players(TEAM_RED);
|
RQ3_Respawn_CTB_players(TEAM_RED);
|
||||||
RQ3_Respawn_CTB_players(TEAM_BLUE);
|
RQ3_Respawn_CTB_players(TEAM_BLUE);
|
||||||
|
if (g_RQ3_limchasecam.integer != 0 && g_RQ3_matchmode.integer ) {
|
||||||
|
for (i = 0; i < level.maxclients; i++) {
|
||||||
|
player = &g_entities[i];
|
||||||
|
if (!player->inuse || !player->client)
|
||||||
|
continue;
|
||||||
|
if (player->client->sess.sub != TEAM_FREE)
|
||||||
|
Cmd_FollowCycle_f(player, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
level.lights_delay = 4;
|
level.lights_delay = 4;
|
||||||
}
|
}
|
||||||
|
@ -1345,6 +1360,10 @@ void RQ3_Respawn_CTB_players(int team)
|
||||||
ent = &g_entities[i];
|
ent = &g_entities[i];
|
||||||
if (!ent->inuse || !ent->client)
|
if (!ent->inuse || !ent->client)
|
||||||
continue;
|
continue;
|
||||||
|
if (g_RQ3_matchmode.integer && ent->client->sess.sub != TEAM_FREE)
|
||||||
|
continue;
|
||||||
|
if (ent->client->sess.savedTeam == TEAM_SPECTATOR && ent->client->specMode == SPECTATOR_FREE)
|
||||||
|
continue;
|
||||||
if (ent->client->sess.savedTeam == team && (ent->client->sess.spectatorState == SPECTATOR_FREE ||
|
if (ent->client->sess.savedTeam == team && (ent->client->sess.spectatorState == SPECTATOR_FREE ||
|
||||||
level.lights_camera_action)) {
|
level.lights_camera_action)) {
|
||||||
ent->client->weaponCount[ent->client->ps.weapon] = ent->client->savedPSweapon;
|
ent->client->weaponCount[ent->client->ps.weapon] = ent->client->savedPSweapon;
|
||||||
|
@ -1353,6 +1372,9 @@ void RQ3_Respawn_CTB_players(int team)
|
||||||
ent->client->ps.persistant[PERS_TEAM] = team;
|
ent->client->ps.persistant[PERS_TEAM] = team;
|
||||||
ent->client->sess.spectatorState = SPECTATOR_NOT;
|
ent->client->sess.spectatorState = SPECTATOR_NOT;
|
||||||
ent->client->specMode = SPECTATOR_NOT;
|
ent->client->specMode = SPECTATOR_NOT;
|
||||||
|
ent->client->idletime = 0;
|
||||||
|
ResetKills(ent);
|
||||||
|
ent->client->last_damaged_players[0] = '\0';
|
||||||
ClientSpawn(ent);
|
ClientSpawn(ent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1365,12 +1387,13 @@ void MakeSpectator(gentity_t * ent)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
client = ent->client;
|
client = ent->client;
|
||||||
|
|
||||||
if (g_gametype.integer == GT_TEAMPLAY && client->sess.sessionTeam == TEAM_SPECTATOR)
|
if (g_gametype.integer == GT_TEAMPLAY && client->sess.sessionTeam == TEAM_SPECTATOR)
|
||||||
return;
|
return;
|
||||||
if (!client->gibbed || ent->s.eType != ET_INVISIBLE)
|
if (!client->gibbed || ent->s.eType != ET_INVISIBLE)
|
||||||
CopyToBodyQue(ent);
|
CopyToBodyQue(ent);
|
||||||
|
|
||||||
if (g_gametype.integer == GT_TEAMPLAY) {
|
if (g_gametype.integer >= GT_TEAM) {
|
||||||
for (i = 0; i < level.maxclients; i++) {
|
for (i = 0; i < level.maxclients; i++) {
|
||||||
follower = &g_entities[i];
|
follower = &g_entities[i];
|
||||||
if (!follower->inuse || !follower->client)
|
if (!follower->inuse || !follower->client)
|
||||||
|
@ -1384,6 +1407,7 @@ void MakeSpectator(gentity_t * ent)
|
||||||
Cmd_FollowCycle_f(follower, 1);
|
Cmd_FollowCycle_f(follower, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_gametype.integer == GT_CTF) {
|
if (g_gametype.integer == GT_CTF) {
|
||||||
client->savedPSweapon = client->weaponCount[ent->client->ps.weapon];
|
client->savedPSweapon = client->weaponCount[ent->client->ps.weapon];
|
||||||
client->savedSTAT = client->ps.stats[STAT_WEAPONS];
|
client->savedSTAT = client->ps.stats[STAT_WEAPONS];
|
||||||
|
@ -1445,13 +1469,46 @@ void MakeSpectator(gentity_t * ent)
|
||||||
client->ps.stats[STAT_RQ3] &= ~RQ3_ZCAM;
|
client->ps.stats[STAT_RQ3] &= ~RQ3_ZCAM;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (OKtoFollow(ent - g_entities)) {
|
if (client->specMode == SPECTATOR_NOT) {
|
||||||
client->sess.spectatorState = client->specMode;
|
|
||||||
} else {
|
|
||||||
client->ps.pm_flags &= ~PMF_FOLLOW;
|
client->ps.pm_flags &= ~PMF_FOLLOW;
|
||||||
client->ps.stats[STAT_RQ3] &= ~RQ3_ZCAM;
|
client->ps.stats[STAT_RQ3] &= ~RQ3_ZCAM;
|
||||||
client->sess.spectatorState = SPECTATOR_FREE;
|
client->sess.spectatorState = SPECTATOR_FREE;
|
||||||
StopFollowing(ent);
|
client->specMode = SPECTATOR_FREE;
|
||||||
|
}
|
||||||
|
if (client->specMode == SPECTATOR_FOLLOW) {
|
||||||
|
if (OKtoFollow(ent - g_entities)) {
|
||||||
|
client->sess.spectatorState = SPECTATOR_FOLLOW;
|
||||||
|
client->ps.pm_flags |= PMF_FOLLOW;
|
||||||
|
client->ps.stats[STAT_RQ3] &= ~RQ3_ZCAM;
|
||||||
|
ClientSpawn(ent);
|
||||||
|
Cmd_FollowCycle_f(ent, 1);
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
client->sess.spectatorState = SPECTATOR_FREE;
|
||||||
|
client->ps.pm_flags &= ~PMF_FOLLOW;
|
||||||
|
client->ps.stats[STAT_RQ3] &= ~RQ3_ZCAM;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (client->specMode == SPECTATOR_ZCAM) {
|
||||||
|
if (OKtoFollow(ent - g_entities)) {
|
||||||
|
client->sess.spectatorState = SPECTATOR_ZCAM;
|
||||||
|
client->ps.pm_flags &= ~PMF_FOLLOW;
|
||||||
|
client->ps.stats[STAT_RQ3] |= RQ3_ZCAM;
|
||||||
|
ClientSpawn(ent);
|
||||||
|
if (client->camera->mode == CAMERA_MODE_SWING) {
|
||||||
|
CameraSwingCycle (ent, 1);
|
||||||
|
} else if (client->camera->mode == CAMERA_MODE_FLIC) {
|
||||||
|
CameraFlicBegin (ent);
|
||||||
|
} else {
|
||||||
|
client->camera->mode = CAMERA_MODE_SWING;
|
||||||
|
CameraSwingCycle (ent, 1);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
client->sess.spectatorState = SPECTATOR_FREE;
|
||||||
|
client->ps.pm_flags &= ~PMF_FOLLOW;
|
||||||
|
client->ps.stats[STAT_RQ3] &= ~RQ3_ZCAM;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ClientSpawn(ent);
|
ClientSpawn(ent);
|
||||||
|
@ -1481,10 +1538,6 @@ qboolean OKtoFollow(int clientnum)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
x++;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (x > 0) {
|
|
||||||
return qtrue;
|
return qtrue;
|
||||||
}
|
}
|
||||||
return qfalse;
|
return qfalse;
|
||||||
|
|
Loading…
Reference in a new issue