Beispiel #1
0
/*
================
respawn
================
*/
void respawn( gentity_t *ent )
{
    int i;

    SpawnCorpse( ent );

    // Clients can't respawn - they must go through the class cmd
    ent->client->pers.classSelection = PCL_NONE;
    ClientSpawn( ent, NULL, NULL, NULL );

    // stop any following clients that don't have sticky spec on
    for( i = 0; i < level.maxclients; i++ )
    {
        if( level.clients[ i ].sess.spectatorState == SPECTATOR_FOLLOW &&
                level.clients[ i ].sess.spectatorClient == ent - g_entities )
        {
            if( !( level.clients[ i ].pers.stickySpec ) )
            {
                if( !G_FollowNewClient( &g_entities[ i ], 1 ) )
                    G_StopFollowing( &g_entities[ i ] );
            }
            else
                G_FollowLockView( &g_entities[ i ] );
        }
    }
}
/*
================
respawn
================
*/
void respawn( gentity_t *ent )
{
  SpawnCorpse( ent );

  // Clients can't respawn - they must go through the class cmd
  ent->client->pers.classSelection = PCL_NONE;
  ClientSpawn( ent, NULL, NULL, NULL );
}