Weapon.FireOffset for size-changed Pawns

Tutorials and discussions about Mapping - Introduce your own ones!
User avatar
Barbie
Godlike
Posts: 2770
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Weapon.FireOffset for size-changed Pawns

Post by Barbie »

Recently I noticed that weapon's FireOffset is adjusted for pawns which size is not default, but I cannot find any code in (v436) source that is doing that. Was that introduced in later versions?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
sektor2111
Godlike
Posts: 6397
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Weapon.FireOffset for size-changed Pawns

Post by sektor2111 »

:)
Look very well at "Weapon.uc" functions "ProjectileFire", "TraceFire"... Did you see something ? I'm asking because I think it's not the same for everyone... especially "Owner.Location". Smaller Pawn clearly doesn't used the same location as the Bigger Pawn - do you remember collision rules related to "DrawScale" ?

Tech Capture
A cube with two SkaarjTroopers (DrawScale 0.7 and DrawScale 2.0) after two/three seconds report their location...

Then FireOffset does corrections in "SetHand" adjusting some default "FireOffset" because... I think this field is not NULL, as for the way of firing, weapon takes in account "Location" of the Owner, the rest it's just original.

With regard to Skaarj and his weapon for me several things are out of logic. First of all, as Higor has pointed, invisible gun comes from a relevance flaw because EPIC has forgot their own networking rules... Issue is solved but...
Why Skaarj needs a gun in an empty server ? Why allocating memory for some useless actor ? When Skaarj suddenly detects a "player" in state attacking it might go as a "bIsPlayer", creating a weapon. If weapon is instantly replaced, he might capture any weapon in its radius if this one doesn't use any marker - clearly it's a replacement. Simple as that...
This is not the only reason for which I stated that an UT patch should fix critical problems without any modification, and THEN we speak about a real enhanced UT game based on logic not mixing new functions in an old architecture and expecting "compatibility".
Red_Fist
Godlike
Posts: 2163
Joined: Sun Oct 05, 2008 3:31 am

Re: Weapon.FireOffset for size-changed Pawns

Post by Red_Fist »

Just seems the projectile code needs to be the same automatic collision code that lets pawns allow larger collision set by mapper.

automatic collision like after you change the collision for stock pawns, same for "projectiles".
Binary Space Partitioning