mirror of
https://github.com/dhewm/dhewm3-sdk.git
synced 2025-01-31 04:50:45 +00:00
Update Weapon.cpp
launch from barrel is no longer needed for projectiles to launch from the weapon's barrel, and then to the thirdperson cross hair position. This fixes the projectiles not launching to the center of the thirdperson cross and also fixes the offset when aiming too high or too low. projectiles in weapon.def files need launchfrombarrel set to 0 for this work. the crosshair offsets also need to be adjust in the cursor.gui file as each one offset manually in Rivensin/Ruiner 2010 build.
This commit is contained in:
parent
85352e4a48
commit
dd30a38bb1
1 changed files with 2 additions and 2 deletions
|
@ -4843,8 +4843,8 @@ void idWeapon::Event_LaunchProjectiles( int num_projectiles, float spread, float
|
|||
|
||||
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 );
|
||||
traceDist = (tr.endpos - view_pos).LengthSqr();
|
||||
gameLocal.clip.Translation( tr, muzzle_pos, muzzle_pos + dir * 4096.0f, NULL, mat3_identity, MASK_SHOT_RENDERMODEL, owner ); //REVILITY 2018 WAS VIEW_POS
|
||||
traceDist = (tr.endpos - muzzle_pos).LengthSqr(); //REVILITY 2018 WAS VIEW_POS. THIS FIXES PROJECTILES FIRED FROM THE BARREL NOT GOING TO THE CROSSHAIR
|
||||
|
||||
//ivan start - fix aim
|
||||
|
||||
|
|
Loading…
Reference in a new issue