From: mand1nga Date: Wed, 30 Mar 2011 02:35:42 +0000 (-0300) Subject: Experiment: Set MOVETYPE_TOSS on the vehicle when unmanned and taking damage X-Git-Tag: xonotic-v0.5.0~199^2~11^2~99 X-Git-Url: http://de.git.xonotic.org/?a=commitdiff_plain;h=d7c2bc629a53900011984388f926f3fafe9922a5;p=xonotic%2Fxonotic-data.pk3dir.git Experiment: Set MOVETYPE_TOSS on the vehicle when unmanned and taking damage --- diff --git a/qcsrc/server/vehicles/vehicles.qc b/qcsrc/server/vehicles/vehicles.qc index 647c6c77e..ba8308425 100644 --- a/qcsrc/server/vehicles/vehicles.qc +++ b/qcsrc/server/vehicles/vehicles.qc @@ -189,7 +189,7 @@ float vehicles_crushable(entity e) void vehicles_enter(); void vehicles_touch() { - // Vehicle currently + // Vehicle currently in use if(self.owner) { // Colided with world? @@ -412,6 +412,11 @@ void vehicles_damage(entity inflictor, entity attacker, float damage, float deat self.velocity += force * (vlen(force) / self.mass); + if not(self.owner) + { + self.movetype &~= MOVETYPE_TOSS; + } + if(self.vehicle_health <= 0) { if(self.owner)