Weapon only bob in some states

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Weapon only bob in some states

Re: Weapon only bob in some states

by DoomRater » Wed Jul 08, 2009 12:31 pm

XutaWoo wrote:...which removes the point in the example I mentioned.

Actually, why does that remove weapon switching? Should be renamed to "WRF_NOCHECK" then.
This.

Also, can separate flags be added to disallow JUST Fire or JUST AltFire jumps? Since we're going all modular with this extremely powerful codepointer, might as well ask about this stuff too as it'll remove a lot of hacks I currently have and can't reproduce with just A_Refire and A_ClearRefire.

Re: Weapon only bob in some states

by Rachael » Mon Jul 06, 2009 3:06 pm

Duducrazy wrote:ok. now that the "new" flag has been added, when are you going to upload a new svn revision with this "new" flag so i can try it out myself?
Duducrazy wrote:YEEEE-HAW! [/downloading revision 377]
Check http://svn.drdteam.org/experimental/ as well, when asking that. Sometimes a new GZDoom is posted before Graf updates it - although funny thing is he did the exact same update (plus deleting a few files in the source, but that does not affect the build) not very long after I posted mine. :P

Re: Weapon only bob in some states

by XutaWoo » Mon Jul 06, 2009 2:49 pm

...which removes the point in the example I mentioned.

Actually, why does that remove weapon switching? Should be renamed to "WRF_NOCHECK" then.

Re: Weapon only bob in some states

by Gez » Mon Jul 06, 2009 1:54 pm

Enjay wrote:A_WeaponReady(0) (or blank) normal
A_WeaponReady(1) no bob
A_WeaponReady(2) no firing
A_WeaponReady(3) neither

(Someone please correct me if that's wrong or if there is more to it)
That's it. Wiki updated.
XutaWoo wrote:When can we expect a no switch flag, for things like Zen Dynamic's machette?
Well for now it's covered by WRF_NOFIRE.

Re: Weapon only bob in some states

by XutaWoo » Mon Jul 06, 2009 1:44 pm

When can we expect a no switch flag, for things like Zen Dynamic's machette?

Re: Weapon only bob in some states

by Enjay » Mon Jul 06, 2009 12:43 pm

From what I can tell

A_WeaponReady(0) (or blank) normal
A_WeaponReady(1) no bob
A_WeaponReady(2) no firing
A_WeaponReady(3) neither

(Someone please correct me if that's wrong or if there is more to it)

Re: Weapon only bob in some states

by Duducrazy » Mon Jul 06, 2009 12:38 pm

YEEEE-HAW! [/downloading revision 377]

edit: now all that's left is a wiki documentation showing how to use the new A_WeaponReady flag.

Re: Weapon only bob in some states

by Enjay » Mon Jul 06, 2009 12:36 pm

Duducrazy wrote:ok. now that the "new" flag has been added, when are you going to upload a new svn revision with this "new" flag so i can try it out myself?
I uploaded a compiled version about half an hour before you posted that. ;)

Re: Weapon only bob in some states

by Enjay » Mon Jul 06, 2009 12:34 pm

Thank you very much for this. I've tested it and it does exactly what I want. :thumb:

Re: Weapon only bob in some states

by Duducrazy » Mon Jul 06, 2009 12:15 pm

ok. now that the "new" flag has been added, when are you going to upload a new svn revision with this "new" flag so i can try it out myself?

Re: Weapon only bob in some states

by Graf Zahl » Mon Jul 06, 2009 9:42 am

Gez wrote:I'm not familiar at all with how the DeHackEd code cope with parameterized functions.

It has to cope. Think A_FatAttack, A_Mushroom and many others. I made sure that parameterized functions can be set properly in Dehacked when I did the DECORATE parser rewrite last year.

Re: Weapon only bob in some states

by Gez » Mon Jul 06, 2009 8:49 am

Okay, here's a patch that turns A_WeaponReady into A_WeaponReady(int flags=0). Flags can be left untouched, WRF_NoBob, WRF_NoFire, or both combined with |. A_WeaponBob is removed from the code since it can be replaced by A_WeaponReady(WRF_NoFire). The cleric staff, fighter axe and mage lightning have been adapted to the new code.

Re: Weapon only bob in some states

by Gez » Mon Jul 06, 2009 7:50 am

Graf Zahl wrote:Why does there need to be a new code pointer? Can't this be added as an argument to A_WeaponReady? That would also make A_WeaponBob obsolete.
Adding those as arguments to A_WeaponReady is certainly possible, but it requires more important changes (A_WeaponReady is CALL_ACTIONed in some places and those macro calls will have to be replaced by normal function calls to DoReadyWeaponToBob and DoReadyWeaponToFire) and I'm not familiar at all with how the DeHackEd code cope with parameterized functions.

Re: Weapon only bob in some states

by Graf Zahl » Mon Jul 06, 2009 7:19 am

This looks awfully redundant to me.

Why does there need to be a new code pointer? Can't this be added as an argument to A_WeaponReady? That would also make A_WeaponBob obsolete.

Re: Weapon only bob in some states

by Enjay » Mon Jul 06, 2009 4:43 am

Any chance that one or other of these patches (once finalised) could be posted as a code submission to ensure that they get attention? :)

Top