A Christmas present for ZDoom

Moderator: GZDoom Developers

User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Graf Zahl wrote:Since I won't have any time for 4-5 hours anyway to do something about it I think it's a good chance to add stuff anybody here has done with this code. Feel free to send them to me by email and if it's good I'll add it.

Update: I decided to add 4 new code pointers in the process

- A_GiveInventory
- A_TakeInventory
- A_SpawnItem
- A_ThrowGrenade

A_GiveInventory and A_TakeInventory are self-explanatory and equivalent to their ACS counterparts.
A_SpawnItem spawns an object in front of the caller. This function is capable of handling monsters properly, unlike A_CustomMissile.
A_ThrowGrenade throws an item like the grenade version of Hexen's flechette.

A_SpawnItem and A_ThrowGrenade are both designed to be usable by both monsters and weapons.

Of course this means I have to do some testing so I'll post it as soon as it works.
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

Well, you're right, I just removed the MF_NOBLOCKMAP check from Link/Unlinkfromworld and didnt notice the slightest bit of difference. For fun I decided to see what CAH thought of it. It was slower, but it was already unplayable for me so not much difference there...

Maybe the best route for this is to include a compatibility option.
User avatar
deathz0r
Posts: 353
Joined: Tue Jul 15, 2003 4:09 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Land with them kangaroo
Contact:

Post by deathz0r »

TheDarkArchon wrote:Just the graphics. I just want something to experiment with.
Right, check your PMs in this forum.
Graf Zahl wrote:A_SpawnItem spawns an object in front of the caller. This function is capable of handling monsters properly, unlike A_CustomMissile.
This will affect the projectile spawned from another projectile problem, right?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

No. A_SpawnItem is not for projectiles because it doesn't apply any momentum to the spawned object.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

For all who are interested: The first post in this thread now contains the updated source. That means the 4 new code pointers and the weapon offset fix are available.
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

Ok :)

Just for you deathz0r, I compiled it without any hacks :P

http://www.stateoftheworld.eclipse.co.u ... /zdoom.zip
User avatar
Your Name Is
Posts: 802
Joined: Sun Oct 31, 2004 5:06 pm
Location: Raleigh, NC
Contact:

Post by Your Name Is »

So... Is this in Wiki yet? NO IT'S NOT!

EDIT: De'n00bed by Finalizer
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

Of course it isnt, because its not official zdoom yet :P. This is exactly why I was hesitant to upload it. Why do you think Graf didn't?

Now shtup! :twisted:
User avatar
Finalizer
Posts: 180
Joined: Fri Sep 24, 2004 6:07 am

Post by Finalizer »

So, with this new "A_SpawnItem" thingy, it's possible to make monsters create other monsters right in front of them? If so, then maybe this means I can finally create the Pain Elemental IIs to work correctly!

...Yay for .96b! :mrgreen:
User avatar
MasterOFDeath
... in rememberance ...
Posts: 2024
Joined: Sat Apr 03, 2004 10:58 am

Post by MasterOFDeath »

Just asking because I am too lazy to look through the rest of this thread(2 pages is too much for me :P), has Randy seen this at all?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

He has stickied it so yes, he has seen it.
User avatar
Anakin S.
Posts: 1067
Joined: Fri Nov 28, 2003 9:39 pm
Location: A long time ago in a galaxy far, far away...

Post by Anakin S. »

deathz0r wrote:
Graf Zahl wrote:A_SpawnItem spawns an object in front of the caller. This function is capable of handling monsters properly, unlike A_CustomMissile.
This will affect the projectile spawned from another projectile problem, right?
It might be messy, but suppose you could use the main projectile to A_SpawnItem an invisible actor, which would then A_CustomMissile the fragments.
User avatar
deathz0r
Posts: 353
Joined: Tue Jul 15, 2003 4:09 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Land with them kangaroo
Contact:

Post by deathz0r »

Chilvence wrote:Just for you deathz0r, I compiled it without any hacks :P

http://www.stateoftheworld.eclipse.co.u ... /zdoom.zip
Excellente =D

Oh, another thing I've noticed in "96a" (I'm going to check it out now with this newer version) is that DECORATE weapons stay on the ground in co-op, yet normal weapons still don't do it. It's kind of weird, but hey, at least something stays on the ground. Haven't tried them in DM with the dmflag set to off though.
User avatar
Your Name Is
Posts: 802
Joined: Sun Oct 31, 2004 5:06 pm
Location: Raleigh, NC
Contact:

Post by Your Name Is »

LFIjdsafdnldsjflsndf
Bleh yeah!

I will wait patiently for .97 to come out, so Wiki can help meh.
User avatar
Killo Zapit
Posts: 292
Joined: Wed Jul 16, 2003 9:26 pm
Location: Most likely sleeping.

Post by Killo Zapit »

I still have need of something like this for destroyable items:

Code: Select all

void A_UnSetSpecial (AActor *self)
{
	self->flags &= ~MF_SPECIAL;
}
Out of curiosity, if I wanted to make my own exe, how would I add it to the codepointer list? Do I just stick "FUNC(A_UnSetSpecial, NULL)" somewhere in the "AFuncDesc AFTable[]=" block?

Also, would it someday be possible to set an item's use function to run a codepointer and/or action special like a state? I think it can be done. Maybe I should try and do it myself. I am not exactly a coder though. Let's see if I got the steps right: 1. Put "{ "inventory.useaction", (apf)InventoryUseAction, RUNTIME_CLASS(AInventory) }," somwhere in the "ActorProps props[] =" block. 2. Create a static "static void InventoryUseAction (Inventory *defaults, Baggage &bag)" function which does the following: SC_MustGetString(), Split the sting into the codepointer/action special name and any parameters, look up the codepointer/action special, store the codepointer/action special somewhere, and set's the item's "Use" function to some other function. 3. Make the inventory use function which will recall all the data stored in InventoryUseAction, and run the codepointer/action special as if the player had. I am not entirely sure how to do all of that. Is there an easier way?

Then again, I would have to convert all the project files ZDoom uses anyway because my copy of Visual C++ is out of date if I wanted to compile anything anyway...
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”