Hi
In g_utils.c -> G_SetOrigin I changed the function slightly:
void G_SetOrigin( gentity_t *ent, vec3_t origin ) {
VectorCopy( origin, ent->s.pos.trBase );
ent->s.pos.trType = TR_STATIONARY;
ent->s.pos.trTime = 0;
ent->s.pos.trDuration = 0;
VectorClear( ent->s.pos.trDelta );
VectorCopy( origin, ent->r.currentOrigin );
VectorCopy( origin, ent->s.origin ); // CHRUKER: Now it works on spawn points too.
if( ent->client ) {
VectorCopy( origin, ent->client->ps.origin );
}
}
However it got me thinking. Why the three places (s.origin, r.currentOrigin and s.pos.trBase) to set the origin? I know one of them is shared by both the client and server ®. And the other two are server side (s), right?
Assuming that does the server side ones ever get copied into the shared one?