Don't bother I knew why it borks but fixing it is hard
It's related to upvalues being captures in the function closure. And anyway this will never work with save/load because closure and upvalues are not saved.
[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
I know very little about coding so forgive me if I'm talking out of my butt here but...
What if projectiles where coded like creatures? Like a summon spell.
So basically arrow is shot (arrow is summoned) and flies towards it's target. Arrow hits it's target tile and inflicts 20 damage on whatever is there (if anything still is there) and then it's variable (just long enough to reach it's target) summon duration expires.
They could be given hit points too so projectiles could potentially be destroyed in flight by AoE effects. Some spells already in the game could potentially stop certain projectiles. Icestorm for instance may snuff out a Flame spell. Inferno may destroy an arrow. Each projectile type could have it's own damage immunities so it won't be destroyed by everything (flame again could be immune to everything except cold damage, arrows would take full damage from fire but very little from cold).
@Kustan - Sounds like this is a game ending bug for right now. My suggestion to anyone that doesn't want it to kill off their character is to crash the game using the task manager without saving and reload from your last good save (cheat your way around it until it's fixed).
I like projectiles-as-actors, complete with HP. Then the game code could copy any relevant properties from the player/npc to the projectile (attack, damage, APR, etc) so if the player/npc dies the projectile is completely unlinked from them. What do you think DG?
Well I could fix it, but it will still bork in case of a save/reload while an archery projectile is in flight.
This is not an easy fix :/
[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
Well I am still digging into the current code to familiarize myself with it so that we can have a (hopefully not one-sided) conversation about it. I'll probably look for you on IRC once I feel comfortable. Cheers!
Can save files be moved between computers (specifically platforms)? If so you can try sending me your savefiles and I can figure out how to fix it. My approach would be to dig through the game.player table from the in-game Lua console.
I have rewritten archery, it now both performs better, looks better and crashes less!
[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