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]Select and Deselect states are mixed up

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    ZDaemon Forum Index -> Rejected Bugs
View previous topic :: View next topic  
Author Message
DoomerMrT
Spamming!


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

PostPosted: Sat Sep 19, 2009 6:15 am    Post subject: [Dehacked]Select and Deselect states are mixed up Reply with quote

When making a weapon, dehacked mixes up the select and deselect states of it. So the gun's select state is the deselect and vice versa. Its a state definition mixup in d_dehacked.cpp.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
BestOfTheWorst
Spamming!


Joined: 02 Jun 2006

PostPosted: Sat Sep 19, 2009 12:55 pm    Post subject: Reply with quote

Actually the weapon states are just fine.
eg.
Code:

Weapon 1 (Fist)
Select frame = 3
Deselect frame = 4


would be correct, and would have these kind of states
Code:

# Fist Select frame
Frame 3
Sprite number = 2   # PUNG
Sprite subnumber = 0
Next frame = 3
Duration = 1
#Code pointer = A_Lower

# Fist Deselect frame
Frame 4
Sprite number = 2   # PUNG
Sprite subnumber = 0
Next frame = 4
Duration = 1
#Code pointer = A_Raise

The confusing thing is actually the CodePointers, A_Lower is used when a weapon is selected, despite how the name sounds. Same for A_Raise being used when a weapon is deselected. See also Arrow Doom wikia


note: these code blocks may seem like grubbers dehacked defs, but these have been corrected. Grubber had the select/deselect states mixed up in his list. This might be the reason you though they were wrong too. (Aswell as the confusing naming convention of the codepointers)



so this is not a bug, and the naming convention of the codepointers can't be changed without breaking all the dehacked mods using them. Razz
Back to top
View user's profile Send private message
DoomerMrT
Spamming!


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

PostPosted: Sat Sep 19, 2009 2:33 pm    Post subject: Reply with quote

Well I thought that becuase while browsing d_dehacked.cpp I found this:


Code:
if (stricmp (Line1 + strlen (Line1) - 6, " frame") == 0)
         {
            FState *state = FindState (val);

            if (strnicmp (Line1, "Deselect", 8) == 0)
               info->upstate = state;
            else if (strnicmp (Line1, "Select", 6) == 0)
               info->downstate = state;
            else if (strnicmp (Line1, "Bobbing", 7) == 0)
               info->readystate = state;
            else if (strnicmp (Line1, "Shooting", 8) == 0)
               info->atkstate = info->holdatkstate = state;
            else if (strnicmp (Line1, "Firing", 6) == 0)
               info->flashstate = state;
         }




Unless I misunderstand something quite a bit, the upstate refers to Select and not deselect and downstate refers to Deselect and not select.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
phenex2
Spamming!


Joined: 10 Jan 2008

PostPosted: Sat Sep 19, 2009 3:04 pm    Post subject: Reply with quote

you can see that the latest zdoom release does the same.
so there is no need to change that, unless you want to
break compatibility to every dehacked patch that is out there,
just so the names make sense to you Razz

Code:

   if (strnicmp (Line1, "Deselect", 8) == 0)
      statedef.SetStateLabel("Select", state);
   else if (strnicmp (Line1, "Select", 6) == 0)
      statedef.SetStateLabel("Deselect", state);
   else if (strnicmp (Line1, "Bobbing", 7) == 0)
      statedef.SetStateLabel("Ready", state);
   else if (strnicmp (Line1, "Shooting", 8) == 0)
      statedef.SetStateLabel("Fire", state);
   else if (strnicmp (Line1, "Firing", 6) == 0)
      statedef.SetStateLabel("Flash", state);
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    ZDaemon Forum Index -> Rejected Bugs 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