diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index d1374573..8e1e3b88 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -6,7 +6,7 @@ int nextmode = 0; // nextmode becomes gamemode after next map load VAR(gamemode, 1, 0, 0); -VAR(followmode, 0, 1, 1); // follow(0) or embody(1) +VARF(followmode, 0, 1, 1, if(player1->state==CS_SPECTATE) followplayer (player1->followplayercn)); // follow(0) or embody(1) flaginfo flaginfos[2]; @@ -824,6 +824,7 @@ void refreshsopmenu(void *menu, bool init) void followplayer(int j) { if(player1->state==CS_ALIVE) return; + player1->state = CS_SPECTATE; // fix CS_DEAD state showscores(false); player1->spectating = (followmode==1) ? SM_EMBODYPLAYER : SM_FOLLOWPLAYER; if(players.length()) diff --git a/source/src/rendermodel.cpp b/source/src/rendermodel.cpp index 1d222c60..1a6f77c0 100644 --- a/source/src/rendermodel.cpp +++ b/source/src/rendermodel.cpp @@ -474,6 +474,9 @@ void renderclient(playerent *d, const char *mdlname, const char *vwepname, int t a[0].name = vwepname; a[0].tag = "tag_weapon"; } + // FIXME: while networked my state as spectator seems to stay CS_DEAD, not CS_SPECTATE + // flowtron: I fixed this for following at least (see followplayer()) + //if((player1->state == CS_DEAD || player1->state == CS_SPECTATE) && d->clientnum == player1->followplayercn && player1->spectating == SM_EMBODYPLAYER) anim |= ANIM_TRANSLUCENT; // see through followed player if(player1->state == CS_SPECTATE && d->clientnum == player1->followplayercn && player1->spectating == SM_EMBODYPLAYER) anim |= ANIM_TRANSLUCENT; // see through followed player rendermodel(mdlname, anim, tex, 1.5f, o, d->yaw+90, d->pitch/4, speed, basetime, d, a); if(isteam(player1->team, d->team)) renderaboveheadicon(d);