fixed networked player1 stuck in CS_DEAD instead of CS_SPECTATE - just for follow ATM!
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1872 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user