.float scale;
.vector colormod;
- void SUB_Stop(entity this)
+ void SUB_Stop(entity this, entity toucher)
{
- this.move_velocity = this.move_avelocity = '0 0 0';
- this.move_movetype = MOVETYPE_NONE;
+ this.velocity = this.avelocity = '0 0 0';
+ set_movetype(this, MOVETYPE_NONE);
}
- void Projectile_ContentsTransition(int prev, int current)
- {ENGINE_EVENT();
++void Projectile_ContentsTransition(entity this, int prev, int current)
++{
+ if(current == CONTENT_WATER)
+ {
- pointparticles(EFFECT_WATER_SPLASH_SMALL, this.move_origin, '0 0 0', 1);
++ pointparticles(EFFECT_WATER_SPLASH_SMALL, this.origin, '0 0 0', 1);
+ }
+}
+
void Projectile_ResetTrail(entity this, vector to)
{
this.trail_oldorigin = to;
this.maxs = '0 0 0';
this.colormod = '0 0 0';
settouch(this, SUB_Stop);
- this.move_movetype = MOVETYPE_TOSS;
+ set_movetype(this, MOVETYPE_TOSS);
this.alphamod = 1;
- this.contentstransition = Projectile_ContentsTransition;
++ setcontentstransition(this, Projectile_ContentsTransition);
switch (this.cnt)
{
point.z += this.mins.z + 1;
int nativecontents = pointcontents(point);
- if(this.move_watertype && this.move_watertype != nativecontents)
+ if(this.watertype && this.watertype != nativecontents)
{
- // dprintf("_Movetype_CheckWater(): Original: '%d', New: '%d'\n", this.move_watertype, nativecontents);
- if(this.contentstransition)
- WITHSELF(this, this.contentstransition(this.move_watertype, nativecontents));
+ // dprintf("_Movetype_CheckWater(): Original: '%d', New: '%d'\n", this.watertype, nativecontents);
- if(this.contentstransition)
- this.contentstransition(this.watertype, nativecontents);
++ if(getcontentstransition(this))
++ getcontentstransition(this)(this, this.watertype, nativecontents);
}
- this.move_waterlevel = WATERLEVEL_NONE;
- this.move_watertype = CONTENT_EMPTY;
+ this.waterlevel = WATERLEVEL_NONE;
+ this.watertype = CONTENT_EMPTY;
int supercontents = Mod_Q1BSP_SuperContentsFromNativeContents(nativecontents);
if(supercontents & DPCONTENTS_LIQUIDSMASK)
return;
}
}
- else if(ent.move_watertype != contents)
+ else if(ent.watertype != contents)
{
- // dprintf("_Movetype_CheckWaterTransition(): Origin: %s, Direct: '%d', Original: '%d', New: '%d'\n", vtos(ent.move_origin), pointcontents(ent.move_origin), ent.move_watertype, contents);
- if(ent.contentstransition)
- WITHSELF(ent, ent.contentstransition(ent.move_watertype, contents));
+ // dprintf("_Movetype_CheckWaterTransition(): Origin: %s, Direct: '%d', Original: '%d', New: '%d'\n", vtos(ent.origin), pointcontents(ent.origin), ent.watertype, contents);
- if(ent.contentstransition)
- ent.contentstransition(ent.watertype, contents);
++ if(getcontentstransition(ent))
++ getcontentstransition(ent)(ent, ent.watertype, contents);
}
if(contents <= CONTENT_WATER)
SELFWRAP(predraw, void, (), (entity this), (this))
#define setpredraw(e, f) SELFWRAP_SET(predraw, e, f)
- SELFWRAP(customizeentityforclient, bool, (), (entity this), (this))
+ #ifdef GAMEQC
+ SELFWRAP(customizeentityforclient, bool, (), (entity this, entity client), (this, other))
#define setcefc(e, f) SELFWRAP_SET(customizeentityforclient, e, f)
#define getcefc(e) SELFWRAP_GET(customizeentityforclient, e)
+ #endif
+
++#ifdef GAMEQC
++SELFWRAP(contentstransition, void, (int prev, int current), (entity this, int prev, int current), (this, prev, current))
++#define setcontentstransition(e, f) SELFWRAP_SET(contentstransition, e, f)
++#define getcontentstransition(e) SELFWRAP_GET(contentstransition, e)
++#endif
+
SELFWRAP(camera_transform, vector, (vector org, vector ang), (entity this, vector org, vector ang), (this, org, ang))
#define setcamera_transform(e, f) SELFWRAP_SET(camera_transform, e, f)