MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / process_client

Method process_client

Engine/source/afx/afxMagicSpell.cpp:2052–2147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2050// private
2051
2052void afxMagicSpell::process_client(F32 dt)
2053{
2054 mSpell_elapsed += dt; //SPELL_ELAPSED
2055
2056 U8 pending_state = mSpell_state;
2057
2058 // check for state changes
2059 switch (mSpell_state)
2060 {
2061 case INACTIVE_STATE:
2062 if (mMarks_mask & MARK_ACTIVATE)
2063 pending_state = CASTING_STATE;
2064 break;
2065 case CASTING_STATE:
2066 if (mMarks_mask & MARK_INTERRUPT_CASTING)
2067 pending_state = CLEANUP_STATE;
2068 else if (mMarks_mask & MARK_END_CASTING)
2069 pending_state = DELIVERY_STATE;
2070 else if (mDatablock->mLaunch_on_server_signal)
2071 {
2072 if (mMarks_mask & MARK_LAUNCH)
2073 pending_state = DELIVERY_STATE;
2074 }
2075 else
2076 {
2077 if (state_expired())
2078 pending_state = DELIVERY_STATE;
2079 }
2080 break;
2081 case DELIVERY_STATE:
2082 if (mMarks_mask & MARK_INTERRUPT_DELIVERY)
2083 pending_state = CLEANUP_STATE;
2084 else if (mMarks_mask & MARK_END_DELIVERY)
2085 pending_state = LINGER_STATE;
2086 else if (mMarks_mask & MARK_IMPACT)
2087 pending_state = LINGER_STATE;
2088 else
2089 state_expired();
2090 break;
2091 case LINGER_STATE:
2092 if (mMarks_mask & MARK_INTERRUPT_LINGER)
2093 pending_state = CLEANUP_STATE;
2094 else if (mMarks_mask & MARK_END_LINGER)
2095 pending_state = CLEANUP_STATE;
2096 else if (mMarks_mask & MARK_SHUTDOWN)
2097 pending_state = CLEANUP_STATE;
2098 else if (state_expired())
2099 pending_state = CLEANUP_STATE;
2100 break;
2101 case CLEANUP_STATE:
2102 if ((mMarks_mask & MARK_INTERRUPT_CLEANUP) || cleanup_over())
2103 pending_state = DONE_STATE;
2104 break;
2105 }
2106
2107 if (mSpell_state != pending_state)
2108 change_state_c(pending_state);
2109

Callers

nothing calls this directly

Calls 8

undefinedMethod · 0.80
getListenerMethod · 0.80
setReferencePointMethod · 0.60
getPositionMethod · 0.45
getTransformMethod · 0.45
setReferenceObjectMethod · 0.45
sampleMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected