MCPcopy Create free account
hub / github.com/JACoders/OpenJK / G_SetOrigin

Function G_SetOrigin

code/game/g_utils.cpp:1212–1241  ·  view source on GitHub ↗

================ G_SetOrigin Sets the pos trajectory for a fixed position ================ */

Source from the content-addressed store, hash-verified

1210================
1211*/
1212void G_SetOrigin( gentity_t *ent, const vec3_t origin )
1213{
1214 VectorCopy( origin, ent->s.pos.trBase );
1215 if(ent->client)
1216 {
1217 VectorCopy( origin, ent->client->ps.origin );
1218 VectorCopy( origin, ent->s.origin );
1219 }
1220 else
1221 {
1222 ent->s.pos.trType = TR_STATIONARY;
1223 }
1224 ent->s.pos.trTime = 0;
1225 ent->s.pos.trDuration = 0;
1226 VectorClear( ent->s.pos.trDelta );
1227
1228 VectorCopy( origin, ent->currentOrigin );
1229
1230 // clear waypoints
1231 if( ent->client && ent->NPC )
1232 {
1233 ent->waypoint = 0;
1234 ent->lastWaypoint = 0;
1235 if( NAV::HasPath( ent ) )
1236 {
1237 NAV::ClearPath( ent );
1238 }
1239 }
1240
1241}
1242
1243qboolean G_CheckInSolidTeleport (const vec3_t& teleportPos, gentity_t *self)
1244{

Callers 15

G_StartMatrixEffectFunction · 0.70
G_DismemberFunction · 0.70
G_DamageFunction · 0.70
SP_fx_runnerFunction · 0.70
fx_explosion_trail_useFunction · 0.70
SP_fx_explosion_trailFunction · 0.70
SP_fx_target_beamFunction · 0.70
SP_fx_cloudlayerFunction · 0.70
Q3_SetOriginFunction · 0.70
MoveOwnerFunction · 0.70
Q3_SetTeleportDestFunction · 0.70
Q3_SetBStateFunction · 0.70

Calls 2

VectorCopyFunction · 0.85
VectorClearFunction · 0.85

Tested by

no test coverage detected