ZDaemon Forum Index ZDaemon
Client/Server DOOM
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Dehacked]A_Detonate misbehavior on weapons

 
Post new topic   Reply to topic    ZDaemon Forum Index -> Implemented Requests
View previous topic :: View next topic  
Author Message
DoomerMrT
Dominating!


Joined: 09 Mar 2007
Location: http://destiny-server.ath.cx/forums/

PostPosted: Sun Nov 08, 2009 6:11 pm    Post subject: [Dehacked]A_Detonate misbehavior on weapons Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Kilgore
Air Cavalry


Joined: 17 Jun 2003
Location: Up the river

PostPosted: Thu Aug 28, 2014 1:35 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Body-Guard
Unstoppable!


Joined: 08 Jan 2006
Location: Hungary

PostPosted: Fri Aug 29, 2014 10:14 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Sr69Mm-jC
Unstoppable!


Joined: 21 Jul 2011

PostPosted: Fri Aug 29, 2014 10:35 am    Post subject: Reply with quote

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 Smile 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
View user's profile Send private message
Kilgore
Air Cavalry


Joined: 17 Jun 2003
Location: Up the river

PostPosted: Thu Aug 27, 2015 5:48 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Body-Guard
Unstoppable!


Joined: 08 Jan 2006
Location: Hungary

PostPosted: Thu Aug 27, 2015 7:44 pm    Post subject: Reply with quote

Nice, this certainly increases the user friendliness. The dehacked documentation is also extremely useful!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    ZDaemon Forum Index -> Implemented Requests All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group