From: Mario Date: Tue, 15 Aug 2017 17:01:28 +0000 (+1000) Subject: Merge branch 'master' into morphed/splashfx X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fheads%2Fmorphed%2Fsplashfx;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into morphed/splashfx # Conflicts: # qcsrc/common/physics/movetypes/movetypes.qc --- 3c20255e34c61fa37d8e9c5dd6f7d7bfff2cb995 diff --cc qcsrc/client/weapons/projectile.qc index 2f8157de4,3d2d32d9a..be1431ba2 --- a/qcsrc/client/weapons/projectile.qc +++ b/qcsrc/client/weapons/projectile.qc @@@ -16,20 -19,12 +19,20 @@@ .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; @@@ -340,9 -355,8 +363,9 @@@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool 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) { diff --cc qcsrc/common/physics/movetypes/movetypes.qc index 7f0ae281c,995c65b4d..091e38d47 --- a/qcsrc/common/physics/movetypes/movetypes.qc +++ b/qcsrc/common/physics/movetypes/movetypes.qc @@@ -252,15 -256,15 +256,15 @@@ bool _Movetype_CheckWater(entity this 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) @@@ -294,11 -298,11 +298,11 @@@ void _Movetype_CheckWaterTransition(ent 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) diff --cc qcsrc/lib/self.qh index ec43a3402,f4c246f33..3bc9375dd --- a/qcsrc/lib/self.qh +++ b/qcsrc/lib/self.qh @@@ -77,10 -81,12 +81,18 @@@ SELFWRAP(blocked, void, (), (entity thi 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)