Jump to content
  • 0

Game crash when firing weapon (DECOHack)


realjohnmadden

Question

Edit: For whatever reason, the issue is the A_FireCGun function. It crashes with Signal 11 (memory violation) in DSDA-Doom and just crashes in Woof, but if I swap it out for A_FirePistol, it works fine. Looks like the issue is because I removed the Flash animation - A_FireCGun does some stuff with the flash animation.

So I've been messing around with DECOHack in order to recreate the Doom 64 weapons in DSDHACKED, but for some reason the chaingun completely crashes the game.

Here is the code for the chaingun:

Spoiler

image.png.253768280cab6ae3ccf52d992b56e9e2.png

And the sprites in the WAD:

Spoiler

SLADE3_snMLj6EH6q.png.91861416486ec06b2a4e9264db178a65.png

Here's a video of it ingame (it crashes immediately after the first shot):

 

Edited by realjohnmadden

Share this post


Link to post

1 answer to this question

Recommended Posts

  • 1

From "DeHackEd Hardcodings.txt" in DoomTools docs:

The chaingun's muzzle flash is [FlashFrame] and [FlashFrame]+1 on 
subsequent calls to A_FireCGun, offset from State 52. So, if called from 
state 52, [FlashFrame]. If state 53, [FlashFrame]+1.

Whenever you call A_FireCGun, the flash frames are determined by this offset. In your case it's most likely jumping to some illegal frames as a result. Since Decohack automatically assings states, solving this problem requires manual control over the flash states (been there, see the Decohack source for 1000 Lines 3). Easiest way around this is to use A_WeaponBulletAttack instead of A_FireCGun.

Edited by Aurelius

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...