The Magic Behind Weapon Rings

Status
Not open for further replies.

Master Cheater X

A new era is here!
Hello,
I'm trying to find where the information of the weapon rings is stored, I've tried searching in SOC but I can't seem to find it, It is for a upcoming wad. I tried looking in the SRB2 wiki but it only told you about the SOC state. Any information is useful. Thank you.
 
I am pretty sure the weapon rings are located in rail.dta? Unless that was for 2.0, then it would be in Srb2.srb.
 
They're in ring.dta.

Besides, he was asking for where they were in SOC, not where their graphics are stored.
 
Ring firing for various weapon rings, which includes firing delay checks and sets as well as special adjustments for i.e. Scatter Ring, is all handled in a function in p_user.c called P_DoFiring, which can be referenced here. You may have to reference the functions called within for a full understanding of what happens in this scenario, particularly P_SpawnPlayerMissile and P_SPMAngle, which are contained elsewhere in the code. (Searching the function names in the GitHub repo should help you find them.) SOC info for the weapon rings, which includes stuff like radius, height, projectile speed and etc, is found either on the SRB2 Wiki or in info.c. (The former is likely much easier to read.)

And since it might not be immediately apparent from looking at those, fired rail rings are basically normal red rings that run their movement and collision checks 256 times upon being fired, leading to a firing speed of 15360 fracuits on the first tic and the standard 60 thereafter.
 
P_SPMAngle's code is located in p_mobj.c, and P_SpawnPlayerMissile is actually defined to be just P_SPMAngle but with particular things pre-filled in. (see p_local.h)
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top