mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-31 17:24:15 +00:00
engine: client: try to fix random crash in CL_ClearWorld when using legacy protocol
This commit is contained in:
parent
25d6b2b069
commit
101a7a1240
@ -1066,14 +1066,16 @@ void CL_LinkUserMessage( char *pszName, const int svc_num, int iSize )
|
|||||||
|
|
||||||
void CL_ClearWorld( void )
|
void CL_ClearWorld( void )
|
||||||
{
|
{
|
||||||
cl_entity_t *worldmodel;
|
if( clgame.entities ) // check if we have entities, legacy protocol support kinda breaks this logic
|
||||||
|
{
|
||||||
|
cl_entity_t *worldmodel = clgame.entities;
|
||||||
|
|
||||||
worldmodel = clgame.entities;
|
worldmodel->curstate.modelindex = 1; // world model
|
||||||
worldmodel->curstate.modelindex = 1; // world model
|
worldmodel->curstate.solid = SOLID_BSP;
|
||||||
worldmodel->curstate.solid = SOLID_BSP;
|
worldmodel->curstate.movetype = MOVETYPE_PUSH;
|
||||||
worldmodel->curstate.movetype = MOVETYPE_PUSH;
|
worldmodel->model = cl.worldmodel;
|
||||||
worldmodel->model = cl.worldmodel;
|
worldmodel->index = 0;
|
||||||
worldmodel->index = 0;
|
}
|
||||||
|
|
||||||
world.max_recursion = 0;
|
world.max_recursion = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user