Autoaim range

General help and assistance forum.
Post Reply
Nixx57
Registered just to make one post
Posts: 1
Joined: Sat Oct 05, 2019 1:30 pm
Location: France

Autoaim range

#1

Post by Nixx57 » Tue Oct 08, 2019 7:25 pm

Hi all (and sorry for the bad English)

I am a student developer since 1 month and I started to change the port first for my personal pleasure. Then, I intend to submit my ideas.

And I have an issues with autoaim :
I Always play in a classicstyle (coop/invasion): no mouselook + vertical autoaim (and sometimes only keyboard when i play with my laptop)
I want to increase the range of the autoaim, to make it more adapted to the current maps which are sometimes very large.

I found in p_mobj.cpp at line 7412:

Code: Select all

fixed_t linetargetrange = defaultobject->maxtargetrange > 0 ? defaultobject->maxtargetrange*64 : 16*64*FRACUNIT;
whether 1024 units.
I changed this to :

Code: Select all

128*128*FRACUNIT;
(Yes, it's a lots :rolleyes: )

Then, 2 issues :
-That's work, but only with projectile (type rocket, plasmaball…), it doesn't work with the hitscan.
-horizontal aiming does not work properly, as if it worked by level (at mid/high range)

The help I am looking for is mainly an indication to have the references in the code.
It's hard to know where to look.

Do you have infos about the autoaim works (vertical/horizontal)?
I'd like to erase the algorithm and make it a new one with (maybe) help from my classmates if the current is not too scattered.

Thanks you =)

Post Reply