this.mins = '0 0 0';
this.maxs = '0 0 0';
this.colormod = '0 0 0';
- this.move_touch = SUB_Stop_self;
+ settouch(this, SUB_Stop_self);
this.move_movetype = MOVETYPE_TOSS;
this.alphamod = 1;
this.mins = '0 0 -4';
this.maxs = '0 0 -4';
this.move_movetype = MOVETYPE_BOUNCE;
- this.move_touch = func_null;
+ settouch(this, func_null);
this.move_bounce_factor = WEP_CVAR_SEC(electro, bouncefactor);
this.move_bounce_stopspeed = WEP_CVAR_SEC(electro, bouncestop);
break;
this.mins = '-3 -3 -3';
this.maxs = '3 3 3';
this.move_movetype = MOVETYPE_BOUNCE;
- this.move_touch = func_null;
+ settouch(this, func_null);
this.move_bounce_factor = WEP_CVAR(mortar, bouncefactor);
this.move_bounce_stopspeed = WEP_CVAR(mortar, bouncestop);
break;
this.colormod = '2 1 1';
this.alphamod = 0.5;
this.move_movetype = MOVETYPE_BOUNCE;
- this.move_touch = func_null;
+ settouch(this, func_null);
break;
case PROJECTILE_PORTO_BLUE:
this.colormod = '1 1 2';
this.alphamod = 0.5;
this.move_movetype = MOVETYPE_BOUNCE;
- this.move_touch = func_null;
+ settouch(this, func_null);
break;
case PROJECTILE_HAGAR_BOUNCING:
this.move_movetype = MOVETYPE_BOUNCE;
- this.move_touch = func_null;
+ settouch(this, func_null);
break;
case PROJECTILE_CRYLINK_BOUNCING:
this.move_movetype = MOVETYPE_BOUNCE;
- this.move_touch = func_null;
+ settouch(this, func_null);
break;
case PROJECTILE_FIREBALL:
loopsound(this, CH_SHOTS_SINGLE, SND(FIREBALL_FLY2), VOL_BASE, ATTEN_NORM);
case PROJECTILE_FIREMINE:
loopsound(this, CH_SHOTS_SINGLE, SND(FIREBALL_FLY), VOL_BASE, ATTEN_NORM);
this.move_movetype = MOVETYPE_BOUNCE;
- this.move_touch = func_null;
+ settouch(this, func_null);
this.mins = '-4 -4 -4';
this.maxs = '4 4 4';
break;
casing.move_angles = casing.angles;
casing.move_avelocity = '0 250 0' + 100 * prandomvec();
casing.move_movetype = MOVETYPE_BOUNCE;
- casing.move_touch = Casing_Touch;
+ settouch(casing, Casing_Touch);
casing.move_time = time;
casing.event_damage = Casing_Damage;
casing.solid = SOLID_TRIGGER;
gib.draw = Gib_Draw;
if(destroyontouch)
- gib.move_touch = Gib_Touch;
+ settouch(gib, Gib_Touch);
else
- gib.move_touch = SUB_RemoveOnNoImpact;
+ settouch(gib, SUB_RemoveOnNoImpact);
// don't spawn gibs inside solid - just don't
if(org != safeorg)
}
self.colormod = nade_type.m_color;
self.move_movetype = MOVETYPE_BOUNCE;
- self.move_touch = func_null;
+ settouch(self, func_null);
self.scale = 1.5;
self.avelocity = randomvec() * 720;
{
entity oldother = other;
- if(this.move_touch)
+ if(gettouch(this))
{
other = oth;
- WITHSELF(this, this.move_touch());
+ WITHSELF(this, gettouch(this)());
other = oldother;
}
- if(oth.move_touch)
+ if(gettouch(oth))
{
other = this;
- WITHSELF(oth, oth.move_touch());
+ WITHSELF(oth, gettouch(oth)());
other = oldother;
}
FOREACH_ENTITY_RADIUS(0.5 * (this.absmin + this.absmax), 0.5 * vlen(this.absmax - this.absmin), true, {
if (it.solid == SOLID_TRIGGER && it != this)
if (it.move_nomonsters != MOVE_NOMONSTERS && it.move_nomonsters != MOVE_WORLDONLY)
- if (it.move_touch && boxesoverlap(it.absmin, it.absmax, this.absmin, this.absmax))
+ if (gettouch(it) && boxesoverlap(it.absmin, it.absmax, this.absmin, this.absmax))
{
other = this;
trace_plane_dist = 0;
trace_ent = this;
- WITHSELF(it, it.move_touch());
+ WITHSELF(it, gettouch(it)());
}
});
.int move_flags;
.int move_watertype;
.int move_waterlevel;
-.void()move_touch;
.void(float, float)contentstransition;
.float move_bounce_factor;
.float move_bounce_stopspeed;
trigger_common_read(this, false);
this.solid = SOLID_TRIGGER;
- this.move_touch = func_ladder_touch;
+ settouch(this, func_ladder_touch);
this.drawmask = MASK_NORMAL;
this.move_time = time;
this.entremove = func_ladder_remove;
}
// now enable touch
-#ifdef SVQC
settouch(this, Teleport_Touch);
-
+#ifdef SVQC
trigger_teleport_link(this);
-#elif defined(CSQC)
- this.move_touch = Teleport_Touch;
#endif
}
this.entremove = trigger_remove_generic;
this.move_time = time;
- if(this.radius) { this.move_touch = trigger_impulse_touch3; }
- else if(this.target) { this.move_touch = trigger_impulse_touch1; }
- else { this.move_touch = trigger_impulse_touch2; }
+ if (this.radius) { settouch(this, trigger_impulse_touch3); }
+ else if (this.target) { settouch(this, trigger_impulse_touch1); }
+ else { settouch(this, trigger_impulse_touch2); }
}
#endif
this.entremove = trigger_remove_generic;
this.solid = SOLID_TRIGGER;
- this.move_touch = trigger_push_touch;
+ settouch(this, trigger_push_touch);
this.move_time = time;
defer(this, 0.25, trigger_push_findtarget);
this.classname = "trigger_swamp";
this.solid = SOLID_TRIGGER;
- this.move_touch = swamp_touch;
+ settouch(this, swamp_touch);
this.drawmask = MASK_NORMAL;
this.move_time = time;
this.entremove = trigger_remove_generic;
#define use use1
.void(entity this, entity actor, entity trigger) use;
+#define touch move_touch
#endif