]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into TimePath/experiments/csqc_prediction
authorMario <zacjardine@y7mail.com>
Tue, 17 Feb 2015 19:49:51 +0000 (06:49 +1100)
committerMario <zacjardine@y7mail.com>
Tue, 17 Feb 2015 19:49:51 +0000 (06:49 +1100)
Conflicts:
qcsrc/server/miscfunctions.qc
qcsrc/server/miscfunctions.qh

1  2 
defaultXonotic.cfg
qcsrc/client/progs.src
qcsrc/common/csqcmodel_settings.qh
qcsrc/dpdefs/csprogsdefs.qh
qcsrc/server/cl_client.qc
qcsrc/server/miscfunctions.qh
qcsrc/server/t_plats.qc

diff --combined defaultXonotic.cfg
index f598c3c76b361fdb6fe0e3cbc1f0285206e7ec17,f66dc0128bdb87059cb2a4433fb81f8f7365c75a..19643ec210c93cd14460279935266435bb958584
@@@ -296,7 -296,6 +296,7 @@@ set sv_fraginfo_stats 1 "Enable statist
  
  // use default physics
  set sv_friction_on_land 0
 +set sv_friction_slick 0.5
  
  set sv_player_viewoffset "0 0 35" "view offset of the player model"
  set sv_player_mins "-16 -16 -24" "playermodel mins"
@@@ -473,7 -472,7 +473,7 @@@ set g_botclip_collisions 1 "0 = disabl
  set g_grappling_hook 0 "let players spawn with the grappling hook which allows them to pull themselves up"
  
  set g_spawn_alloweffects 1 "allow clients to enable spawn point and event effects such as particles and sounds, see cl_spawn_ cvars for more info"
- set g_spawn_furthest 0.5 "this amount of the spawns shall be far away from any players"
+ set g_spawn_furthest 1.0 "this amount of the spawns shall be far away from any players"
  set g_spawn_useallspawns 0 "use all spawns, e.g. also team spawns in non-teamplay, and all spawns, even enemy spawns, in teamplay"
  // respawn delay
  set g_respawn_delay_small 2 "small game number of seconds you have to wait before you can respawn again"
diff --combined qcsrc/client/progs.src
index 640a6d6e9791c5c657d792d10a3108643c31a683,f80da18d67309ace7482be0dd4ac37ac784cd1c0..fe371ae97b3759af2dd373bb511180a6c47326dc
@@@ -1,9 -1,7 +1,7 @@@
  ../../csprogs.dat
  
  ../common/util-pre.qh
- sys-pre.qh
  ../dpdefs/csprogsdefs.qh
- sys-post.qh
  
  announcer.qc
  bgmscript.qc
@@@ -48,7 -46,6 +46,7 @@@ weapons/projectile.qc // TOD
  ../common/nades.qc
  ../common/net_notice.qc
  ../common/notifications.qc
 +../common/physics.qc
  ../common/playerstats.qc
  ../common/test.qc
  ../common/urllib.qc
  ../csqcmodellib/interpolate.qc
  
  ../server/movelib.qc
 +../server/t_halflife.qc
  ../server/t_items.qc
 +../server/t_jumppads.qc
 +../server/t_plats.qc
 +
 +../server/mutators/mutator_multijump.qc
 +
  ../server/vehicles/bumblebee.qc
  
  ../warpzonelib/anglestransform.qc
index f3d4eb4a17061434ebc370da65d28bb7430d467b,fdc555e2460e69fd7f344de9f15dfcf65b2533f0..3fcd2ff0e9a0965ec08e682dca82942a77200a83
@@@ -8,7 -8,7 +8,7 @@@
  //#define CSQCMODEL_SUPPORT_GETTAGINFO_BEFORE_DRAW
  
  // server decides crouching, this lags, but so be it
 -#define CSQCMODEL_SERVERSIDE_CROUCH
 +//#define CSQCMODEL_SERVERSIDE_CROUCH
  
  // a hack for Xonotic
  #ifdef CSQC
@@@ -65,7 -65,7 +65,7 @@@
  #define CSQCPLAYER_HOOK_POSTCAMERASETUP
  
  // force updates of player entities that often even if unchanged
- const float CSQCPLAYER_FORCE_UPDATES = 0.25;
+ #define CSQCPLAYER_FORCE_UPDATES 0.25
  
  // mod must define:
  //vector PL_MIN  = ...;
index 1eddb129b717b7f17796955ccb4efdd475b87524,4effe6492446b65192b91d838bebd11da4828c1b..cd4f8d797669a1aa1174b124a9c8c6ce91a0c07d
@@@ -1,5 -1,8 +1,8 @@@
  #ifndef CSPROGSDEFS_H
  #define CSPROGSDEFS_H
+ #pragma noref 1
  /*
  ==============================================================================
  
@@@ -417,7 -420,6 +420,7 @@@ float( float a, ... ) min = #94
  float( float b, ... ) max = #95;
  float(float minimum, float val, float maximum) bound = #96;
  float(float f, float f) pow = #97;
 +entity(entity start, .entity fld, entity match) findentity = #98;
  entity(entity start, .float fld, float match) findfloat = #98;
  float(string s) checkextension = #99;
  // FrikaC and Telejano range #100-#199
@@@ -1418,6 -1420,12 +1421,12 @@@ void(float fh, entity e) writetofile = 
  float(string s) isfunction = #607;
  void(entity e, string s) parseentitydata = #608;
  
+ //DP_COVERAGE
+ //idea: divVerent
+ //darkplaces implementation: divVerent
+ //function definitions:
+ void coverage() = #642;  // Reports a coverage event. The engine counts for each of the calls to this builtin whether it has been called.
  // assorted builtins
  //const int STAT_MOVEVARS_TICRATE             = 240;
  //const int STAT_MOVEVARS_TIMESCALE           = 241;
@@@ -1445,4 -1453,7 +1454,7 @@@ vector gettaginfo_forward
  vector gettaginfo_right;
  vector gettaginfo_up;
  float checkpvs(vector viewpos, entity viewee) = #240;
+ #pragma noref 0
  #endif
index 53ec965030552c0bd76eb2af8811aa53ac90165a,405d558504a7399ae9b8d598049918cdb8a89a20..557e6518a1bce8aa566691f867498861569475ff
@@@ -18,7 -18,6 +18,7 @@@
  #include "weapons/weaponsystem.qh"
  
  #include "../common/net_notice.qh"
 +#include "../common/physics.qh"
  
  #include "../common/monsters/sv_monsters.qh"
  
@@@ -1001,7 -1000,7 +1001,7 @@@ float PlayerInIDList(entity p, string i
        float n, i;
        string s;
  
-       // NOTE: we do NOT check crypto_keyfp here, an unsigned ID is fine too for this
+       // NOTE: we do NOT check crypto_idfp_signed here, an unsigned ID is fine too for this
        if (!p.crypto_idfp)
                return 0;
  
@@@ -1655,17 -1654,55 +1655,17 @@@ void SetZoomState(float z
  
  void GetPressedKeys(void) {
        MUTATOR_CALLHOOK(GetPressedKeys);
 -      if (self.movement.x > 0) // get if movement keys are pressed
 -      {       // forward key pressed
 -              self.pressedkeys |= KEY_FORWARD;
 -              self.pressedkeys &= ~KEY_BACKWARD;
 -      }
 -      else if (self.movement.x < 0)
 -      {       // backward key pressed
 -              self.pressedkeys |= KEY_BACKWARD;
 -              self.pressedkeys &= ~KEY_FORWARD;
 -      }
 -      else
 -      {       // no x input
 -              self.pressedkeys &= ~KEY_FORWARD;
 -              self.pressedkeys &= ~KEY_BACKWARD;
 -      }
 -
 -      if (self.movement.y > 0)
 -      {       // right key pressed
 -              self.pressedkeys |= KEY_RIGHT;
 -              self.pressedkeys &= ~KEY_LEFT;
 -      }
 -      else if (self.movement.y < 0)
 -      {       // left key pressed
 -              self.pressedkeys |= KEY_LEFT;
 -              self.pressedkeys &= ~KEY_RIGHT;
 -      }
 -      else
 -      {       // no y input
 -              self.pressedkeys &= ~KEY_RIGHT;
 -              self.pressedkeys &= ~KEY_LEFT;
 -      }
 -
 -      if (self.BUTTON_JUMP) // get if jump and crouch keys are pressed
 -              self.pressedkeys |= KEY_JUMP;
 -      else
 -              self.pressedkeys &= ~KEY_JUMP;
 -      if (self.BUTTON_CROUCH)
 -              self.pressedkeys |= KEY_CROUCH;
 -      else
 -              self.pressedkeys &= ~KEY_CROUCH;
 -
 -      if (self.BUTTON_ATCK)
 -              self.pressedkeys |= KEY_ATCK;
 -      else
 -              self.pressedkeys &= ~KEY_ATCK;
 -      if (self.BUTTON_ATCK2)
 -              self.pressedkeys |= KEY_ATCK2;
 -      else
 -              self.pressedkeys &= ~KEY_ATCK2;
 +      #define X(var,bit,flag) (flag ? var |= bit : var &= ~bit)
 +      X(self.pressedkeys, KEY_FORWARD,        PHYS_INPUT_MOVEVALUES(self)_x > 0);
 +      X(self.pressedkeys, KEY_BACKWARD,       PHYS_INPUT_MOVEVALUES(self)_x < 0);
 +      X(self.pressedkeys, KEY_RIGHT,          PHYS_INPUT_MOVEVALUES(self)_y > 0);
 +      X(self.pressedkeys, KEY_LEFT,           PHYS_INPUT_MOVEVALUES(self)_y < 0);
 +
 +      X(self.pressedkeys, KEY_JUMP,           PHYS_INPUT_BUTTON_JUMP(self));
 +      X(self.pressedkeys, KEY_CROUCH,         PHYS_INPUT_BUTTON_CROUCH(self));
 +      X(self.pressedkeys, KEY_ATCK,           PHYS_INPUT_BUTTON_ATCK(self));
 +      X(self.pressedkeys, KEY_ATCK2,          PHYS_INPUT_BUTTON_ATCK2(self));
 +      #undef X
  }
  
  /*
index 7cebe9c5d17d59cb213fbd53b2478a19dc601ca3,f19f53fd0b3010d021308c2a29235f195097d1d1..4a2da3d50ce2a53710ab8925b1a4d25086d7034e
@@@ -106,6 -106,8 +106,6 @@@ void WarpZone_traceline_antilag (entit
  
  #define PROJECTILE_TOUCH if(WarpZone_Projectile_Touch()) return
  
 -#define move_out_of_solid(e) WarpZoneLib_MoveOutOfSolid(e)
 -
  const string STR_PLAYER = "player";
  const string STR_SPECTATOR = "spectator";
  const string STR_OBSERVER = "observer";
@@@ -242,266 -244,8 +242,8 @@@ float warmup_start_health
  float warmup_start_armorvalue;
  float g_weapon_stay;
  
- float want_weapon(entity weaponinfo, float allguns) // WEAPONTODO: what still needs done?
- {
-       int i = weaponinfo.weapon;
-       int d = 0;
-       if (!i)
-               return 0;
-       if (g_lms || g_ca || allguns)
-       {
-               if(weaponinfo.spawnflags & WEP_FLAG_NORMAL)
-                       d = true;
-               else
-                       d = false;
-       }
-       else if (g_cts)
-               d = (i == WEP_SHOTGUN);
-       else if (g_nexball)
-               d = 0; // weapon is set a few lines later
-       else
-               d = !(!weaponinfo.weaponstart);
-       if(g_grappling_hook) // if possible, redirect off-hand hook to on-hand hook
-               d |= (i == WEP_HOOK);
-       if(!g_cts && (weaponinfo.spawnflags & WEP_FLAG_MUTATORBLOCKED)) // never default mutator blocked guns
-               d = 0;
-       float t = weaponinfo.weaponstartoverride;
-       //print(strcat("want_weapon: ", weaponinfo.netname, " - d: ", ftos(d), ", t: ", ftos(t), ". \n"));
-       // bit order in t:
-       // 1: want or not
-       // 2: is default?
-       // 4: is set by default?
-       if(t < 0)
-               t = 4 | (3 * d);
-       else
-               t |= (2 * d);
-       return t;
- }
- void readplayerstartcvars()
- {
-       entity e;
-       float i, j, t;
-       string s;
-       // initialize starting values for players
-       start_weapons = '0 0 0';
-       start_weapons_default = '0 0 0';
-       start_weapons_defaultmask = '0 0 0';
-       start_items = 0;
-       start_ammo_shells = 0;
-       start_ammo_nails = 0;
-       start_ammo_rockets = 0;
-       start_ammo_cells = 0;
-       start_ammo_plasma = 0;
-       start_health = cvar("g_balance_health_start");
-       start_armorvalue = cvar("g_balance_armor_start");
-       g_weaponarena = 0;
-       g_weaponarena_weapons = '0 0 0';
-       s = cvar_string("g_weaponarena");
-       if (s == "0" || s == "")
-       {
-               if(g_ca)
-                       s = "most";
-       }
-       if (s == "0" || s == "")
-       {
-               // no arena
-       }
-       else if (s == "off")
-       {
-               // forcibly turn off weaponarena
-       }
-       else if (s == "all" || s == "1")
-       {
-               g_weaponarena = 1;
-               g_weaponarena_list = "All Weapons";
-               for (j = WEP_FIRST; j <= WEP_LAST; ++j)
-               {
-                       e = get_weaponinfo(j);
-                       if (!(e.spawnflags & WEP_FLAG_MUTATORBLOCKED))
-                               g_weaponarena_weapons |= WepSet_FromWeapon(j);
-               }
-       }
-       else if (s == "most")
-       {
-               g_weaponarena = 1;
-               g_weaponarena_list = "Most Weapons";
-               for (j = WEP_FIRST; j <= WEP_LAST; ++j)
-               {
-                       e = get_weaponinfo(j);
-                       if (!(e.spawnflags & WEP_FLAG_MUTATORBLOCKED))
-                               if (e.spawnflags & WEP_FLAG_NORMAL)
-                                       g_weaponarena_weapons |= WepSet_FromWeapon(j);
-               }
-       }
-       else if (s == "none")
-       {
-               g_weaponarena = 1;
-               g_weaponarena_list = "No Weapons";
-       }
-       else
-       {
-               g_weaponarena = 1;
-               t = tokenize_console(s);
-               g_weaponarena_list = "";
-               for (i = 0; i < t; ++i)
-               {
-                       s = argv(i);
-                       for (j = WEP_FIRST; j <= WEP_LAST; ++j)
-                       {
-                               e = get_weaponinfo(j);
-                               if (e.netname == s)
-                               {
-                                       g_weaponarena_weapons |= WepSet_FromWeapon(j);
-                                       g_weaponarena_list = strcat(g_weaponarena_list, e.message, " & ");
-                                       break;
-                               }
-                       }
-                       if (j > WEP_LAST)
-                       {
-                               print("The weapon mutator list contains an unknown weapon ", s, ". Skipped.\n");
-                       }
-               }
-               g_weaponarena_list = strzone(substring(g_weaponarena_list, 0, strlen(g_weaponarena_list) - 3));
-       }
-       if(g_weaponarena)
-               g_weaponarena_random = cvar("g_weaponarena_random");
-       else
-               g_weaponarena_random = 0;
-       g_weaponarena_random_with_blaster = cvar("g_weaponarena_random_with_blaster");
-       if (g_weaponarena)
-       {
-               g_weapon_stay = 0; // incompatible
-               start_weapons = g_weaponarena_weapons;
-               start_items |= IT_UNLIMITED_AMMO;
-       }
-       else
-       {
-               for (i = WEP_FIRST; i <= WEP_LAST; ++i)
-               {
-                       e = get_weaponinfo(i);
-                       int w = want_weapon(e, false);
-                       if(w & 1)
-                               start_weapons |= WepSet_FromWeapon(i);
-                       if(w & 2)
-                               start_weapons_default |= WepSet_FromWeapon(i);
-                       if(w & 4)
-                               start_weapons_defaultmask |= WepSet_FromWeapon(i);
-               }
-       }
-       if(!cvar("g_use_ammunition"))
-               start_items |= IT_UNLIMITED_AMMO;
-       if(start_items & IT_UNLIMITED_WEAPON_AMMO)
-       {
-               start_ammo_shells = 999;
-               start_ammo_nails = 999;
-               start_ammo_rockets = 999;
-               start_ammo_cells = 999;
-               start_ammo_plasma = 999;
-               start_ammo_fuel = 999;
-       }
-       else
-       {
-               start_ammo_shells = cvar("g_start_ammo_shells");
-               start_ammo_nails = cvar("g_start_ammo_nails");
-               start_ammo_rockets = cvar("g_start_ammo_rockets");
-               start_ammo_cells = cvar("g_start_ammo_cells");
-               start_ammo_plasma = cvar("g_start_ammo_plasma");
-               start_ammo_fuel = cvar("g_start_ammo_fuel");
-       }
-       if (warmup_stage)
-       {
-               warmup_start_ammo_shells = start_ammo_shells;
-               warmup_start_ammo_nails = start_ammo_nails;
-               warmup_start_ammo_rockets = start_ammo_rockets;
-               warmup_start_ammo_cells = start_ammo_cells;
-               warmup_start_ammo_plasma = start_ammo_plasma;
-               warmup_start_ammo_fuel = start_ammo_fuel;
-               warmup_start_health = start_health;
-               warmup_start_armorvalue = start_armorvalue;
-               warmup_start_weapons = start_weapons;
-               warmup_start_weapons_default = start_weapons_default;
-               warmup_start_weapons_defaultmask = start_weapons_defaultmask;
-               if (!g_weaponarena && !g_ca)
-               {
-                       warmup_start_ammo_shells = cvar("g_warmup_start_ammo_shells");
-                       warmup_start_ammo_nails = cvar("g_warmup_start_ammo_nails");
-                       warmup_start_ammo_rockets = cvar("g_warmup_start_ammo_rockets");
-                       warmup_start_ammo_cells = cvar("g_warmup_start_ammo_cells");
-                       warmup_start_ammo_plasma = cvar("g_warmup_start_ammo_plasma");
-                       warmup_start_ammo_fuel = cvar("g_warmup_start_ammo_fuel");
-                       warmup_start_health = cvar("g_warmup_start_health");
-                       warmup_start_armorvalue = cvar("g_warmup_start_armor");
-                       warmup_start_weapons = '0 0 0';
-                       warmup_start_weapons_default = '0 0 0';
-                       warmup_start_weapons_defaultmask = '0 0 0';
-                       for (i = WEP_FIRST; i <= WEP_LAST; ++i)
-                       {
-                               e = get_weaponinfo(i);
-                               int w = want_weapon(e, g_warmup_allguns);
-                               if(w & 1)
-                                       warmup_start_weapons |= WepSet_FromWeapon(i);
-                               if(w & 2)
-                                       warmup_start_weapons_default |= WepSet_FromWeapon(i);
-                               if(w & 4)
-                                       warmup_start_weapons_defaultmask |= WepSet_FromWeapon(i);
-                       }
-               }
-       }
-       if (g_jetpack)
-               start_items |= IT_JETPACK;
-       MUTATOR_CALLHOOK(SetStartItems);
-       if ((start_items & IT_JETPACK) || (g_grappling_hook && (start_weapons & WEPSET_HOOK)))
-       {
-               start_items |= IT_FUEL_REGEN;
-               start_ammo_fuel = max(start_ammo_fuel, cvar("g_balance_fuel_rotstable"));
-               warmup_start_ammo_fuel = max(warmup_start_ammo_fuel, cvar("g_balance_fuel_rotstable"));
-       }
-       WepSet precache_weapons = start_weapons;
-       if (g_warmup_allguns != 1)
-               precache_weapons |= warmup_start_weapons;
-       for (i = WEP_FIRST; i <= WEP_LAST; ++i)
-       {
-               e = get_weaponinfo(i);
-               if(precache_weapons & WepSet_FromWeapon(i))
-                       WEP_ACTION(i, WR_INIT);
-       }
-       start_ammo_shells = max(0, start_ammo_shells);
-       start_ammo_nails = max(0, start_ammo_nails);
-       start_ammo_rockets = max(0, start_ammo_rockets);
-       start_ammo_cells = max(0, start_ammo_cells);
-       start_ammo_plasma = max(0, start_ammo_plasma);
-       start_ammo_fuel = max(0, start_ammo_fuel);
-       warmup_start_ammo_shells = max(0, warmup_start_ammo_shells);
-       warmup_start_ammo_nails = max(0, warmup_start_ammo_nails);
-       warmup_start_ammo_rockets = max(0, warmup_start_ammo_rockets);
-       warmup_start_ammo_cells = max(0, warmup_start_ammo_cells);
-       warmup_start_ammo_plasma = max(0, warmup_start_ammo_plasma);
-       warmup_start_ammo_fuel = max(0, warmup_start_ammo_fuel);
- }
+ float want_weapon(entity weaponinfo, float allguns); // WEAPONTODO: what still needs done?
+ void readplayerstartcvars();
  
  float g_bugrigs;
  float g_bugrigs_planar_movement;
@@@ -638,8 -382,8 +380,8 @@@ void readlevelcvars(void
        if (!warmup_stage)
                game_starttime = time + cvar("g_start_delay");
  
-     for(int i = WEP_FIRST; i <= WEP_LAST; ++i)
-       WEP_ACTION(i, WR_INIT);
+       for(int i = WEP_FIRST; i <= WEP_LAST; ++i)
+               WEP_ACTION(i, WR_INIT);
  
        readplayerstartcvars();
  }
diff --combined qcsrc/server/t_plats.qc
index c22f87a45a21ea817bd8895fe3099d8078e8c959,5b9433af4f2aac3cd7c64f73840cf64a75a6c9e1..7b2bc9973eacc411b47d6b7c015163fd717b13a5
@@@ -17,8 -17,6 +17,8 @@@
      #include "../csqcmodellib/sv_model.qh"
  #endif
  
 +#ifdef SVQC
 +
  .float dmgtime2;
  void generic_plat_blocked()
  {
@@@ -1629,7 -1627,7 +1629,7 @@@ void spawnfunc_func_door_rotating(
        else // Z
                self.movedir = '0 1 0';
  
-       if (self.angles.y ==0) self.angles.y = 90;
+       if (self.angles.y ==0) self.angles_y = 90;
  
        self.movedir = self.movedir * self.angles.y;
        self.angles = '0 0 0';
@@@ -2184,15 -2182,8 +2184,15 @@@ void spawnfunc_func_vectormamamam(
        InitializeEntity(self, func_vectormamamam_findtarget, INITPRIO_FINDTARGET);
  }
  
 +#endif
 +
  void conveyor_think()
  {
 +#ifdef CSQC
 +      float dt = time - self.move_time;
 +      self.move_time = time;
 +      if(dt <= 0) { return; }
 +#endif
        entity e;
  
        // set myself as current conveyor where possible
        {
                for(e = findradius((self.absmin + self.absmax) * 0.5, vlen(self.absmax - self.absmin) * 0.5 + 1); e; e = e.chain)
                        if(!e.conveyor.state)
 +#ifdef SVQC
                                if(isPushable(e))
 +#elif defined(CSQC)
 +                              if(e.isplayermodel)
 +#endif
                                {
                                        vector emin = e.absmin;
                                        vector emax = e.absmax;
  
                for(e = world; (e = findentity(e, conveyor, self)); )
                {
 +#ifdef SVQC
                        if(IS_CLIENT(e)) // doing it via velocity has quite some advantages
                                continue; // done in SV_PlayerPhysics
 +#elif defined(CSQC)
 +                      if(e.isplayermodel)
 +                              continue;
 +#endif
  
 -                      setorigin(e, e.origin + self.movedir * sys_frametime);
 +                      setorigin(e, e.origin + self.movedir * PHYS_INPUT_FRAMETIME);
                        move_out_of_solid(e);
 +#ifdef SVQC
                        UpdateCSQCProjectile(e);
 +#endif
                        /*
                        // stupid conveyor code
                        tracebox(e.origin, e.mins, e.maxs, e.origin + self.movedir * sys_frametime, MOVE_NORMAL, e);
                }
        }
  
 +#ifdef SVQC
        self.nextthink = time;
 +#endif
  }
  
 +#ifdef SVQC
 +
  void conveyor_use()
  {
        self.state = !self.state;
 +
 +      self.SendFlags |= 2;
  }
  
  void conveyor_reset()
  {
        self.state = (self.spawnflags & 1);
 +
 +      self.SendFlags |= 2;
 +}
 +
 +float conveyor_send(entity to, float sf)
 +{
 +      WriteByte(MSG_ENTITY, ENT_CLIENT_CONVEYOR);
 +      WriteByte(MSG_ENTITY, sf);
 +
 +      if(sf & 1)
 +      {
 +              WriteByte(MSG_ENTITY, self.warpzone_isboxy);
 +              WriteCoord(MSG_ENTITY, self.origin_x);
 +              WriteCoord(MSG_ENTITY, self.origin_y);
 +              WriteCoord(MSG_ENTITY, self.origin_z);
 +
 +              WriteCoord(MSG_ENTITY, self.mins_x);
 +              WriteCoord(MSG_ENTITY, self.mins_y);
 +              WriteCoord(MSG_ENTITY, self.mins_z);
 +              WriteCoord(MSG_ENTITY, self.maxs_x);
 +              WriteCoord(MSG_ENTITY, self.maxs_y);
 +              WriteCoord(MSG_ENTITY, self.maxs_z);
 +
 +              WriteCoord(MSG_ENTITY, self.movedir_x);
 +              WriteCoord(MSG_ENTITY, self.movedir_y);
 +              WriteCoord(MSG_ENTITY, self.movedir_z);
 +
 +              WriteByte(MSG_ENTITY, self.speed);
 +              WriteByte(MSG_ENTITY, self.state);
 +
 +              WriteString(MSG_ENTITY, self.targetname);
 +              WriteString(MSG_ENTITY, self.target);
 +      }
 +
 +      if(sf & 2)
 +              WriteByte(MSG_ENTITY, self.state);
 +
 +      return true;
  }
  
  void conveyor_init()
        }
        else
                self.state = 1;
 +
 +      Net_LinkEntity(self, 0, false, conveyor_send);
 +
 +      self.SendFlags |= 1;
  }
  
  void spawnfunc_trigger_conveyor()
@@@ -2337,56 -2269,3 +2337,56 @@@ void spawnfunc_func_conveyor(
        self.movetype = MOVETYPE_NONE;
        conveyor_init();
  }
 +
 +#elif defined(CSQC)
 +
 +void conveyor_init()
 +{
 +      self.draw = conveyor_think;
 +      self.drawmask = MASK_NORMAL;
 +
 +      self.movetype = MOVETYPE_NONE;
 +      self.model = "";
 +      self.solid = SOLID_TRIGGER;
 +      self.move_origin = self.origin;
 +      self.move_time = time;
 +}
 +
 +void ent_conveyor()
 +{
 +      float sf = ReadByte();
 +
 +      if(sf & 1)
 +      {
 +              self.warpzone_isboxy = ReadByte();
 +              self.origin_x = ReadCoord();
 +              self.origin_y = ReadCoord();
 +              self.origin_z = ReadCoord();
 +              setorigin(self, self.origin);
 +
 +              self.mins_x = ReadCoord();
 +              self.mins_y = ReadCoord();
 +              self.mins_z = ReadCoord();
 +              self.maxs_x = ReadCoord();
 +              self.maxs_y = ReadCoord();
 +              self.maxs_z = ReadCoord();
 +              setsize(self, self.mins, self.maxs);
 +
 +              self.movedir_x = ReadCoord();
 +              self.movedir_y = ReadCoord();
 +              self.movedir_z = ReadCoord();
 +
 +              self.speed = ReadByte();
 +              self.state = ReadByte();
 +
 +              self.targetname = strzone(ReadString());
 +              self.target = strzone(ReadString());
 +
 +              conveyor_init();
 +      }
 +
 +      if(sf & 2)
 +              self.state = ReadByte();
 +}
 +
 +#endif