Polls the engine for the sequencer of the entity matching the name passed
| 11222 | |
| 11223 | //Polls the engine for the sequencer of the entity matching the name passed |
| 11224 | int CQuake3GameInterface::GetByName( const char *name ) |
| 11225 | { |
| 11226 | gentity_t *ent; |
| 11227 | entitylist_t::iterator ei; |
| 11228 | char temp[1024]; |
| 11229 | |
| 11230 | if ( name == NULL || name[0] == '\0' ) |
| 11231 | return -1; |
| 11232 | |
| 11233 | strncpy( (char *) temp, name, sizeof(temp) ); |
| 11234 | temp[sizeof(temp)-1] = 0; |
| 11235 | |
| 11236 | ei = m_EntityList.find( Q_strupr( (char *) temp ) ); |
| 11237 | |
| 11238 | if ( ei == m_EntityList.end() ) |
| 11239 | return -1; |
| 11240 | |
| 11241 | ent = &g_entities[(*ei).second]; |
| 11242 | |
| 11243 | return ent->s.number; |
| 11244 | |
| 11245 | // this now returns the ent instead of the sequencer -- dmv 06/27/01 |
| 11246 | // if (ent == NULL) |
| 11247 | // return NULL; |
| 11248 | // return ent->sequencer; |
| 11249 | } |
| 11250 | |
| 11251 | // (g_entities[m_ownerID].svFlags&SVF_ICARUS_FREEZE) |
| 11252 | // return -1 indicates invalid |
no test coverage detected