|
VoltMod
C++23 framework for CS2 server plugins
|
Has one pawn copy another entity's bones while traces, bullets included, keep hitting it, and gives that pawn alone its collision back on detach, so a respawn is never written to. Keep one per player. More...
#include <BoneFollow.hpp>
Public Member Functions | |
| void | Attach (const Pawn &pawn, const Entity &parent) |
| void | Detach (const Pawn &pawn) |
| operator bool () const noexcept | |
Has one pawn copy another entity's bones while traces, bullets included, keep hitting it, and gives that pawn alone its collision back on detach, so a respawn is never written to. Keep one per player.
Definition at line 17 of file BoneFollow.hpp.
Parent pawn to parent with its bones taking the parent's pose by name. Does nothing when a pawn already follows, or when either is gone.
Definition at line 6 of file BoneFollow.cpp.
References VoltMod::Schema::CCollisionProperty::CollisionAttribute(), VoltMod::Schema::VPhysicsCollisionAttribute_t::CollisionFunctionMask(), VoltMod::Entity::Follow(), VoltMod::Entity::Ref(), VoltMod::Schema::VPhysicsCollisionAttribute_t::SetCollisionFunctionMask(), and VoltMod::Schema::CCollisionProperty::SurroundType().
| void VoltMod::BoneFollow::Detach | ( | const Pawn & | pawn | ) |
Clear pawn's parent and give back its collision if it is the one following, then forget it.
Definition at line 23 of file BoneFollow.cpp.
References VoltMod::Entity::AcceptInput(), VoltMod::Schema::CCollisionProperty::CollisionAttribute(), VoltMod::Entity::Ref(), VoltMod::Schema::VPhysicsCollisionAttribute_t::SetCollisionFunctionMask(), and VoltMod::Schema::CCollisionProperty::SetSurroundType().
|
inlineexplicitnoexcept |
Whether a pawn is following.
Definition at line 28 of file BoneFollow.hpp.