]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/tzork/vehicles-2'
authorRudolf Polzer <divverent@xonotic.org>
Tue, 21 Jun 2011 17:11:18 +0000 (19:11 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Tue, 21 Jun 2011 17:11:18 +0000 (19:11 +0200)
Conflicts:
qcsrc/server/ctf.qc

1  2 
qcsrc/common/constants.qh
qcsrc/server/ctf.qc

index e512e70f2803ed9b72d97936b624f7b0ecda289c,e5b121ca3e1a7b5f32bcd6b74d8baf2fac381513..4db7ea675166cb15d9963aeb0f9f44b1719aaac6
@@@ -64,6 -64,7 +64,7 @@@ const float TE_CSQC_WEAPONCOMPLAIN = 11
  const float TE_CSQC_NEX_SCOPE = 116;
  const float TE_CSQC_MINELAYER_MAXMINES = 117;
  const float TE_CSQC_HAGAR_MAXROCKETS = 118;
+ const float TE_CSQC_VEHICLESETUP = 119;
  
  const float RACE_NET_CHECKPOINT_HIT_QUALIFYING = 0; // byte checkpoint, short time, short recordtime, string recordholder
  const float RACE_NET_CHECKPOINT_CLEAR = 1;
@@@ -118,6 -119,8 +119,8 @@@ const float ENT_CLIENT_SHOWNAMES = 31
  const float ENT_CLIENT_WARPZONE_TELEPORTED = 32;
  
  const float ENT_CLIENT_TURRET = 40;
+ const float ENT_CLIENT_AUXILIARYXHAIR = 50;
+ const float ENT_CLIENT_VEHICLE = 60;
  
  const float SPRITERULE_DEFAULT = 0;
  const float SPRITERULE_TEAMPLAY = 1;
@@@ -133,7 -136,6 +136,7 @@@ const float RADARICON_GENERATOR = 1
  const float RADARICON_OBJECTIVE = 1;
  const float RADARICON_DOMPOINT = 1;
  const float RADARICON_POWERUP = 1;
 +const float RADARICON_TAGGED = 1;
  
  ///////////////////////////
  // key constants
@@@ -334,9 -336,13 +337,13 @@@ const float CTF_STATE_DEFEND = 2
  const float CTF_STATE_COMMANDER = 3;
  
  const float HUD_NORMAL = 0;
- const float HUD_SPIDERBOT = 10;
- const float HUD_WAKIZASHI = 11;
- const float HUD_RAPTOR    = 12;
+ const float HUD_VEHICLE_FIRST   = 10;
+ const float HUD_SPIDERBOT       = 10;
+ const float HUD_WAKIZASHI       = 11;
+ const float HUD_RAPTOR          = 12;
+ const float HUD_BUMBLEBEE       = 13;
+ const float HUD_VEHICLE_LAST    = 13;
  const vector eX = '1 0 0';
  const vector eY = '0 1 0';
  const vector eZ = '0 0 1';
@@@ -359,6 -365,7 +366,7 @@@ const float STAT_PINKALIVE = 103
  const float STAT_FROZEN = 104;
  const float STAT_REVIVE_PROGRESS = 105;
  
  const float STAT_DOM_TOTAL_PPS = 100;
  const float STAT_DOM_PPS_RED = 101;
  const float STAT_DOM_PPS_BLUE = 102;
@@@ -368,9 -375,6 +376,6 @@@ const float STAT_DOM_PPS_YELLOW = 104
  //const float STAT_SPIDERBOT_AIM     53 // compressShotOrigin
  //const float STAT_SPIDERBOT_TARGET  54 // compressShotOrigin
  
  // moved that here so the client knows the max.
  // # of maps, I'll use arrays for them :P
  #define MAPVOTE_COUNT 10
@@@ -500,6 -504,13 +505,13 @@@ float PROJECTILE_FIREBALL = 21
  float PROJECTILE_FIREMINE = 22;
  float PROJECTILE_BULLET_GLOWING_TRACER = 23;
  
+ float PROJECTILE_RAPTORCANNON   = 24;
+ float PROJECTILE_RAPTORBOMB     = 25;
+ float PROJECTILE_RAPTORBOMBLET  = 26;
+ float PROJECTILE_SPIDERROCKET   = 27;
+ float PROJECTILE_WAKIROCKET     = 28;
+ float PROJECTILE_WAKICANNON     = 29;
  float SPECIES_HUMAN        =  0;
  float SPECIES_ROBOT_SOLID  =  1;
  float SPECIES_ALIEN        =  2;
@@@ -533,14 -544,20 +545,20 @@@ float DEATH_TURRET = 10020
  float DEATH_QUIET = 10021;
  float DEATH_HEADSHOT = 10022;
  
- float DEATH_SBMINIGUN = 10030;
- float DEATH_SBROCKET  = 10031;
- float DEATH_SBCRUSH   = 10032;
- float DEATH_SBBLOWUP  = 10033;
- float DEATH_WAKIGUN    = 10040;
- float DEATH_WAKIROCKET = 10041;
- float DEATH_WAKIBLOWUP = 10042;
+ float  DEATH_VHFIRST       = 10030;
+ float  DEATH_VHCRUSH       = 10030;
+ float  DEATH_SBMINIGUN     = 10031;
+ float  DEATH_SBROCKET      = 10032;
+ float  DEATH_SBBLOWUP      = 10033;
+ float  DEATH_WAKIGUN       = 10034;
+ float  DEATH_WAKIROCKET    = 10035;
+ float  DEATH_WAKIBLOWUP    = 10036;
+ float  DEATH_RAPTOR_CANNON = 10037;
+ float  DEATH_RAPTOR_BOMB   = 10038;
+ float  DEATH_RAPTOR_BOMB_SPLIT = 10039;
+ float  DEATH_RAPTOR_DEATH  = 10040;
+ float  DEATH_VHLAST        = 10040;
+ #define DEATH_ISVEHICLE(t)  ((t) >= DEATH_VHFIRST && (t) <= DEATH_VHLAST)
  
  float DEATH_GENERIC = 10050;
  
diff --combined qcsrc/server/ctf.qc
index 4aedc6f7b3904ba02125ffc371eec503e2f06b3b,09cb6c56819230111c91b70f7131ae2c0144026b..c3676ff45c6f5ffd08b3ab6646c8f46f4f9fd913
@@@ -49,7 -49,7 +49,7 @@@ float ctf_captureshield_shielded(entit
  
        // player is in the worse half, if >= half the players are better than him, or consequently, if < half of the players are worse
        // use this rule here
-       
        if(players_worseeq >= players_total * captureshield_max_ratio)
                return FALSE;
  
@@@ -297,11 -297,10 +297,11 @@@ void DropFlag(entity e, entity penalty_
        e.playerid = attacker.playerid;
        e.ctf_droptime = time;
        WaypointSprite_Spawn("flagdropped", 0, 0, e, '0 0 1' * 61, world, COLOR_TEAM1 + COLOR_TEAM2 - e.team, e, waypointsprite_attachedforcarrier, FALSE);
 -
 +      WaypointSprite_UpdateTeamRadar(e.waypointsprite_attachedforcarrier, RADARICON_FLAG, '0 1 1');
 +      WaypointSprite_Ping(e.waypointsprite_attachedforcarrier);
 +      
        if(p.waypointsprite_attachedforcarrier)
        {
 -              WaypointSprite_Ping(p.waypointsprite_attachedforcarrier);
                WaypointSprite_DetachCarrier(p);
        }
        else
@@@ -516,10 -515,10 +516,10 @@@ void FlagTouch(
        {
                if (other.next_take_time > time)
                        return;
-                       
                if (autocvar_g_ctf_flag_pickup_effects) // pickup effect
                        pointparticles(particleeffectnum("smoke_ring"), 0.5 * (self.absmin + self.absmax), '0 0 0', 1);
-                       
                // pick up
                self.flagpickuptime = time; // used for timing runs
                self.speedrunning = other.speedrunning; // if speedrunning, flag will self-return and teleport the owner back after the record
  
                        if (autocvar_g_ctf_flag_pickup_effects) // field pickup effect
                                pointparticles(particleeffectnum("smoke_ring"), 0.5 * (self.absmin + self.absmax), '0 0 0', 1);
-                       
                        // pick up
                        self.solid = SOLID_NOT;
                        setorigin(self, self.origin); // relink
@@@ -743,7 -742,7 +743,7 @@@ void item_flag_postspawn(
                if(self.team == COLOR_TEAM2)
                        // Blue
                        self.glow_color = 210;
-                       
                self.glow_size = 25;
                self.glow_trail = 1;
        }
@@@ -1088,7 -1087,7 +1088,7 @@@ entity(float cteam) ctf_team_has_comman
        entity pl;
        if(cteam != COLOR_TEAM1 || cteam != COLOR_TEAM2)
                return world;
-       
        FOR_EACH_REALPLAYER(pl) {
                if(pl.team == cteam && pl.iscommander) {
                        return pl;
@@@ -1106,7 -1105,7 +1106,7 @@@ void(entity e, float st) ctf_setstate 
  void(float cteam) ctf_new_commander =
  {
        entity pl, plmax;
-       
        plmax = world;
        FOR_EACH_REALPLAYER(pl) {
                if(pl.team == cteam) {
  void() ctf_clientconnect =
  {
        self.iscommander = FALSE;
-       
        if(!self.team || self.classname != "player") {
                ctf_setstate(self, -1);
        } else
                ctf_setstate(self, 0);
  
        self.team_saved = self.team;
-       
        if(self.team != 0 && self.classname == "player" && !ctf_team_has_commander(self.team)) {
                ctf_new_commander(self.team);
        }
@@@ -1163,9 -1162,9 +1163,9 @@@ void() ctf_playerchanged 
                        ctf_setstate(self, -1);
                ctf_new_commander(self.team_saved);
        }
-       
        self.team_saved = self.team;
-       
        ctf_new_commander(self.team);
  };