directional_shout

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
Castler
Thalore
Posts: 153
Joined: Mon Mar 25, 2013 10:09 pm

directional_shout

#1 Post by Castler »

While looking at borrowing directional_shout.lua's particle effects for my module, I noticed that ToME's version is a bit off (asymmetrical and a bit skewed). This is particularly obvious if you use a spread 90 (for a 180° arc total) and a distortion_factor of 0. There are a couple of bugs that cause this:
  • Starting the for loop at 1 instead of 0 or 5 then iterating by 5 means that it stops at 71° (for example) when it should stop at 75°. The fix is to start iterating at 5 (or at 0 and merge in the special case for the first point in each arc).
  • Subtracting 90° from the direction of the shout, determining the starting point, then adding 90° causes the starting point to be skewed. The fix is to not adjust the angle by 90.
The attached update for directional_shout.lua fixes this. It also changes the interpretation of the spread parameter to be the entire arc rather than from the direction to one end of the arc; this should make its meaning match engine.Target's code_angle (which is where it'll probably be used).
Attachments
directional_shout.txt
(2.51 KiB) Downloaded 84 times
Qi Daozei (QDZ) - an Oriental-themed fantasy game for T-Engine. ToME Tips - auto-generated spoilers for ToME.

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: directional_shout

#2 Post by darkgod »

Thanks :)
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply