]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/vehicles/vehicles.qc
Merge remote-tracking branch 'origin/Mario/assault_mutator'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / vehicles / vehicles.qc
index e2459e4ff483414a08af50a214377c871fbfb87c..1b1ae3f647628626c24440d0b020ac8654909be1 100644 (file)
@@ -410,8 +410,6 @@ entity vehicles_projectile(string _mzlfx, string _mzlsound,
 {
     entity proj;
 
-    print(sprintf("2: %i\n", _owner));
-
     proj = spawn();
 
     PROJECTILE_MAKETRIGGER(proj);
@@ -452,10 +450,6 @@ entity vehicles_projectile(string _mzlfx, string _mzlsound,
 
     setsize (proj, '-1 -1 -1' * _size, '1 1 1' * _size);
 
-    print(sprintf("3: %i\n", proj));
-    print(sprintf("4: %i\n", proj.enemy));
-    print(sprintf("5: %i\n", proj.owner));
-    print(sprintf("6: %i\n", proj.realowner));
     CSQCProjectile(proj, _clianim, _projtype, _cull);
 
     return proj;
@@ -550,7 +544,7 @@ void vehicles_touch()
         if(vehicles_crushable(other))
         {
             if(vlen(self.velocity) != 0)
-                Damage(other, self, self.owner, autocvar_g_vehicles_crush_dmg, DEATH_VHCRUSH, '0 0 0', normalize(other.origin - self.origin) * autocvar_g_vehicles_crush_force);
+                Damage(other, self, self.owner, autocvar_g_vehicles_crush_dmg, DEATH_VH_CRUSH, '0 0 0', normalize(other.origin - self.origin) * autocvar_g_vehicles_crush_force);
 
             return; // Dont do selfdamage when hitting "soft targets".
         }
@@ -1039,7 +1033,7 @@ void vehicles_showwp()
     }
 
     if(teamplay && self.team)
-           rgb = TeamColor(self.team);
+           rgb = Team_ColorRGB(self.team);
     else
            rgb = '1 1 1';
     WaypointSprite_Spawn("vehicle", 0, 0, self, '0 0 64', world, 0, self, waypointsprite_attached, TRUE, RADARICON_POWERUP, rgb);
@@ -1274,14 +1268,14 @@ float vehicle_initialize(string  net_name,
     self.vehicle_exit        = exitfunc;
     self.vehicle_enter       = enterproc;
     self.PlayerPhysplug      = physproc;
-    self.event_damage        = vehicles_damage;
+    self.event_damage        = func_null;
     self.touch               = vehicles_touch;
     self.think               = vehicles_spawn;
     self.nextthink           = time;
     self.vehicle_respawntime = _respawntime;
     self.vehicle_spawn       = spawnproc;
     self.effects             = EF_NODRAW;
-    if(g_assault || !autocvar_g_vehicles_delayspawn)
+    if(!autocvar_g_vehicles_delayspawn)
         self.nextthink = time + 0.5;
     else
         self.nextthink = time + _respawntime + (random() * autocvar_g_vehicles_delayspawn_jitter);
@@ -1321,6 +1315,9 @@ float vehicle_initialize(string  net_name,
     self.pos1 = self.origin;
     self.pos2 = self.angles;
     self.tur_head.team = self.team;
+       
+       if(MUTATOR_CALLHOOK(VehicleSpawn))
+               return FALSE;
 
     return TRUE;
 }