Much Help Needed

Discuss programming in the QuakeC language.
Post Reply
Raelyn
Posts: 6
Joined: Fri Apr 01, 2005 2:39 am

Much Help Needed

Post by Raelyn »

Hi ppl, I'm working on a mod for the Return To Castle Wolfenstein game and I really need some help/advise. I imported a new game character into the game that is considerably taller then the standard players and I need to raise the camera(?) view that a player is using when they are that new character to the new height. I've been combing over the source code but I can't find anything but a few references to DEFAULT_VIEWHEIGHT. Since RTCW is so simular to Q3 maybe someone can point me in the right direction or file and I'll hopefully take it from there?
Many Thanks!!!
Sajt
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Post by Sajt »

This is a Quake 1 site....

but maybe find the definition of DEFAULT_VIEWHEIGHT (which I imagine is 22), add a TALL_VIEWHEIGHT or something with a bigger number, and go through all references of DEFAULT_VIEWHEIGHT in the code, using TALL_VIEWHEIGHT instead if you're the tall person? (Up to you how to figure out when you're the tall person though... )
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Post by Spike »

Are you sure you need to change the camera and not the player size instead?
Raelyn
Posts: 6
Joined: Fri Apr 01, 2005 2:39 am

Post by Raelyn »

Sajt wrote:This is a Quake 1 site....
True, but since RTCW is a stepchild of Q3 I thought I'd give it a try. :lol:
Plus you good folks here understand the code and talk about it!
Sajt wrote: but maybe find the definition of DEFAULT_VIEWHEIGHT (which I imagine is 22), add a TALL_VIEWHEIGHT or something with a bigger number, and go through all references of DEFAULT_VIEWHEIGHT in the code, using TALL_VIEWHEIGHT instead if you're the tall person? (Up to you how to figure out when you're the tall person though... )
I'll try that.. thanks, Sajt. :D
Raelyn
Posts: 6
Joined: Fri Apr 01, 2005 2:39 am

Post by Raelyn »

Spike wrote:Are you sure you need to change the camera and not the player size instead?
Hi Spike, I got the new model into the game but it's about twice the height of the average player..(which is what I want)
So when you're that new player you should be looking down on the other players, instead of eye-to-eye like it is now.
I went into third-person-view and used debug_bullets to check out some things and the bounding box, camera, and bullets are still looking the same as if it was still one of the regular soldiers.
I'm not a coder or scripter but I've been reading the source file for about 2 weeks now and its starting to make 'some' sense to me.
I made a few small changes to test my ability, compiled it, and it does work. :shock:
But here's a question to confirm my newness to coding...
Is the Bounding Box and Hit Box the same thing?
Supa
Posts: 164
Joined: Tue Oct 26, 2004 8:10 am

Post by Supa »

I'm not very knowledgeable in Q3 gamecode, but I'm pretty sure the bounding box is for collisions against the world and the hitboxes are for collisions against traces.
aut viam inveniam aut faciam
Sajt
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Post by Sajt »

Ooh, I didn't know RTCW had hitboxes!

Raelyn, you're also going to want to increase the bbox size. If anywhere it says something like this in the Q3 code: (I haven't seen the Q3/RTCW code really so I don't even know if they use the same Vector macros as Quake did)

VectorSet(mins, -16, -16, -24);
VectorSet(maxs, 16, 16, 32);

Use this instead for the tall guy
VectorSet(mins, -16, -16, -24);
VectorSet(maxs, 16, 16, 72);


Or maybe they have it like this
vec3_t mins = {-16, -16, -24};
vec3_t maxs = {16, 16, 32};

Whatever it looks like, just take the 32 and change it to a bigger number
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Raelyn
Posts: 6
Joined: Fri Apr 01, 2005 2:39 am

Post by Raelyn »

Supa wrote:I'm not very knowledgeable in Q3 gamecode, but I'm pretty sure the bounding box is for collisions against the world and the hitboxes are for collisions against traces.
Ahhhh.. you must be right. I made a character run against a wall in DevMode to test this and sure enough the box I'm seeing is just touching the wall.
The hit box must be tighter against the character or I would be able to score hits alot better then I do. :wink:
Thanks for answering that, Supa!
Raelyn
Posts: 6
Joined: Fri Apr 01, 2005 2:39 am

Post by Raelyn »

Sajt wrote:Ooh, I didn't know RTCW had hitboxes!

Raelyn, you're also going to want to increase the bbox size. If anywhere it says something like this in the Q3 code: (I haven't seen the Q3/RTCW code really so I don't even know if they use the same Vector macros as Quake did)

VectorSet(mins, -16, -16, -24);
VectorSet(maxs, 16, 16, 32);

Use this instead for the tall guy
VectorSet(mins, -16, -16, -24);
VectorSet(maxs, 16, 16, 72);


Or maybe they have it like this
vec3_t mins = {-16, -16, -24};
vec3_t maxs = {16, 16, 32};

Whatever it looks like, just take the 32 and change it to a bigger number
:D :D I know where this is! They use the vec3_t mins description.
I'll try this out now. Many Many thanks, Sajt!
I'll let you guys know how it works out.
Raelyn
Posts: 6
Joined: Fri Apr 01, 2005 2:39 am

Post by Raelyn »

Success!! :D

I found the vec3_t player mins for the BBox and made it bigger. Then tested it and discovered that the BoundingBox is also the HitBox. :?
Then found the #define VIEWHEIGHT and changed it and it worked perfectly. Thanks again, guys! I feel my headache letting up already :lol:
Post Reply