void SP_sensor_buildable( gentity_t *self ) { SP_WaitFields(self, 0.5f, 0); SP_ConditionFields( self ); self->touch = sensor_buildable_touch; self->act = sensor_act; self->reset = sensor_reset; InitBrushSensor( self ); }
void SP_ctrl_relay( gentity_t *self ) { if( Q_stricmp(self->classname, S_CTRL_RELAY ) ) //if anything but ctrl_relay { if ( !self->config.wait.time ) { // check delay for backwards compatibility G_SpawnFloat( "delay", "0", &self->config.wait.time ); //target delay had previously a default of 1 instead of 0 if ( !self->config.wait.time && !Q_stricmp(self->classname, "target_delay") ) { self->config.wait.time = 1; } } SP_WaitFields(self, 0, 0 ); self->act = target_relay_act; return; } SP_WaitFields(self, 0, 0 ); self->act = ctrl_relay_act; self->reset = ctrl_relay_reset; }
void SP_env_afx_push( gentity_t *self ) { SP_WaitFields(self, 0.5f, 0); self->s.eType = entityType_t::ET_PUSHER; self->touch = env_afx_push_touch; self->think = think_aimAtTarget; self->nextthink = level.time + FRAMETIME; self->act = env_afx_toggle; InitEnvAFXEntity( self, !(self->spawnflags & SPF_SPAWN_DISABLED ) ); // unlike other afx, we need to send this one to the client self->r.svFlags &= ~SVF_NOCLIENT; }
void SP_sensor_timer( gentity_t *self ) { SP_WaitFields(self, 1.0f, (self->classname[0] == 'f') ? 1.0f : 0.0f); //wait variance default only for func_timer self->act = sensor_timer_act; self->think = sensor_timer_think; if ( self->spawnflags & 1 ) { self->nextthink = level.time + FRAMETIME; self->activator = self; } self->r.svFlags = SVF_NOCLIENT; }
void SP_sensor_player( gentity_t *self ) { SP_WaitFields(self, 0.5f, 0); SP_ConditionFields( self ); if(!Q_stricmp(self->classname, "trigger_multiple")) { self->touch = trigger_multiple_touch; self->act = trigger_multiple_act; self->reset = trigger_multiple_compat_reset; } else { self->touch = sensor_player_touch; self->act = sensor_act; self->reset = sensor_reset; } InitBrushSensor( self ); }