Odd Cross-Bow Pickup Behavior

Moderator: Rex Claussen

User avatar
Rex Claussen
Developer
Developer
Posts: 2597
Joined: Tue Jul 11, 2006 18:36
Contact:

Odd Cross-Bow Pickup Behavior

Post by Rex Claussen »

When you first pick up the crossbow, it appears in your HUD and is immediately lowered (almost looks like it's disappearing). While it's lowered, pressing your reload key will make the crossbow show up again in your HUD. My guess for why this is happening is that something in the updated behavior code forces the weapon to be lowered when it doesn't have a bolt in the chamber. And, as the original code was set up with no auto-load of ammo, the updated game detects that the weapon is empty and lowers it.

I played Paranoiac & found that the weapon stays in the HUD when first picked up, even though the bolt is not automatically chambered. (In other words,, it works as intended.) I looked at the new weapon code, and am hopelessly out of my depth. Therefore, I thought I'd bring this to the Team's attention.

(BTW, great work on the crossbow model in the HUD, including the reload animations.)
User avatar
Ed the Bat
Developer
Developer
Posts: 122
Joined: Thu Oct 20, 2016 6:35

Re: Odd Cross-Bow Pickup Behavior

Post by Ed the Bat »

Thanks for the alert. I'm sure I overlooked something when I updated the weapons. I'll pencil this in for tomorrow when I have some free time, and post it to the Git repo as soon as I've got it solved.
User avatar
Rex Claussen
Developer
Developer
Posts: 2597
Joined: Tue Jul 11, 2006 18:36
Contact:

Re: Odd Cross-Bow Pickup Behavior

Post by Rex Claussen »

Ed the Bat wrote: Sun Jul 16, 2017 5:31.....and post it to the Git repo as soon as I've got it solved.
When you identify the fix, would you please also post it here? In that way I can make the edit on the version I have, and won't have to re-download the entire package. Thanks.
User avatar
Ed the Bat
Developer
Developer
Posts: 122
Joined: Thu Oct 20, 2016 6:35

Re: Odd Cross-Bow Pickup Behavior

Post by Ed the Bat »

https://github.com/drdteam/paranoidiac/ ... 63f5f91be5
It was an incredibly simple fix. I had simply forgotten to add a FrameIndex for this frame of the actor. Just had to add this to the XBow's MODELDEF entry:

Code: Select all

FrameIndex HWI1 B 0 93
Do bear in mind, however, that the weapon still has a minor graphical anomaly that it carries over from Half-Life: it will appear to have a bolt loaded in it when raised/lowered, even if it's supposed to be empty. I may work around this later with some custom animation.
Post Reply

Return to “Parallax”