Growlith1223 / ArsMagica2

Ars Magica 2 Bug Tracker
65 stars 32 forks source link

1.5.0-17b: Certain Spells Throws Divide By 0 Exception During Particle Rendering #249

Closed ProfHugo closed 7 years ago

ProfHugo commented 7 years ago

If the particles setting in the video setting is set to minimal (0), then some spells that uses that during divisions (namely mana blast) would throws an arithmetic exception. An example would be http://pastebin.com/sZiM053J, where this below explains the issue:

public void spawnParticles(World world, double x, double y, double z, EntityLivingBase caster, Entity target, Random rand, int colorModifier){
        int snapAngle = 360 / ArsMagica2.config.getGFXLevel() * 5;
        //REST OF THE CODE
    }

where getGFXLevel wiuld be 0 if particles is set to minimum.

TheIcyOne commented 7 years ago

Fix incoming, for now the workaround is just to increase particle level.