Skip to content

Commit

Permalink
engine: client: fix crash if server sends new movevars before entitie…
Browse files Browse the repository at this point in the history
…s 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.
  • Loading branch information
a1batross committed Feb 17, 2025
1 parent 2465782 commit f84d865
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion engine/client/cl_parse_gs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f84d865

Please # to comment.