| 2037 | } |
| 2038 | |
| 2039 | S32 zNPCBalloonBoy::ParseSysEvent(NPCSysEvent* sed) |
| 2040 | { |
| 2041 | zPlatform* plat; |
| 2042 | S32 handled = 1; |
| 2043 | |
| 2044 | switch (sed->toEvent) |
| 2045 | { |
| 2046 | case eEventNPCSpecial_PlatformSnap: |
| 2047 | this->plat_balloons = NULL; |
| 2048 | plat = (zPlatform*)sed->toParamWidget; |
| 2049 | if (plat != NULL && plat->baseType == eBaseTypePlatform) |
| 2050 | { |
| 2051 | this->plat_balloons = plat; |
| 2052 | } |
| 2053 | if (this->plat_balloons == NULL) |
| 2054 | { |
| 2055 | plat = (zPlatform*)sed->from; |
| 2056 | if (plat != NULL && plat->baseType == eBaseTypePlatform) |
| 2057 | { |
| 2058 | this->plat_balloons = plat; |
| 2059 | } |
| 2060 | } |
| 2061 | if (this->plat_balloons != NULL) |
| 2062 | { |
| 2063 | this->psy_instinct->GoalSet(NPC_GOAL_BALLOON, 1); |
| 2064 | } |
| 2065 | else |
| 2066 | { |
| 2067 | this->psy_instinct->GoalSet(NPC_GOAL_IDLE, 1); |
| 2068 | } |
| 2069 | break; |
| 2070 | |
| 2071 | case eEventNPCSetActiveOn: |
| 2072 | case eEventNPCSetActiveOff: |
| 2073 | handled = 0; |
| 2074 | break; |
| 2075 | |
| 2076 | case eEventNPCSpecial_PlatformFall: |
| 2077 | break; |
| 2078 | default: |
| 2079 | if (this->IAmBallooning()) |
| 2080 | { |
| 2081 | handled = 1; |
| 2082 | } |
| 2083 | else |
| 2084 | { |
| 2085 | handled = 0; |
| 2086 | } |
| 2087 | break; |
| 2088 | } |
| 2089 | |
| 2090 | return handled; |
| 2091 | } |
| 2092 | |
| 2093 | void zNPCBalloonBoy::PlatAnimSet(en_BBOY_PLATANIM platanim) |
| 2094 | { |
no test coverage detected