1
This commit is contained in:
parent
41b3485be1
commit
b554d706c9
@ -1,5 +1,7 @@
|
|||||||
#include "precompile.h"
|
#include "precompile.h"
|
||||||
|
|
||||||
|
#include <a8/magicenum.h>
|
||||||
|
|
||||||
#include "mt/InGameVoice.h"
|
#include "mt/InGameVoice.h"
|
||||||
|
|
||||||
IMPL_TABLE(mt::InGameVoice)
|
IMPL_TABLE(mt::InGameVoice)
|
||||||
@ -9,8 +11,39 @@ int mt::InGameVoice::series_kill_interval = 0;
|
|||||||
namespace mt
|
namespace mt
|
||||||
{
|
{
|
||||||
|
|
||||||
|
static InGameVoiceNotifyObject_e ParseNotifyObject(const std::string& type)
|
||||||
|
{
|
||||||
|
if (type == "global") {
|
||||||
|
return InGameVoiceNotifyObject_e::kGlobal;
|
||||||
|
} else if (type == "killer") {
|
||||||
|
return InGameVoiceNotifyObject_e::kKiller;
|
||||||
|
} else if (type == "!killer") {
|
||||||
|
return InGameVoiceNotifyObject_e::kNoKiller;
|
||||||
|
} else if (type == "killer_team") {
|
||||||
|
return InGameVoiceNotifyObject_e::kKillerTeam;
|
||||||
|
} else if (type == "!killer_team") {
|
||||||
|
return InGameVoiceNotifyObject_e::kNoKillerTeam;
|
||||||
|
} else if (type == "dead") {
|
||||||
|
return InGameVoiceNotifyObject_e::kDead;
|
||||||
|
} else if (type == "!dead") {
|
||||||
|
return InGameVoiceNotifyObject_e::kNoDead;
|
||||||
|
} else if (type == "dead_team") {
|
||||||
|
return InGameVoiceNotifyObject_e::kDeadTeam;
|
||||||
|
} else if (type == "!dead_team") {
|
||||||
|
return InGameVoiceNotifyObject_e::kNoDeadTeam;
|
||||||
|
} else if (type == "teammate_exclude_dead") {
|
||||||
|
return InGameVoiceNotifyObject_e::kTeammateExcludeDead;
|
||||||
|
} else {
|
||||||
|
A8_ABORT();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void InGameVoice::Init1()
|
void InGameVoice::Init1()
|
||||||
{
|
{
|
||||||
|
if (a8::GetEnumName<InGameVoiceEventType_e>(event_type()).empty()) {
|
||||||
|
A8_ABORT();
|
||||||
|
}
|
||||||
|
_notify_object = ParseNotifyObject(notify_object());
|
||||||
}
|
}
|
||||||
|
|
||||||
void InGameVoice::Init2()
|
void InGameVoice::Init2()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user