View previous topic :: View next topic |
Author |
Message |
DoomerMrT Dominating!
Joined: 09 Mar 2007 Location: http://destiny-server.ath.cx/forums/
|
Posted: Sun Nov 08, 2009 6:11 pm Post subject: [Dehacked]A_Detonate misbehavior on weapons |
|
|
When assigning this codepointer to a weapon frame, it is supposed to produce an explosion on the player regarding zdoom 2's behavior. Zdaemon simply takes it as nothing would happen.
Example: http://hwc-tm.extra.hu/stuff/detonate.zip
Shoot the pistol. |
|
Back to top |
|
|
Kilgore Air Cavalry
Joined: 17 Jun 2003 Location: Up the river
|
Posted: Thu Aug 28, 2014 1:35 pm Post subject: |
|
|
The dehacked engine we're using does not allow mixing actor/weapon code pointers. A_Detonate is not meant to be used with weapons (and will produce a crash most probably if used that way). Consequently, this is not a bug: the behavior is there by design.
However, it can be classified as a feature request (to update the engine to permit such mixing); so I'm moving it to the proper section. |
|
Back to top |
|
|
Body-Guard Unstoppable!
Joined: 08 Jan 2006 Location: Hungary
|
Posted: Fri Aug 29, 2014 10:14 am Post subject: |
|
|
Hm I imagine this is a load of work, maybe just do an input check for the pointers so they won't crash the game if they are called from unexpected frames? (eg. weapon codepointer from actor frame and vice versa)
This codepointer is not a good example because it does not crash in any way, but Mushroom for example, does. |
|
Back to top |
|
|
Sr69Mm-jC Unstoppable!
Joined: 21 Jul 2011
|
Posted: Fri Aug 29, 2014 10:35 am Post subject: |
|
|
Back when I was learning Dehacked these crashes were a good way to let me know that I'm doing something wrong. E.g. I could try to change zombieman's attack to A_FireShotgun, run map01, alert him, and witness the game crash once he goes to attack animation. That's how I quickly learned not to mix the two codepointer types (weapon and actor ones).
So if you're going to fix the crashes then please at least add a console message (or even better, an error log message, similar to "runaway script N terminated") that says something like "Ignoring codepointer A_PtrName executed on state XXX; DON'T mix weapon and actor codepointers". Regardless of the game crashing or not, mixing these codepointers is not correct and I think the modder should be told so clearly.
If you're going to make the engine permit the mixing however, then it's going to be a hellova feature Although I'm not sure what the engine *should* do in various weird cases - like A_SpawnFly on a pistol for example. |
|
Back to top |
|
|
Kilgore Air Cavalry
Joined: 17 Jun 2003 Location: Up the river
|
Posted: Thu Aug 27, 2015 5:48 pm Post subject: |
|
|
Added a pointer check as per Body-Guard's suggestion and now the crash is avoided; you see instead an error message on the console. |
|
Back to top |
|
|
Body-Guard Unstoppable!
Joined: 08 Jan 2006 Location: Hungary
|
Posted: Thu Aug 27, 2015 7:44 pm Post subject: |
|
|
Nice, this certainly increases the user friendliness. The dehacked documentation is also extremely useful! |
|
Back to top |
|
|
|