}
#define MAX_SHOCKWAVE_HITS 10
+#define DEBUG_SHOCKWAVE
.float swing_prev;
.entity swing_alreadyhit;
head = head.chain;
}
- for(i = 0; i <= queue; ++i)
+ for(i = 1; i <= queue; ++i)
{
- head = shockwave_hit[i];
- final_force = shockwave_hit_force[i];
- final_damage = shockwave_hit_damage[i];
+ head = shockwave_hit[i-1];
+ final_force = shockwave_hit_force[i-1];
+ final_damage = shockwave_hit_damage[i-1];
Damage(
head,
head.origin,
final_force
);
-
+
+ if(accuracy_isgooddamage(self.realowner, head))
+ {
+ print("wtf\n");
+ accuracy_add(self.realowner, WEP_SHOCKWAVE, 0, final_damage);
+ }
+
#ifdef DEBUG_SHOCKWAVE
print(sprintf(
"SHOCKWAVE by %s: damage = %f, force = %f.\n",
));
#endif
- shockwave_hit[i] = world;
- shockwave_hit_force[i] = '0 0 0';
- shockwave_hit_damage[i] = 0;
+ shockwave_hit[i-1] = world;
+ shockwave_hit_force[i-1] = '0 0 0';
+ shockwave_hit_damage[i-1] = 0;
}
}