diff options
author | Trumeet <yuuta@yuuta.moe> | 2021-11-21 18:05:24 -0800 |
---|---|---|
committer | Trumeet <yuuta@yuuta.moe> | 2021-11-21 18:05:24 -0800 |
commit | 672ef74adbf00cb2d2dc1306600eb0d04ade189b (patch) | |
tree | 56ccf0fbb758babc2b06416c2e06c380116bb50e | |
parent | f2558ff0c2ef20fa884c2f23ecbcf6d6d7b00e00 (diff) | |
download | mcal-672ef74adbf00cb2d2dc1306600eb0d04ade189b.tar mcal-672ef74adbf00cb2d2dc1306600eb0d04ade189b.tar.gz mcal-672ef74adbf00cb2d2dc1306600eb0d04ade189b.tar.bz2 mcal-672ef74adbf00cb2d2dc1306600eb0d04ade189b.zip |
feat(expvc): add warnings
-rw-r--r-- | expvc.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -119,12 +119,14 @@ usage: entity.x, entity.y, entity.z); + printf("WARNING: Explosion range bounding box is ignored. In reality, if the target entity is too far from the explosion center, it will not be affected. We will support that later.\n"); double power2 = 2.0 * power; double xx = entity.x - tnt.x; double zz = entity.z - tnt.z; double yy = (is_tnt ? entity.y : entity_eye_y) - tnt.y; double dist = sqrt(xx * xx + (entity.y - tnt.y) * (entity.y - tnt.y) + zz * zz); printf("Square distance: %.5f\n", dist); + printf("WARNING: Explosion immunity is ignored. In reality, if the target entity is immune to explosion, it will not be affected at all.\n"); if (dist / power2 > 1) { printf("Not affected, to too far. (Square distance = %.5f).\n", dist); @@ -145,6 +147,7 @@ usage: printf("Accel: %.5f\n", accel); int damage = (int) ((accel * accel + accel) / 2.0 * 7.0 * power2 + 1.0); printf("Damage: %d\n", damage); + printf("WARNING: Explosion protection is ignored. In reality, if the entity has that protection, the final acceleration may be altered.\n"); struct vec3d delta_v = { xx * accel, yy * accel, |