A Christmas present for ZDoom

Moderator: GZDoom Developers

User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

I take it the fact it's inside A_FirePhoenixPL1 wouldn't effect things.
User avatar
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Post by DoomRater »

Anotehr thing with secondary fire- some people might actually want their secondary function to be somethign that changes the weapon's primary fire. Thus, could we have settings to determine whether the gun alerts enimies when fired or not? This would also help make stealth weapons possible.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

TheDarkArchon wrote:I take it the fact it's inside A_FirePhoenixPL1 wouldn't effect things.

Code: Select all

//===========================================================================
//
// A_Recoil
//
//===========================================================================
void A_Recoil(AActor * self)
{
	FState * CallingState;
	int index=CheckIndex(1, &CallingState);
	fixed_t xymom = StateParameters[index];

   angle = actor->angle + ANG180;
   angle >>= ANGLETOFINESHIFT;
   actor->momx += FixedMul (xymom, finecosine[angle]);
   actor->momy += FixedMul (xymom, finesine[angle]);
}
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

DoomRater wrote: Thus, could we have settings to determine whether the gun alerts enimies when fired or not? This would also help make stealth weapons possible.

What? Why should the gun determine a property of its own?
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

DoomRater: +NO_ALERT
User avatar
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Post by DoomRater »

(didn't know it already existed)

EDIT: Some weapons alert monsters before they are supposed to. Example: the sniper rifle with the scope when the button is held down causes zombies to become active before the bullet is fired. Now, someone would want that only to alert when the gun's bullet is actually loosed...

EDIT 2: That actually doesn't require changing the gun's properties, but it would probably break MassMouth.
Scuba Steve
Posts: 1059
Joined: Sat Mar 27, 2004 8:56 pm

Post by Scuba Steve »

Hay Graf, there's a bug in the weapons code. Any weapon marked with the flag +SHOOTABLE won't headbob when you pick it up.
User avatar
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Post by DoomRater »

I remember that bug from before or something... Wasn't something set wrong?

Anyway CAN WE KEEP IT PLEASE?! Probably not... maybe a new flag DONTBOB?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Scuba Steve wrote:Hay Graf, there's a bug in the weapons code. Any weapon marked with the flag +SHOOTABLE won't headbob when you pick it up.

http://forum.zdoom.org/viewtopic.php?t=5750
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

DoomRater wrote:(didn't know it already existed)

EDIT: Some weapons alert monsters before they are supposed to. Example: the sniper rifle with the scope when the button is held down causes zombies to become active before the bullet is fired. Now, someone would want that only to alert when the gun's bullet is actually loosed...

EDIT 2: That actually doesn't require changing the gun's properties, but it would probably break MassMouth.

Use the NOALERT flag and then use the code pointer A_AlertMonsters to alert the monsters when necessary. Strife's crossbow already needs this.
User avatar
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Post by DoomRater »

Graf Zahl wrote:
DoomRater wrote:(didn't know it already existed)

EDIT: Some weapons alert monsters before they are supposed to. Example: the sniper rifle with the scope when the button is held down causes zombies to become active before the bullet is fired. Now, someone would want that only to alert when the gun's bullet is actually loosed...

EDIT 2: That actually doesn't require changing the gun's properties, but it would probably break MassMouth.

Use the NOALERT flag and then use the code pointer A_AlertMonsters to alert the monsters when necessary. Strife's crossbow already needs this.
Thanks for the DECORATE lessons, Graf. "_"
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Status update:

I did the first tests with the use state and so far it looks good.

I also did some changes to A_SpawnItem so that monsters spawned by it don't attack the monster that spawned them. By doing this I was also able to remove some special handling from the Wizard/D'sparil and Bishop/Heresiarch which did the same but was not friendly-aware so now it uses the same logic as the general case.

Since I was messing around with this code anyway I also turned the special case of the Bishop which never switches targets into a NOTARGETSWITCH flag. This could be useful for custom monsters.

Nice side effect: I could remove the OkayToSwitchTarget functions from the Wizard, D'Sparil, the Bishop, the Heresiarch and Strife's programmer.
User avatar
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Post by DoomRater »

I tried A_AlertMonsters but it doesn't seem to be working. The game didn't give me an error though, it just didn't alert the monsters.

EDIT: Also, how do I make projectiles come out at random angles? And if there's no way to do that it should be implemented.
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

Using Jumps it's possible, else no.
User avatar
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Post by DoomRater »

I figured it could be done with jumps (after thinking about it later), but.... that's gonna require a page and a half of code just to get right! Because I'm firing FIVE such projectiles and I need jumps for ALL of them! There should be a more efficient way of coding it, such as perhaps a Rand command or so?
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”