mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-11 07:37:52 +00:00
Fix collision being calculated on unlagged value for both players and bots.
This commit is contained in:
parent
5ca7bb5f12
commit
46a3e729db
@ -67,17 +67,19 @@ qboolean SV_CopyEdictToPhysEnt( physent_t *pe, edict_t *ed )
|
|||||||
VectorCopy( ed->v.origin, pe->origin );
|
VectorCopy( ed->v.origin, pe->origin );
|
||||||
VectorCopy( ed->v.angles, pe->angles );
|
VectorCopy( ed->v.angles, pe->angles );
|
||||||
|
|
||||||
if( FBitSet( ed->v.flags, FL_FAKECLIENT ))
|
if( FBitSet( ed->v.flags, FL_CLIENT ))
|
||||||
{
|
|
||||||
// bot
|
|
||||||
Q_strncpy( pe->name, "bot", sizeof( pe->name ));
|
|
||||||
pe->player = pe->info;
|
|
||||||
}
|
|
||||||
else if( FBitSet( ed->v.flags, FL_CLIENT ))
|
|
||||||
{
|
{
|
||||||
// client
|
// client
|
||||||
SV_GetTrueOrigin( &svs.clients[pe->info - 1], pe->info, pe->origin );
|
SV_GetTrueOrigin( &svs.clients[pe->info - 1], pe->info, pe->origin );
|
||||||
Q_strncpy( pe->name, "player", sizeof( pe->name ));
|
if( FBitSet( ed->v.flags, FL_FAKECLIENT )) // fakeclients have client flag too
|
||||||
|
{
|
||||||
|
// bot
|
||||||
|
Q_strncpy( pe->name, "bot", sizeof( pe->name ));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Q_strncpy( pe->name, "player", sizeof( pe->name ));
|
||||||
|
}
|
||||||
pe->player = pe->info;
|
pe->player = pe->info;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -177,7 +179,7 @@ void SV_GetTrueOrigin( sv_client_t *cl, int edictnum, vec3_t origin )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if( svgame.interp[edictnum-1].active && svgame.interp[edictnum-1].moving )
|
if( svgame.interp[edictnum-1].active && svgame.interp[edictnum-1].moving )
|
||||||
VectorCopy( svgame.interp[edictnum-1].newpos, origin );
|
VectorCopy( svgame.interp[edictnum-1].oldpos, origin );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SV_GetTrueMinMax( sv_client_t *cl, int edictnum, vec3_t mins, vec3_t maxs )
|
void SV_GetTrueMinMax( sv_client_t *cl, int edictnum, vec3_t mins, vec3_t maxs )
|
||||||
|
Loading…
Reference in New Issue
Block a user