Comments (11)
Is there any particular reason you're using GetBonePosition over GetHitboxPosition? Hitboxes are objectively better than bones.
EDIT: As for the actual reason why it's not working, I just tested it with my edit and it looks like you're unnecessarily doing *entity->GetBonePosition(8). Remove the * and it should work just fine.end i try gethitboxposition(8) same result
thanks for your answer
Not sure why it does that. I assume you can just remove the std::optional and replace it with Vector and change the corresponding entity.cpp function to match basic returns for Vector. That must have been added in a recent update; I'm being by quite a bit, just before the netvar change and I added just that over anything else. You may have to wait for qo0 to reply because I'm not familiar with std::optional.
from qo0-csgo.
Is there any particular reason you're using GetBonePosition over GetHitboxPosition? Hitboxes are objectively better than bones.
EDIT: As for the actual reason why it's not working, I just tested it with my edit and it looks like you're unnecessarily doing *entity->GetBonePosition(8). Remove the * and it should work just fine.
from qo0-csgo.
im working with an older version and its working perfectly, has the function changed?
Vector CBaseEntity::GetBonePosition(int iBone)
{
std::array<matrix3x4_t, MAXSTUDIOBONES> arrBonesToWorld;
if (this->SetupBones(arrBonesToWorld.data(), MAXSTUDIOBONES, BONE_USED_BY_ANYTHING, 0.f))
return arrBonesToWorld.at(iBone).at(3);
return Vector{ };
}
also gethitboxposition is not objectively better
from qo0-csgo.
auto bonePos = entity->GetBonePosition(BONE_HEAD).value()
You need to use auto or Vector.
Btw in your screenshot you did .value() and it said Vector doesn't have value() but GetBonePosition is std::optional Vector not Vector so you probably messed up with the code.
from qo0-csgo.
Is there any particular reason you're using GetBonePosition over GetHitboxPosition? Hitboxes are objectively better than bones.
EDIT: As for the actual reason why it's not working, I just tested it with my edit and it looks like you're unnecessarily doing *entity->GetBonePosition(8). Remove the * and it should work just fine.
end i try gethitboxposition(8) same result
thanks for your answer
from qo0-csgo.
i changed std::optional vector to vector
but i have a lot of error more :D
from qo0-csgo.
oh okay i fixed error (just deleted :p)
and got some result :(
and i try again gethitboxposition and again some result :(
from qo0-csgo.
thanks for answer
i changed getboneposition code and got some result :'(
from qo0-csgo.
thanks for answer
i changed code like ur comment
but same result
from qo0-csgo.
about std::optional u can read here
so, u should check is it has value (with .has_value()
) or just use .value()
/ .value_or(default value)
but u can notice problem isn't in getbonepos because ur calculations wrong and u should normalize calculated angle after subtract punch from it
pseudo:
QAngle angPunch = pLocal->GetPunch() * 2.0f // prefered weapon_recoil_scale instead hardcoded "2.0"
angPunch.Normalize();
QAngle angAim = M::CalcAngle(pLocal->GetEyePosition(), pEntity->GetBonePosition(BONE_HEAD).value()) - (pCmd->angViewPoint + angPunch)
angAim.Normalize()
from qo0-csgo.
op didnt answered for 2 days, should be fixed. closed
from qo0-csgo.
Related Issues (20)
- Do not compile on Visual Studio 2022 version 17.3 HOT 2
- Help for qo0 v2? HOT 11
- fix for the crash HOT 1
- Error C4996 when attempting to build HOT 1
- How to change menu size? HOT 1
- outdated sig for CKeyValues::FromString
- minhook crash HOT 3
- Font HOT 1
- Question regarding CS:2? HOT 6
- configs format problem HOT 1
- compiler error while adding an array variable. serializing `std::vector` HOT 4
- forwarding arguments to hooks original calls HOT 1
- AddVariable should check if variable already exist? HOT 6
- CRT::StringPrint && CRT::StringPrintN should using stb_sprintf HOT 2
- CCSGOPlayerAnimState::Update bypass checks HOT 1
- Unable to move forward with fake yaw enabled due to micromovement when knife is out HOT 4
- animation update breaking HOT 7
- Night mode doesn't work if disable post processing is enabled first HOT 2
- sv_maxusrcmdprocessticks incorrect value HOT 3
- qo0-cs2 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qo0-csgo.