i have edited the ClientSpawn function[g_client] this way:
if( revived ) {
spawnPoint = ent;
VectorCopy( ent->r.currentOrigin, spawn_origin );
spawn_origin[2] += 9; // spawns seem to be sunk into ground?
VectorCopy( ent->s.angles, spawn_angles );
} else {
// Arnout: let's just be sure it does the right thing at all times. (well maybe not the right thing, but at least not the bad thing!)
//if( client->sess.sessionTeam == TEAM_SPECTATOR || client->sess.sessionTeam == TEAM_FREE ) {
if( client->sess.sessionTeam != TEAM_AXIS && client->sess.sessionTeam != TEAM_ALLIES ) {
spawnPoint = SelectSpectatorSpawnPoint( spawn_origin, spawn_angles );
} else {
for(k=0; k<level.numConnectedClients; k++) {
cl = level.clients + level.sortedClients[k];
// now search for a medic
if (!(cl == ent->client) && ( cl->sess.sessionTeam == ent->client->sess.sessionTeam ) && (cl->sess.latchPlayerType == PC_MEDIC) ) {
// found, spawn client to medics origin
spawnPoint = SelectCTFSpawnPoint( client->sess.sessionTeam, client->pers.teamState.state, cl->ps.origin, spawn_angles, client->sess.spawnObjectiveIndex );
} else {
// if no medic, go standard way (-> spawn at bunker )
spawnPoint = SelectCTFSpawnPoint( client->sess.sessionTeam, client->pers.teamState.state, spawn_origin, spawn_angles, client->sess.spawnObjectiveIndex );
}
}
}
}
it if not revieved and not spec look for a client that is a medic,in my team and not me and then spawn me into his current position(origin).
but i wont work, it only spawns the medic back to the “standard spawn” and the client wihtch should be transfered instead still spawns at standart spawn like bunker in battery.
so whats wrong?