engine: client: fix crash if server sends new movevars before entities were created

Nothing bad will happen if we skip wave height for world entity for now, but
we might need to handle this situation somehow in the future.
This commit is contained in:
Alibek Omarov 2025-02-17 12:53:11 +03:00
parent 2465782a3e
commit f84d865f4a

View file

@ -83,7 +83,10 @@ static void CL_ParseNewMovevars( sizebuf_t *msg )
R_SetupSky( clgame.movevars.skyName );
clgame.oldmovevars = clgame.movevars;
clgame.entities->curstate.scale = clgame.movevars.waveHeight;
// FIXME: set world wave height when entities will be allocated
if( clgame.entities )
clgame.entities->curstate.scale = clgame.movevars.waveHeight;
// keep features an actual!
clgame.oldmovevars.features = clgame.movevars.features = host.features;