MCPcopy Create free account
hub / github.com/assaultcube/AC / gotoentity

Function gotoentity

source/src/editing.cpp:411–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

409}
410
411void gotoentity(int *n)
412{
413 if(noteditmode("gotoentity")) return;
414 if(ents.inrange(*n) && ents[*n].type != NOTUSED)
415 {
416 player1->o.x = ents[*n].x;
417 player1->o.y = ents[*n].y;
418 player1->o.z = ents[*n].z;
419 player1->yaw = ((ents[*n].attr1 / ENTSCALE10) % 360 + 360) % 360; // works for most ;)
420 player1->pitch = 0;
421 player1->resetinterp();
422 }
423}
424COMMAND(gotoentity, "i");
425
426void gotoposition(char *x, char *y, char *z, char *yaw, char *pitch)

Callers

nothing calls this directly

Calls 3

noteditmodeFunction · 0.85
inrangeMethod · 0.80
resetinterpMethod · 0.80

Tested by

no test coverage detected