void CTFObserver(edict_t *ent)
{
    char        userinfo[MAX_INFO_STRING];

    // start as 'observer'
//  if (ent->movetype == MOVETYPE_NOCLIP)


    ent->r.client->pers.next_player_class = 0;

    ent->r.client->resp.ctf_team = CTF_NOTEAM;

    ent->r.client->pers.player_class = 0;

    CTFPlayerResetGrapple(ent);
    CTFDeadDropFlag(ent);
    CTFDeadDropTech(ent);

    TossClientWeapon ( ent );



    ent->deadflag = DEAD_NO;
    ent->movetype = MOVETYPE_NOCLIP;

    ent->s.effects = EF_CORPSE;
    ent->r.solid = SOLID_NOT;
    ent->r.svflags |= SVF_NOCLIENT;
    ent->r.client->ps.gunindex = 0;
    ent->r.client->pers.weapon = 0;

    ent->s.sound = 0;

    ent->r.client->weapon_sound = 0;

    ent->s.modelindex2 = 0;

    ent->s.modelindex3 = 0;

    WFPlayer_Die (ent);

    Kamikaze_Cancel(ent);
    memcpy (userinfo, ent->r.client->pers.userinfo, sizeof(userinfo));
    InitClientPersistant(ent->r.client);
    ClientUserinfoChanged (ent, userinfo);

    memset(ent->r.client->pers.inventory, 0, sizeof(ent->r.client->pers.inventory));

    WFPlayer_ChangeClassTeam(ent);

    VectorCopy (level.intermission_angle, ent->r.client->ps.viewangles);

    if(dpacks->value)

            TossClientBodyPack(ent);

    trap_LinkEntity (ent);



    ClientBeginDeathmatch(ent);
//  CTFOpenJoinMenu(ent);


}