]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/vehicles/vehicle/raptor_weapons.qc
Remove .move_* fields and MOVETYPE_PUSH logic (doesn't work)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / vehicles / vehicle / raptor_weapons.qc
index 56c3e8c610ade76c871b28f091e84fc1f1a8fe9d..f1357f306c49e389bd43c070101c55182c2c7759 100644 (file)
@@ -53,7 +53,7 @@ METHOD(RaptorBomb, wr_think, void(entity thiswep, entity actor, .entity weaponen
 
 void raptor_flare_think(entity this);
 void raptor_flare_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
-void raptor_flare_touch(entity this);
+void raptor_flare_touch(entity this, entity toucher);
 
 METHOD(RaptorFlare, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) {
     bool isPlayer = IS_PLAYER(actor);
@@ -94,12 +94,12 @@ void raptor_bomblet_boom(entity this)
     remove(this);
 }
 
-void raptor_bomblet_touch(entity this)
+void raptor_bomblet_touch(entity this, entity toucher)
 {
-    if(other == this.owner)
+    if(toucher == this.owner)
         return;
 
-    PROJECTILE_TOUCH(this);
+    PROJECTILE_TOUCH(this, toucher);
     setthink(this, raptor_bomblet_boom);
     this.nextthink = time + random() * autocvar_g_vehicle_raptor_bomblet_explode_delay;
 }
@@ -143,6 +143,11 @@ void raptor_bomb_burst(entity this)
     remove(this);
 }
 
+void raptor_bomb_touch(entity this, entity toucher)
+{
+       raptor_bomb_burst(this);
+}
+
 void raptor_bombdrop(entity this)
 {
     entity bomb_1, bomb_2;
@@ -157,8 +162,8 @@ void raptor_bombdrop(entity this)
 
     bomb_1.movetype     = bomb_2.movetype   = MOVETYPE_BOUNCE;
     bomb_1.velocity     = bomb_2.velocity   = this.velocity;
-    settouch(bomb_1, raptor_bomb_burst);
-    settouch(bomb_2, raptor_bomb_burst);
+    settouch(bomb_1, raptor_bomb_touch);
+    settouch(bomb_2, raptor_bomb_touch);
     setthink(bomb_1, raptor_bomb_burst);
     setthink(bomb_2, raptor_bomb_burst);
     bomb_1.cnt           = bomb_2.cnt          = time + 10;
@@ -180,7 +185,7 @@ void raptor_bombdrop(entity this)
     CSQCProjectile(bomb_2, true, PROJECTILE_RAPTORBOMB, true);
 }
 
-void raptor_flare_touch(entity this)
+void raptor_flare_touch(entity this, entity toucher)
 {
     remove(this);
 }
@@ -219,7 +224,7 @@ void RaptorCBShellfragDraw(entity this)
         return;
 
     Movetype_Physics_MatchTicrate(this, autocvar_cl_gibs_ticrate, autocvar_cl_gibs_sloppy);
-    this.move_avelocity += randomvec() * 15;
+    this.avelocity += randomvec() * 15;
     this.renderflags = 0;
 
     if(this.cnt < time)
@@ -241,10 +246,9 @@ void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang)
 
     sfrag.draw = RaptorCBShellfragDraw;
 
-    sfrag.move_origin = sfrag.origin = _org;
-    sfrag.move_velocity = _vel;
-    sfrag.move_avelocity = prandomvec() * vlen(sfrag.move_velocity);
-    sfrag.angles = sfrag.move_angles = _ang;
+    sfrag.velocity = _vel;
+    sfrag.avelocity = prandomvec() * vlen(sfrag.velocity);
+    sfrag.angles = _ang;
 
     sfrag.move_time = time;
     sfrag.damageforcescale = 4;