Jump to content
The Dark Mod Forums

Recommended Posts

Posted

Been scouring the net for an active community for doom3 and this was the most active outside of github source codes... so I figured it might be worth a shot.

 

Looking to see if there is anyone who can give me a hand fixing up the thirdperson cross hair for Doom 3 Ruiner. There are 2 bugs in it. I'm hoping to get a fix included for the upcoming, and long overdue, patch for the mod. This is probably the biggest bug in the mod.

 

The first bug is from the trace line made to determine the cross hair's position. When playing the mod, type g_debugweapon 1 in the console to show the line used to determine the position and also for the melee combat related additions. When something gets in the way of the line, the cross hair won't update. This is easily duplicated by standing next to a wall or door way and just shooting. I have a hunch the issue is mainly caused by the shoulder camera offsetting the camera. Maybe being able to offset the origin of the line to the right would help?

 

The other bug deals with launching projectiles from the barrel. When set to 1, the cross hair is always off. to counter act it an offset can be set in the cursor.gui It works alright, but will still be off when looking too high or low because of the weapons barrel position. The only thing I can think of is maybe a flag in the projectiles fired to aim towards it... which could look wierd unless the crosshair position is offset right in the cursor.gui.

 

Any help would be really appreciated!

 

We uploaded the source code for the mods years ago on the mod db.

https://www.moddb.com/mods/ruiner/downloads/ruiner-hardqore-2-source-codes

 

The crosshair is handled in the player cursor.cpp

Posted

It is not easy to build and run your code, because it needs some assets (I guess D3 assets), which e.g. I don't have.

So debugging this requires would considerable effort from TDM coders.

Maybe videos with the problem will help a bit.

 

 

Looking at the sources, I have not found where crosshair is computed.

I see tracer.h/cpp which seems to be used to draw projectile paths. Also I found some relevant code in idWeapon::Event_LaunchProjectiles.

 

In projectile launching code I see:

idVec3 view_pos = playerViewOrigin + playerViewAxis[ 0 ] * 2.0f; // Muzzle pos for translation clip model only-- For barrel Launched projectiles
...
if ( barrelLaunch || tracer || beam ) { // Do not execute this part unless projectile is barrel launched or has a tracer effect.
    gameLocal.clip.Translation( tr, view_pos, view_pos + dir * 4096.0f, NULL, mat3_identity, MASK_SHOT_RENDERMODEL, owner );

It looks like this trace is always launched from view position.

 

There is some code to correct it later:

idVec3 &launch_pos = view_pos;
...
if ( barrelLaunch ){
    launch_pos = muzzle_pos; 
}

But it seems to happen after the first code segment, so probably it does not have effect.

 

Anyway, it would be great to know where crosshair is computed.

Posted

Yes the mod requires doom3 to run. I completely understand not having d3 installed since you guys are standalone. If its a hassle dont worry about as I wouldnt want to hold you guys up any. I do appreciate the effort looking into it. cross hair stuff is located in the playercursor.cpp file

 

Since posting this topic; a port to dhewm has started. So maybe itll get tackled during or afterwards with a cleaner code on hand. Once again thanks for the look!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 1 reply
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...