mirror of https://github.com/AxioDL/metaforce.git
CStateMachine: Fix state name lookup
This commit is contained in:
parent
a342859b51
commit
ce646610cc
|
@ -20,10 +20,10 @@ CStateMachine::CStateMachine(CInputStream& in) {
|
||||||
std::string name;
|
std::string name;
|
||||||
while (name.size() < 31) {
|
while (name.size() < 31) {
|
||||||
const auto chr = in.ReadChar();
|
const auto chr = in.ReadChar();
|
||||||
name += chr;
|
|
||||||
if (chr == '\0') {
|
if (chr == '\0') {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
name += chr;
|
||||||
}
|
}
|
||||||
CAiStateFunc func = CAi::GetStateFunc(name);
|
CAiStateFunc func = CAi::GetStateFunc(name);
|
||||||
x0_states.emplace_back(func, name.c_str());
|
x0_states.emplace_back(func, name.c_str());
|
||||||
|
|
Loading…
Reference in New Issue