[Addressed] Add translation parameter to all spawning functions

Moderator: GZDoom Developers

Add translation parameter to all spawning functions

Postby Nash » Fri Sep 01, 2006 11:39 pm

Including the ACS spawn and projectile functions, and the custommissile codepointers in DECORATE, etc.

If not for completeness' sake.
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Postby Theshooter7 » Fri Sep 01, 2006 11:42 pm

Well, while we are at it, I suggest other action specials (Like Thing_Projectile, Radius_Quake, Thing_Activate, etc.) having a TID of 0 uses the Activator.

I also agree with Nash.
User avatar
Theshooter7
Don't talk about Fight Club
 
Joined: 05 Mar 2006

Postby Nash » Fri Sep 01, 2006 11:44 pm

I'd particularly appreciate the translation parameter for A_CustomMissile for some of the effects I'd like to use in my wad.

Regarding the TID of 0 uses activator - yes this would be awesome. Though I think solarsnowfall already made a feature suggestion thread on it.
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Postby Theshooter7 » Fri Sep 01, 2006 11:51 pm

I am aware. But he only mentioned Thing_Projectile and it's derivitives. (sp?) I am simply suggesting everything to be treated similar.
User avatar
Theshooter7
Don't talk about Fight Club
 
Joined: 05 Mar 2006

Postby Nash » Tue Oct 31, 2006 4:26 pm

I've added a translation parameter for A_CustomMissile... using TortoiseSVN, how do I submit my change?

(Wheee my first ZDoom source contribution! :P)
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Postby Necromage » Tue Oct 31, 2006 4:50 pm

Create a diff patch and post it here, TortoiseSVN has the ability to do this but I am not sure how it works.
User avatar
Necromage
Your neighborely friendly hobo
 
Joined: 10 Feb 2005
Location: NJ

Postby Nash » Tue Oct 31, 2006 6:05 pm

Nevermind, I somehow missed the "SVN Commit" option in the right-click menu.

I'm waiting for someone to check the "Cacodemon moves super fast" bug though before committing my changes.
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Postby Necromage » Tue Oct 31, 2006 7:26 pm

I have never tried it but the zdoom svn should disallow you from committing.
User avatar
Necromage
Your neighborely friendly hobo
 
Joined: 10 Feb 2005
Location: NJ

Postby Theshooter7 » Tue Oct 31, 2006 7:37 pm

You actually figured something out in the Source? :shock:

I can't seem to find any of the Decorate Related Code at all. I also am having a hard time understanding the classes.
User avatar
Theshooter7
Don't talk about Fight Club
 
Joined: 05 Mar 2006

Postby Nash » Tue Oct 31, 2006 10:38 pm

You'll need to learn how to code in C++. ACS is *kind of* a stripped down version of C so some stuff might look familiar but that's about it.

The source code is a totally different monster than what you're used to seeing in DECORATE... it all began when there was this heated discussion about a custom HUD scripting language going on. It was closed eventually, but then I thought to myself "hmm maybe I should just try implementing it myself".

Then it was one of those weird nights for me again, where I would just wake up for no reason at like 4 or 5 in the morning. I proceeded to install Microsoft Visual C++, and went straight into the GZDoom source. I was apparently learning C++ then and there. o_O A bunch of tutorials here and there and in a few minutes I was already making a custom GZDoom.exe... my first modification was a totally redesigned Options menu for my project.

Nothing fancy, but it was from then on that I slowly expanded my (limited) C++ knowledge.
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Postby Theshooter7 » Tue Oct 31, 2006 10:43 pm

I know some C++. For your tutorials, did you just read some typical standard stuff (like from cprogramming.com) or was there some specifics for (G)ZDoom Source editing that I am not aware of? :?

Also, so where is all the Decorate Related Coding? What are the names of the Headers and CPP Files?
User avatar
Theshooter7
Don't talk about Fight Club
 
Joined: 05 Mar 2006

Postby Nash » Tue Oct 31, 2006 10:58 pm

I can't remember. I just Googled "C++ tutorials".

Also, your question isn't specific. At any rate, try looking at the thingdef* files. Or if you're using MSVC++, just look under the "Decorate++" folder.
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Postby Grubber » Wed Nov 01, 2006 6:30 am

Necromage wrote:I have never tried it but the zdoom svn should disallow you from committing.

I think you can't commit your changes to the SVN unless you're Randy or Graf. If anyone was able to commit anything, it would become huge mess.
User avatar
Grubber
I can wire anything directly into anything. I am the professor!
 
Joined: 15 Oct 2003
Location: Czech Republic

Postby Necromage » Wed Nov 01, 2006 12:05 pm

Grubber wrote:I think you can't commit your changes to the SVN unless you're Randy or Graf. If anyone was able to commit anything, it would become huge mess.
Exactly
User avatar
Necromage
Your neighborely friendly hobo
 
Joined: 10 Feb 2005
Location: NJ

Postby Nash » Wed Nov 01, 2006 11:33 pm

I hope I generated the patch correctly...

Code: Select allExpand view
Index: zdoom/trunk/src/thingdef.cpp
===================================================================
--- zdoom/trunk/src/thingdef.cpp   (revision 371)
+++ zdoom/trunk/src/thingdef.cpp   (working copy)
@@ -682,7 +682,7 @@
    FUNC(A_StopSoundEx, "T" )
    FUNC(A_SeekerMissile, "XX" )
    FUNC(A_Jump, "XL+" )
-   FUNC(A_CustomMissile, "MXXxxx" )
+   FUNC(A_CustomMissile, "MXXxxxx" )
    FUNC(A_CustomBulletAttack, "XXXXmx" )
    FUNC(A_CustomRailgun, "Xxccxxx" )
    FUNC(A_JumpIfHealthLower, "XL" )
Index: zdoom/trunk/src/thingdef_codeptr.cpp
===================================================================
--- zdoom/trunk/src/thingdef_codeptr.cpp   (revision 371)
+++ zdoom/trunk/src/thingdef_codeptr.cpp   (working copy)
@@ -617,7 +617,7 @@
 //==========================================================================
 void A_CustomMissile(AActor * self)
 {
-   int index=CheckIndex(6);
+   int index=CheckIndex(7);
    if (index<0) return;
 
    ENamedName MissileName=(ENamedName)StateParameters[index];
@@ -626,6 +626,7 @@
    angle_t Angle=angle_t(EvalExpressionF (StateParameters[index+3], self) * ANGLE_1);
    int aimmode=EvalExpressionI (StateParameters[index+4], self);
    angle_t pitch=angle_t(EvalExpressionF (StateParameters[index+5], self) * ANGLE_1);
+   INTBOOL transfer_translation = EvalExpressionI (StateParameters[index+6], self);
 
    AActor * targ;
    AActor * missile;
@@ -716,6 +717,12 @@
             {
                missile->health=-2;
             }
+
+            // [Nash] transfer translation to missile
+            if (transfer_translation)
+            {
+               missile->Translation = self->Translation;
+            }
          }
       }
    }


As for testing; yes, it works. I've incorporated it into nashgore.wad.
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Next

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests