| 938 | } |
| 939 | |
| 940 | S32 zNPCTiki::SysEvent(xBase* from, xBase* to, U32 toEvent, const F32* toParam, |
| 941 | xBase* toParamWidget, S32* handled) |
| 942 | { |
| 943 | // TODO: Figure out event enum |
| 944 | switch (toEvent) |
| 945 | { |
| 946 | case 0x32: |
| 947 | if ((this->tikiFlag & 0x300) != 0x200 && this->explosion && this->explosion->initCB) |
| 948 | { |
| 949 | this->explosion->initCB(this->explosion, this->model, 0, 0); |
| 950 | } |
| 951 | |
| 952 | this->RemoveFromFamily(); |
| 953 | this->Reset(); |
| 954 | if (this->SelfType() != NPC_TYPE_TIKI_LOVEY) |
| 955 | { |
| 956 | this->tikiFlag |= 5; |
| 957 | this->tikiFlag &= ~8; |
| 958 | this->vel = 0.0f; |
| 959 | this->landHt = FLOAT_MIN; |
| 960 | } |
| 961 | |
| 962 | *handled = TRUE; |
| 963 | break; |
| 964 | |
| 965 | case 3: |
| 966 | case 0x1F7: |
| 967 | if ((this->tikiFlag & 0x300) != 0x200) |
| 968 | { |
| 969 | xEntShow(this); |
| 970 | |
| 971 | if (toParam) |
| 972 | { |
| 973 | S32 code = (S32)(0.5f + toParam[0]); |
| 974 | if (code == 'M') |
| 975 | { |
| 976 | zFXPopOn(*this, toParam[1], toParam[2]); |
| 977 | } |
| 978 | } |
| 979 | } |
| 980 | *handled = TRUE; |
| 981 | break; |
| 982 | |
| 983 | case 4: |
| 984 | case 0x1F8: |
| 985 | if (xEntIsVisible(this) && toParam) |
| 986 | { |
| 987 | S32 code = (S32)(0.5f + toParam[0]); |
| 988 | if (code == 'M') |
| 989 | { |
| 990 | zFXPopOff(*this, toParam[1], toParam[2]); |
| 991 | } |
| 992 | } |
| 993 | xEntHide(this); |
| 994 | *handled = TRUE; |
| 995 | break; |
| 996 | case 0x53: |
| 997 | if ((this->tikiFlag & 0x300) != 0x200) |
no test coverage detected