Find POS of end of weapon
*solved*
|
Re: Find POS of end of weapon
how would i do this in CS:S
Code:
Maybe this could help you |
Re: Find POS of end of weapon
Well TraceAttack is not available for TF2. Otherwise the only thing I can tell your doing different is using GetClientAbsOrigin and I used GetClientEyeAngles and GetClientEyePosition. Would this make much difference?
|
Re: Find POS of end of weapon
maybe you could use this:
Code:
|
Re: Find POS of end of weapon
*solved*
|
Re: Find POS of end of weapon
Ensure WeaponOriginOffset is the right Offset?
|
Re: Find POS of end of weapon
How would I go about that?
|
Re: Find POS of end of weapon
Well, first log what its being set to or print it.
PrintToChatAll("WeaponIndex %d WepOriginOff %d", WeaponIndex, WeaponOriginOffset); Also, almost forgot, might be a good idea to get the Offset in OnPluginStart(). Seeing as an Offset shouldn't change during game play. :) ( DO REMEMBER THAT THERE ARE DIFFERENT OFFSETS FOR DIFFERENT WEAPONS IF YOU WERE TO PRE-LOAD IT. ) |
Re: Find POS of end of weapon
WeaponIndex: 1018 WeaponOriginOffset 716
It prints that wether I set the offset in onpluginstart() or leave it in the function. It is still drawing from 0,0,0 as the BeamOrigin for some reason though... I am clueless. |
Re: Find POS of end of weapon
Okay so heres what I figured out. I ran a GetEdictClassname on the players weapon, and it returned tf_weapon_syringegun_medic. Its entitynetclass is CTFSyringeGun. Heres the results of the little test script I made...
CTFSyringeGun & m_vecAbsOrigin = -1 CTFSyringeGun & m_vecOrigin = 716 tf_weapon_syringegun_medic & m_vecAbsOrigin = -1 tf_weapon_syringegun_medic & m_vecOrigin = -1 Problem is, when I use the one that returns 716 (the one I was using initally, it draws the BeamOrigin from 0,0,0. So I am just at a loss now. Any help would be great. |
| All times are GMT -4. The time now is 05:27. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.