QUAKED trigger_location (.1 .5 .1) ? When an ent is asked for it's location, it will return this ent's "message" field if it is in it. "message" - location name NOTE: always rectangular */
| 568 | NOTE: always rectangular |
| 569 | */ |
| 570 | char *G_GetLocationForEnt( gentity_t *ent ) |
| 571 | { |
| 572 | vec3_t mins, maxs; |
| 573 | gentity_t *found = NULL; |
| 574 | |
| 575 | VectorAdd( ent->currentOrigin, ent->mins, mins ); |
| 576 | VectorAdd( ent->currentOrigin, ent->maxs, maxs ); |
| 577 | |
| 578 | while( (found = G_Find(found, FOFS(classname), "trigger_location")) != NULL ) |
| 579 | { |
| 580 | if ( gi.EntityContact( mins, maxs, found ) ) |
| 581 | { |
| 582 | return found->message; |
| 583 | } |
| 584 | } |
| 585 | |
| 586 | return NULL; |
| 587 | } |
| 588 | |
| 589 | void SP_trigger_location( gentity_t *ent ) |
| 590 | { |
no test coverage detected