================ G_SetOrigin Sets the pos trajectory for a fixed position ================ */
| 1210 | ================ |
| 1211 | */ |
| 1212 | void 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 | |
| 1243 | qboolean G_CheckInSolidTeleport (const vec3_t& teleportPos, gentity_t *self) |
| 1244 | { |
no test coverage detected