Hide spectator reflection and fix moving in 3rd person perspective

Earlier in third person perspective:
1. reflection of the spectator (player1) was visible on the water (at least
after full cycle of spectate mode switching);
2. it was possible to move position of the invisible spectator's (player1)
ghost, although he should be attached to spectated player. Bug was visible
on the water (the reflection moved) and in some cases on minimap - when
player executed "spectate" and later "spectatemode 1", then camera stayed
in the same position, but player position changed.

Thanks BrutalSystem
This commit is contained in:
aurhat
2021-02-15 05:29:36 +01:00
committed by drian
parent 973e1fa87c
commit b8b0eb96bd
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -1089,7 +1089,7 @@ void renderclients()
{
playerent *d;
loopv(players) if((d = players[i]) && d->state!=CS_SPAWNING && d->state!=CS_SPECTATE && (!player1->isspectating() || player1->spectatemode != SM_FOLLOW1ST || player1->followplayercn != i)) renderclientp(d);
if(player1->state==CS_DEAD || (reflecting && !refracting)) renderclientp(player1);
if(player1->state==CS_DEAD || ((reflecting && !refracting) && (player1->state!=CS_SPECTATE || player1->spectatemode==SM_FLY))) renderclientp(player1);
}
void loadallmapmodels() // try to find all mapmodels in packages/models/mapmodels