Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grapple Rope Texture #48

Open
Kr3m opened this issue Apr 23, 2023 · 2 comments
Open

Grapple Rope Texture #48

Kr3m opened this issue Apr 23, 2023 · 2 comments

Comments

@Kr3m
Copy link

Kr3m commented Apr 23, 2023

I apologize in advance since this isn't really an issue with wolfcam at all, but I can't seem to find the asset that is used for the grapple rope when viewing demos. Assuming it is open source, I've been working on a mod and would prefer to use an open source texture for my grapple, but am not a huge fan of the one Open Arena has available. I tried to create my own, but it just doesn't look right. If this image isn't in fact open source, if I could see it, I could at least use it as a reference when scaling my own custom graphic which is also a chain link.

Thank you in advance and again apologies, I just didn't know the proper place to ask this question.

Below is the image I tried using, but of course it doesn't look right and I'm not quite sure how to scale it so it does.

9758

@brugal
Copy link
Owner

brugal commented Apr 24, 2023

See 'void CG_GrappleTrail( centity_t *ent, const weaponInfo_t *wi )' in cgame/cg_weapons.c

The Quake3 version just uses a lightning shader:

beam.reType = RT_LIGHTNING;
beam.customShader = cgs.media.lightningShader;

Quake live added a chain one:

beam.reType = RT_GRAPPLE;  //RT_BEAM;  //RT_LIGHTNING;  //RT_RAIL_RINGS;  //RT_LIGHTNING;
//beam.customShader = cgs.media.lightningShader;
beam.customShader = trap_R_RegisterShader("grapplingChain");

That shader is in the Quake Live pak files and uses:

gfx/misc/grapplingchain.tga

I remember I had to add a new RT_GRAPPLE type to get it to look right. See 'void RB_SurfaceGrapple( void )' in code/renderergl*/tr_surface.c.

That is identical to 'void RB_SurfaceLightningBolt( void )' but modifies the length:

len = VectorNormalize( vec );
len *= e->width;  //0.5

'e->width' is hard coded to '4' for grapple in cgame.

@Kr3m
Copy link
Author

Kr3m commented Apr 24, 2023

Wow. That was above and beyond what I'd asked, and I truly appreciate it. I actually have the CPMA/E+ grapple working fine at the moment, but am hoping I might be able to use this solution along with that, to get it working. After, I get this looking right, my next task is to target a sound on each action (fire, deploy, hit, pull, and release).

At any rate, I've been kicking some serious butt with my mod development lately, and really appreciate you going out of your way to share this. =D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants