]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into morphed/splashfx morphed/splashfx
authorMario <mario@smbclan.net>
Tue, 15 Aug 2017 17:01:28 +0000 (03:01 +1000)
committerMario <mario@smbclan.net>
Tue, 15 Aug 2017 17:01:28 +0000 (03:01 +1000)
# Conflicts:
# qcsrc/common/physics/movetypes/movetypes.qc

1  2 
qcsrc/client/weapons/projectile.qc
qcsrc/common/effects/all.inc
qcsrc/common/physics/movetypes/movetypes.qc
qcsrc/lib/self.qh

index 2f8157de46023090422322ecdf24b4ed89622141,3d2d32d9af16bff4eeb0c6ca89d1e7951c71e1c5..be1431ba20f895a78dd701f29a49c16036c54505
  .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)
                {
Simple merge
index 7f0ae281c57bdcd8a5588827fe48c0c6984e35c8,995c65b4d322061a7f00d0b5f0899a4480af02a4..091e38d47e97934d35ef9faceb9d58767156cc5c
@@@ -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)
index ec43a34022592ae86b5c0c26ec23c5005ffcc938,f4c246f33058997803e1291f243286cfce99362d..3bc9375dd8b1e1ca188119f620b758726c617062
@@@ -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)