View Single Post
Author Message
Shadowysn
Senior Member
Join Date: Sep 2015
Location: Location:
Old 10-15-2019 , 06:52   [TF2] Acquire player's weapon_bone coordinates?
Reply With Quote #1

(SOLVED, GO TO SECOND LAST POST FOR SOLUTION)
SetParent and SetParentAttachment don't work this time, unfortunately.

I'm trying to make a dropped clone of the player's weapon, but after switching to using offsets to spawn the weapon it's physics now freeze.
(If you don't know what offsets I'm talking about, it's like signatures but easier to find due to asherkin's vtable dumper)

I soon found out that the cause was the parenting, where it had previously worked for a CreateEntityByName-spawned weapon drop.

Before I wrote up the code utilizing SetParent on the given entity, I had experimented with getting an origin and angles from a parented info_target but it didn't work too well once I found out it doesn't have an origin property...

Now I brought back that old info_target thing after finally discovering datamaps existed, but GetEntPropVector reports the datamap as out of bounds, only having 1 element... (Happens to m_vecOrigin, m_angRotation plus their Abs counterparts m_vecAbsOrigin, m_angAbsRotation respectively)

Anyone willing to offer some help? I don't exactly use IDA so... er...

EDIT:
DeadRinger.smx
DeadRinger.sp
tf2.allclass-deadringer.txt
Put the .txt file into the gamedata folder.

Last edited by Shadowysn; 10-19-2019 at 11:54.
Shadowysn is offline