Example #1
0
/**
 * @brief G_AdjustClientPositions
 * @param[in] ent
 * @param[in] time
 * @param[in] forward
 */
static void G_AdjustClientPositions(gentity_t *ent, int time, qboolean forward)
{
	int       i;
	gentity_t *list;

	for (i = 0; i < level.numConnectedClients; i++, list++)
	{
		list = g_entities + level.sortedClients[i];
		// ok lets test everything under the sun
		if (list->client &&
		    list->inuse &&
		    (list->client->sess.sessionTeam == TEAM_AXIS || list->client->sess.sessionTeam == TEAM_ALLIES) &&
		    (list != ent) &&
		    list->r.linked &&
		    (list->health > 0) &&
		    !(list->client->ps.pm_flags & PMF_LIMBO) &&
		    (list->client->ps.pm_type == PM_NORMAL)
		    )
		{
			if (forward)
			{
				G_AdjustSingleClientPosition(list, time);
			}
			else
			{
				G_ReAdjustSingleClientPosition(list);
			}
		}
	}
}
Example #2
0
void G_AdjustClientPositions(gentity_t *ent, int time, qboolean forward) {
	int i;
	gentity_t *list;

	for (i = 0; i < level.numConnectedClients; i++) {
		list = g_entities + level.sortedClients[i];

		if (list != ent && IS_ACTIVE(list)) {
			if (forward) {
				G_AdjustSingleClientPosition(list, time);
			} else {G_ReAdjustSingleClientPosition(list);}
		}
	}
}
Example #3
0
void G_AdjustClientPositions( gentity_t* ent, int time, qboolean forward ) {
	int	i;
	gentity_t	*list;

	for( i = 0; i < level.numConnectedClients; i++, list++ ) {
		list = g_entities + level.sortedClients[i];
		// unlagged doesn't adjust the firing client
		if (list == ent) continue;
		if(forward) {
			G_AdjustSingleClientPosition( list, time, NULL);
		} else {
			G_ReAdjustSingleClientPosition( list );
		}

	}
}