setthink(this, conveyor_think);
this.nextthink = time;
this.setactive = generic_netlinked_setactive;
- IFTARGETED
+ if(this.targetname && this.targetname != "")
{
// backwards compatibility
this.use = generic_netlinked_legacy_use;
if (GetResource(this, RES_HEALTH))
return;
- IFTARGETED
+ if(this.targetname && this.targetname != "")
return;
if (this.items)
return;
if (GetResource(this, RES_HEALTH))
return;
- IFTARGETED
+ if(this.targetname && this.targetname != "")
return;
if (this.items)
return;
setblocked(this, secret_blocked);
this.speed = 50;
this.use = fd_secret_use;
- IFTARGETED
- {
- }
- else
+ if(!this.targetname || this.targetname == "")
this.spawnflags |= DOOR_SECRET_YES_SHOOT;
if (this.spawnflags & DOOR_SECRET_YES_SHOOT)
Net_LinkEntity(this, (this.spawnflags & PARTICLES_VISCULLING), 0, pointparticles_SendEntity);
- IFTARGETED
+ if(this.targetname && this.targetname != "")
{
// backwards compatibility
this.use = generic_netlinked_legacy_use;
this.setactive = laser_setactive;
- IFTARGETED
+ if(this.targetname && this.targetname != "")
{
// backwards compatibility
this.use = laser_use;
//setorigin(this, this.origin + '0 0 27'); // To fix a mappers' habit as old as Quake
setorigin(this, this.origin);
- IFTARGETED
- {
- }
- else
+ if(!this.targetname || this.targetname == "")
{
objerror (this, "^3Teleport destination without a targetname");
return; // don't link it to CSQC in this case!
void plat_reset(entity this)
{
- IFTARGETED
+ if(this.targetname && this.targetname != "")
{
setorigin(this, this.pos1);
this.state = STATE_UP;
if(!this.atten)
{
- IFTARGETED
+ if(this.targetname && this.targetname != "")
this.atten = ATTEN_NORM;
else
this.atten = ATTEN_STATIC;
if(!this.volume)
this.volume = 1;
- IFTARGETED
+ if(this.targetname && this.targetname != "")
{
if(this.spawnflags & SPEAKER_ACTIVATOR)
this.use = target_speaker_use_activator;
this.active = ACTIVE_ACTIVE;
this.setactive = generic_setactive;
- IFTARGETED
+ if(this.targetname && this.targetname != "")
{
// legacy use
this.use = trigger_gravity_use;
setthink(this, multivibrator_send_think);
this.nextthink = max(1, time);
- IFTARGETED
+ if(this.targetname && this.targetname != "")
multivibrator_reset(this);
}
#endif
void generic_netlinked_reset(entity this)
{
- IFTARGETED
+ if(this.targetname && this.targetname != "")
{
if(this.spawnflags & START_ENABLED)
{
.float height;
-#define IFTARGETED if(this.targetname && this.targetname != "")
-
.float lip;
// used elsewhere (will fix)