Non-random damage doesn't work on FastProjectiles

Thu Dec 09, 2021 8:43 am

Defining the damage property in round brackets is supposed to make the damage non-random. However, that doesn't work on FastProjectiles. I first noticed it simply by obversation, then added a DoSpecialDamage override to check.

Here is example code:
Code:
class BuggedNonRNGFastProjectile : FastProjectile replaces Plasmaball
{
   Default
   {
      speed 256;
      damage (5);
      radius 5;
      height 5;
   }
   
   override int DoSpecialDamage(Actor target, int damage, name damagetype)
   {
      int i = super.DoSpecialDamage(target, damage, damagetype);
      console.printf("dealing %d damage", i);
      return i;
   }
   
   States
   {
   Spawn:
      BAL1 A -1;
      stop;
   Death:
      BAL1 BCD 2;
      stop;
   }
}


Attaching test file.
You do not have the required permissions to view the files attached to this post.

Re: Non-random damage doesn't work on FastProjectiles

Thu Dec 09, 2021 8:57 am

Not even if you use DamageFunction?

Re: Non-random damage doesn't work on FastProjectiles

Thu Dec 09, 2021 8:58 am

UPD: my mistake, it's not supposed to work with damage at all, only DamageFunction. Sorry, folks :(