[Not a bug] Non-random damage doesn't work on FastProjectiles

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Non-random damage doesn't work on FastProjectiles

Postby Jekyll Grim Payne » 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: Select allExpand view
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.
User avatar
Jekyll Grim Payne
 
 
 
Joined: 21 Jul 2008
Discord: Agent_Ash#4401
Github ID: jekyllgrim
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)

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

Postby Marisa Kirisame » Thu Dec 09, 2021 8:57 am

Not even if you use DamageFunction?
User avatar
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: MarisaDOOM
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

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

Postby Jekyll Grim Payne » Thu Dec 09, 2021 8:58 am

UPD: my mistake, it's not supposed to work with damage at all, only DamageFunction. Sorry, folks :(
User avatar
Jekyll Grim Payne
 
 
 
Joined: 21 Jul 2008
Discord: Agent_Ash#4401
Github ID: jekyllgrim
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 1 guest