QUAKED trigger_once (.5 1 .5) ? PLAYERONLY FACING USE_BUTTON FIRE_BUTTON NPCONLY x x INACTIVE MULTIPLE PLAYERONLY - only a player can trigger this by touch FACING - Won't fire unless triggering ent's view angles are within 45 degrees of trigger's angles (in addition to any other conditions) USE_BUTTON - Won't fire unless player is in it and pressing use button (in addition to any other conditions)
| 501 | "soundSet" Ambient sound set to play when this trigger is activated |
| 502 | */ |
| 503 | void SP_trigger_once( gentity_t *ent ) |
| 504 | { |
| 505 | char buffer[MAX_QPATH]; |
| 506 | char *s; |
| 507 | if ( G_SpawnString( "noise", "*NOSOUND*", &s ) ) |
| 508 | { |
| 509 | Q_strncpyz( buffer, s, sizeof(buffer) ); |
| 510 | COM_DefaultExtension( buffer, sizeof(buffer), ".wav"); |
| 511 | ent->noise_index = G_SoundIndex(buffer); |
| 512 | } |
| 513 | |
| 514 | ent->wait = -1; |
| 515 | |
| 516 | ent->e_TouchFunc = touchF_Touch_Multi; |
| 517 | ent->e_UseFunc = useF_Use_Multi; |
| 518 | |
| 519 | if ( ent->team && ent->team[0] ) |
| 520 | { |
| 521 | ent->noDamageTeam = (team_t)GetIDForString( TeamTable, ent->team ); |
| 522 | ent->team = NULL; |
| 523 | } |
| 524 | |
| 525 | ent->delay *= 1000;//1 = 1 msec, 1000 = 1 sec |
| 526 | |
| 527 | InitTrigger( ent ); |
| 528 | gi.linkentity (ent); |
| 529 | } |
| 530 | |
| 531 | |
| 532 | /*QUAKED trigger_bidirectional (.1 .5 .1) ? PLAYER_ONLY x x x x x x INACTIVE |
nothing calls this directly
no test coverage detected