void CInfoAlias::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) { if(m_iMode==0){ //Old On/Off Code if (pev->spawnflags & SF_ALIAS_OFF) { if (pev->spawnflags & SF_ALIAS_DEBUG) ALERT(at_debug,"DEBUG: info_alias %s turns on\n",STRING(pev->targetname)); pev->spawnflags &= ~SF_ALIAS_OFF; pev->noise = pev->target; } else { if (pev->spawnflags & SF_ALIAS_DEBUG) ALERT(at_debug,"DEBUG: info_alias %s turns off\n",STRING(pev->targetname)); pev->spawnflags |= SF_ALIAS_OFF; pev->noise = pev->netname; } UTIL_AddToAliasList( this ); } else{ //AJH - new list mode for info_alias pev->noise = m_iTargetName[m_iCurrentTarget]; // pev->message = m_iTargetName[m_iCurrentTarget]; if (useType==USE_OFF){ m_iCurrentTarget--; if(m_iCurrentTarget <= -1) m_iCurrentTarget=m_cTargets; }else{ m_iCurrentTarget++; if(m_iCurrentTarget >= m_cTargets) m_iCurrentTarget=0; } if (pev->spawnflags & SF_ALIAS_DEBUG) ALERT(at_debug,"DEBUG: info_alias %s refers to target entity number %d \n",STRING(pev->targetname),m_iTargetName[m_iCurrentTarget]); ALERT(at_debug,"DEBUG: info_alias %s steps to target %d \n",STRING(pev->targetname),m_iCurrentTarget); UTIL_AddToAliasList(this); } }
void CLocusAlias::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) { m_hChangeTo = pActivator; UTIL_AddToAliasList( this ); }
void CInfoAlias::ChangeValue( int iszValue ) { pev->noise = iszValue; UTIL_AddToAliasList( this ); }