Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

Magic Prism related crashes

1 replies · 1,026 views · Started 29 May 2007

Strange... firing a sword beam into a magic prism works fine, but firing it with ordinary magic causes an instant crash.
Say, why exactly is the related line in weapons.cpp...

//              addLwpn(newx,newy,z,wRefMagic,0,power,tdir);
...commented out and surrounded by other stuff?

No idea, but the code there has two bugs, either of which is enough to crash ZC:
1) Each time the prism is hit, only one weapon was newed, and then four copies of that weapon were pushed onto the weapon sprite list, causing interesting things to happen when the sprites are deleted.
2) The new magic sprites aren't told to ignore that prism combo, leading them each to split into four new sprites, ad infinum.

Fixed in the next build.