| 4598 | } |
| 4599 | |
| 4600 | void GuideBot::DoMessage(const char *str, bool f_high_priority, const char *sound_name, bool f_sound_2d) { |
| 4601 | if ((memory->flags & GBF_NO_CHATTER) && !f_high_priority) |
| 4602 | return; |
| 4603 | |
| 4604 | if (memory->last_sound_time + 2.5f < Game_GetTime()) { |
| 4605 | if (sound_name) { |
| 4606 | int s_id = Sound_FindId(sound_name); |
| 4607 | if (f_sound_2d) |
| 4608 | Sound_Play2d(memory->me, s_id); |
| 4609 | else |
| 4610 | Sound_Play3d(memory->me, s_id); |
| 4611 | } |
| 4612 | |
| 4613 | memory->last_sound_time = Game_GetTime(); |
| 4614 | } |
| 4615 | |
| 4616 | char gb_message[256]; |
| 4617 | snprintf(gb_message, sizeof(gb_message), "\1\255\255\1%s:\1\1\255\1 %s", memory->name, str); |
| 4618 | Player_AddHudMessage(memory->my_player, gb_message); |
| 4619 | } |
| 4620 | |
| 4621 | bool GuideBot::SetSubMode(int me, char sub_mode, int it) { |
| 4622 | switch (sub_mode) { |
nothing calls this directly
no test coverage detected