mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-08 00:13:21 +00:00
Change mask type
This commit is contained in:
parent
c249d63808
commit
a8671b32dc
1 changed files with 19 additions and 2 deletions
|
@ -249,7 +249,7 @@ stock bool GetGround(int client, float vPos[3], float vAng[3]) {
|
||||||
vAng[2] += 5.0;
|
vAng[2] += 5.0;
|
||||||
vPos[2] -= 500.0;
|
vPos[2] -= 500.0;
|
||||||
|
|
||||||
Handle trace = TR_TraceRayFilterEx(vAng, vPos, MASK_SHOT, RayType_EndPoint, TraceFilter);
|
Handle trace = TR_TraceRayFilterEx(vAng, vPos, MASK_SOLID, RayType_EndPoint, TraceFilter);
|
||||||
if(!TR_DidHit(trace)) {
|
if(!TR_DidHit(trace)) {
|
||||||
delete trace;
|
delete trace;
|
||||||
return false;
|
return false;
|
||||||
|
@ -663,3 +663,20 @@ stock void SetParentAttachment(int child, const char[] attachment, bool withOffs
|
||||||
stock void ClearParent(int child) {
|
stock void ClearParent(int child) {
|
||||||
AcceptEntityInput(child, "ClearParent");
|
AcceptEntityInput(child, "ClearParent");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stock void GetForwardVector(float vPos[3], float vAng[3], float vReturn[3], float fDistance) {
|
||||||
|
float vDir[3];
|
||||||
|
GetAngleVectors(vAng, vDir, NULL_VECTOR, NULL_VECTOR);
|
||||||
|
ScaleVector(vDir, fDistance);
|
||||||
|
AddVectors(vPos, vDir, vReturn);
|
||||||
|
}
|
||||||
|
|
||||||
|
stock void GetDirectionVector(float pos1[3], float angle[3], float rVec[3], float distance, float force) {
|
||||||
|
float endPos[3];
|
||||||
|
GetForwardVector(pos1, angle, endPos, distance);
|
||||||
|
|
||||||
|
MakeVectorFromPoints(pos1, endPos, rVec);
|
||||||
|
NormalizeVector(rVec, rVec);
|
||||||
|
|
||||||
|
ScaleVector(rVec, force);
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue