MCPcopy Create free account
hub / github.com/JACoders/OpenJK / Affect

Method Affect

codeJK2/icarus/Sequencer.cpp:2128–2174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2126*/
2127
2128int CSequencer::Affect( int id, int type )
2129{
2130 CSequence *sequence = GetSequence( id );
2131
2132 if ( sequence == NULL )
2133 {
2134 return SEQ_FAILED;
2135 }
2136
2137 switch ( type )
2138 {
2139
2140 case TYPE_FLUSH:
2141
2142 //Get rid of all old code
2143 Flush( sequence );
2144
2145 sequence->RemoveFlag( SQ_PENDING, true );
2146
2147 m_curSequence = sequence;
2148
2149 Prime( m_taskManager, PopCommand( POP_BACK ) );
2150
2151 break;
2152
2153 case TYPE_INSERT:
2154
2155 Recall();
2156
2157 sequence->SetReturn( m_curSequence );
2158
2159 sequence->RemoveFlag( SQ_PENDING, true );
2160
2161 m_curSequence = sequence;
2162
2163 Prime( m_taskManager, PopCommand( POP_BACK ) );
2164
2165 break;
2166
2167
2168 default:
2169 m_ie->I_DPrintf( WL_ERROR, "unknown affect type found" );
2170 break;
2171 }
2172
2173 return SEQ_OK;
2174}
2175
2176/*
2177========================

Callers 1

CheckAffectMethod · 0.45

Calls 2

RemoveFlagMethod · 0.45
SetReturnMethod · 0.45

Tested by

no test coverage detected