-
Notifications
You must be signed in to change notification settings - Fork 220
utils getangle divide by zero? #19
Comments
seems likely, though i've never heard or seen of it happening anywhere before. put a test case together to make sure |
There is no "divide by zero" exception for floating point numbers. if the y and x axes are the same, the final value would result in 0 (since |
Ah, right, I forgot about +INF and -INF. I think atanf returns NaN if NaN is the parameter (http://en.cppreference.com/w/c/numeric/math/atan). I'll see if I can test how the game would react to that. |
* removing some tabs * Add files via upload Additional shuriken pouches that were missing: Fuma, Juji, Manji and Shuriken. SQL query to add usage: INSERT INTO item_usable (itemid, name, validTargets, activation, animation) VALUES ('6297', 'juji_shuriken_pouch', '1', '1', '55'); VALUES ('6298', 'manji_shuriken_pouch', '1', '1', '55'); VALUES ('6299', 'shuriken_pouch', '1', '1', '55'); VALUES ('6302', 'fuma_shuriken_pouch', '1', '1', '55'); * Update curing_waltz_iv.lua 99 subjob adjustment * Update curing_waltz_v.lua 99 subjob adjustment * Update abilities.sql added 295,'curing_waltz_v' * Disables NM Lottery System (project-topaz#7) * Player changes (project-topaz#9) * Always grants starting ring, adds warp ring and makes it immediately usable. * Adds setting for warp ring * Adjusted items_usable.sql Adjusted items_usable.sql as requested * Update Despot Set position and spawn claimed to killing player. * Fix Shen crash on pop * Change updateClaim to clear claim when no args Also just return if used on something other than a mob, rather than crash. Fixes issues with COR elemental shots, angon, and chi blast when used on charmed players. * More aern QC from Nyu (retail) * infill missing coords that were throwing errors during server start * When receiving multiple stacks of a given item, only display obtained message once * Fix crashiness during quest Flyers for Regine * Adds setting to always allow chocobo rentals without a license or lvl requirement (project-topaz#10) * chore(custom_sql) split and moved custom sql features into matching feature flag names (project-topaz#11) Co-authored-by: Dacrybabysuck <[email protected]> * change(settings) disabled casket drops (project-topaz#13) Co-authored-by: Dacrybabysuck <[email protected]> * chore(sql) organized and formatted sql (project-topaz#12) Co-authored-by: Dacrybabysuck <[email protected]> * fix(sql) lottery spawn sql file name change (project-topaz#14) Co-authored-by: Dacrybabysuck <[email protected]> * Implement Rampart as -25% SDT rather than 100% magic shield * Changed Shield Bash for Paladin UPDATE: 12FEB2020 https://forum.square-enix.com/ffxi/threads/56444-February-12-2020-%28JST%29-Version-Update This was changed with the update for 12FEB2020 Made change to merit as it went down from 6 seconds to 2. * Ru'Aerns QC * R202006-01 * Updated Grades.CPP line 62 to include RUN trait -RUN traits cross-referenced with our data-base stats and the stats of current retail to tabulate what the stats should be. * Switch Weather to binary bitblobs Changes the weather system to store weather in packed bit-pattern blob instead of 237K DB rows. Uses a new weather table, so as not to conflict with older installations. * Adds a setting to make homepoint teleports free. (project-topaz#15) * Fix issue when zone_weather was renamed * Compiler updates - cmake/makefile.am - Add -Werror for other builds - .gitignore **/config.* - weird created /common/config.in~ - fix some unused variables - fix parenthesis in if-statements - add default where switch case not handled - fix uint -> int casting * Update zone_weather to be exported via hex blob * GEO SQL and Header changes (project-topaz#689) * GEO SQL and header files * Spell list additions and cleanup * Adjust automaton controller to use new effect enums * Remove on_zone flag from Dynamis effect Update effect to clear if player leaves the zone, but not on tractor. Also replace bad function call in sj_restriction. Fixes project-topaz#695 * Fix leak and change ip2str to return std::string * Nuke visited charvar after sack has been purchased. * Update signet.lua (project-topaz#16) Remove debug message. * IP/Subnet mask in socket was calculated incorrectly - Fixes project-topaz#686 - ntohl changes from network byte order to host byte order - Mask was swapped, IP was not swapped Test on win/nix, but not for every mask combination * Gobbiebag uses tpz.inv and does the correct bags * change(settings) disabled always allowing chocobo rental (project-topaz#17) Co-authored-by: Dacrybabysuck <[email protected]> * R202006-02 * Fix Flashbulb and mob Sleepga from crashing server when resisted * Custom epoch for Vana'diel time Rename setting to epoch from offset to hopefully clarify usage. Adjust luautils function used with GM command. Fixes issue project-topaz#552 * Linkshell fixes Make linkshell name available again after linkshell breaks. Require link item to be worn when trading linkpearls. Table some text ids. * Small optimizations * Updates for nix builds - Remove -Wfatal-errors to get all errors at once - Adding error ignores from gcc-8 changes (makefile/cmake) - Adding above-line TODOs with error to be fixed later * Table spell IDs + move other magic enums out of magic global * Add conditions to delivery box block Check if player is in residential area. * Add var and binding for isDualWielding + remove presumptuous granting of mod to all NIN NMs * reduced double-up cooldown to 5 seconds * remove cooldown on double-up after using a roll * Detonator QM1 (17404356) fixed in NPC_List table * [client update] npc id shifts [client update] text id shifts [client update] version.conf * Fixes Poisonhand Gnadgad's drops to be grouped * Adds Rising Sun and Ebony Wand desynths * Fix Half Partition synth level requirements * Fix typo in sql handle * fixing values based on 1000 tp model and fixing overflow * add comment for clarity on phantom roll cooldown * Adds scripting and DB edits for NM Backoo * added more accurate spawn coords and changed pool id * R202006-03 * Added already coded spells to RUN Updated binary code to allow RUN to cast spells they have. Crusade, and Regen IV are not currently coded and not able to update for run specifically. Foil is still commented out and I'm not sure if that is because RUN is technically NYI at this time or because something is wrong with it. * Changes to two mob droplist using TH hunter table (https://www.bg-wiki.com/bg/Treasure_Hunter) http://www.ffxidb.com/zones/61/wamoura-prince and http://www.ffxidb.com/zones/137/savage-ruszor * Improve comment professionalism * Fix wrong boot arg read * Remove automatic HP multiplier when a mob is marked as an NM. This was entirely made up. NMs which have been CONFIRMED to have HP values that aren't in line with the standard growth scale should have their HP manually set instead. * Fix region check when OP teleporting * Add adds to Promy-Dem BCMN Fixes project-topaz#740 * Remove fictional NM stat and MP multipliers * Fix True Will title * Add Herculean item mods (project-topaz#752) * added Herc armor set into item_mods.sql added Herc set item IDs helm 25642 body 25718 legs 25842 gloves 27140 boots 27496 Co-authored-by: Wletour <[email protected]> * --Added POSes (X, Y, Z, Rotation) for Aqueduct Spiders in Sacrarium. --Removed rows for Aqueduct Spider Mob IDs that didn't appear in the source. (Source of POS info is the FFXI Captures discord (thanks Wiggo!)) * R202006-04 * Devil Tab uses Hide. /despawnmob Tab DIE DEVIL TAB!!!!!! * BaseSell prices and version.conf message updates. * Fix double-free errors in exit/crash Since do_final could be called multiple times if a signal/error occurs during shutdown condition, this ensures that called shutdown procedures safe against double-freeing. It should also make it more resistant to looping terminate calls. * Updates for item_equipment.sql, item_latents.sql, item_weapon.sql from lelia Still need to do item_mods, but holding to prevent conflict with project-topaz#752 Still need to add lelia scripts, but I will do that in a separate PR. * Update timeoffset GM commands * Add -Wno-stringop-truncation flag for now * Updated item_basic.sql to match with Lelia (Submitted the update to DSP discord). Everything is double checked with FFXI AH/FFXIcyclopedia/BGWiki. I only did some price checks for items that were 0 when it was obvious they weren't (And zeroed one that cannot be npced...) * Restore sale price of Penelope Cloth * R202007-01 * RK Sollerets +1/+2: sort by id Imperial Bow: fix incorrect id, then sort by id * removing spell script * Update sanction.lua (project-topaz#19) * Fix level of one Demon's Elemental in Uleguerand Add groups/pools for Livid Seethers and Woeful Weepers * Fix Moblin Millionaire level range in Halvung Assign some groups/infill some pools for Campaign mobs in La Vaule [S] * Campaign mobs in Grauberg [S] * Return Half Partition synth level to 88, but drop subskill requirement. * Fix issue with not referencing text IDs Looks like a set of overlooked changes when tabling occurred * Wrong resell price of apkal fletching It was selling for too much, could lead to abuse of gil making Thank you Hiro from Canaria server for bringing this up and Aether for verifying actual price (https://discord.com/channels/639659267003252746/639659267003252748/731959005315989542) * chore(conf) moved to using default configuration that can be changed in the docker-compose build process. * fix(packer) resolve an issue causing packer and dressme to not work (project-topaz#20) Co-authored-by: Dacrybabysuck <[email protected]> * Initial ability setup * Allow me to create a test account * first pass at cover implementation * fixing a few mistakes * Fixing syntax * More fixing of syntax * synatx * syntax * Syntax fixes * Syntax * Syntax * Syntax * Syntax * Syntax * Syntax * Adds enmity logic * Syntax fixes * Syntax fixes * Syntax fixes * Syntax fixes * Syntax fixes * Syntax fixes * Syntax fixes * Syntax fixes * Syntax fixes * Syntax fixes * Syntax fixes * Syntax fixes * Syntax fixes * Syntax fixes * Adding Debuging for emnity logic * Adding Debuging for emnity logic * Adding Debuging for emnity logic * Adding Debuging for emnity logic * Adding Debuging for emnity logic * Adds equipment based duration bonuses * Cover will now work with abilities and magic if properly equipped * Moving absorb dmg to mp to lua * Syntax fixes * Syntax fixes * Syntax fixes * Syntax fixes * Add check for mobskill against a player * More checks for objtype * Additional debug * Additional debug * More debugging * More debugging * More debugging * More debugging * More debugging * More debugging * Moving Enmity logic * Moving enmity logic to the container * Updating magic enmity logic * Debugging enmity changes * Debugging * Add gear check for absorb and more debugging * Syntax * Debugging * Debugging * Debugging * Debugging * Debugging * Debugging * Debugging distance * Update login.conf * Formatting/Style clean up and changed IsCoverAbsorbed to GetCoverAbsorb * Adding documentation Co-authored-by: unknown <[email protected]> Co-authored-by: Era-Lusiphur <[email protected]> Co-authored-by: Wletour <[email protected]> Co-authored-by: Dacrybabysuck <[email protected]> Co-authored-by: Corey <[email protected]> Co-authored-by: wrenffxi <[email protected]> Co-authored-by: 59blargedy <[email protected]> Co-authored-by: dacrybabysuck <[email protected]> Co-authored-by: kaincenteno <[email protected]> Co-authored-by: zircon-tpl <[email protected]> Co-authored-by: mrmclaw <[email protected]> Co-authored-by: ibm2431 <[email protected]> Co-authored-by: Kreidos <[email protected]> Co-authored-by: Brian Silvi <[email protected]> Co-authored-by: Tyler <[email protected]> Co-authored-by: 59blargedy <[email protected]> Co-authored-by: Illzbee <[email protected]> Co-authored-by: EpicTaru <[email protected]> Co-authored-by: Nyu <[email protected]> Co-authored-by: Helix Hamin <[email protected]> Co-authored-by: Shelby Hagman <[email protected]>
Monday May 25, 2015 at 22:51 GMT
Originally opened as DarkstarProject/darkstar - Issue 1477
github/DarkstarProject/darkstar/blob/ad5385f30df4e8cc903b756c8ade392fd2b5e850/src/common/utils.cppDarkstar Issue L139
When I was working on Closed Position I considered using the IsFaceing function, but ended up just comparing the attacker and defender rotation. But I did notice that the getAngle function it uses seems like it would cause divide-by-zero exceptions whenever the two entities have the same x-coordinates. Is there some check for that that I'm missing somewhere? That function gets called a lot.
The text was updated successfully, but these errors were encountered: