mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-01-14 15:48:01 +03:00
Reversed CBasePlayer and some function blending from animation.cpp
Fix line ending all files
This commit is contained in:
parent
32d9488658
commit
ed2e465d2b
@ -1,5 +1,39 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
/*
|
||||
* Globals initialization
|
||||
*/
|
||||
#ifndef HOOK_GAMEDLL
|
||||
|
||||
sv_blending_interface_t svBlending =
|
||||
{
|
||||
SV_BLENDING_INTERFACE_VERSION,
|
||||
SV_StudioSetupBones
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
sv_blending_interface_t svBlending;
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
server_studio_api_t IEngineStudio;
|
||||
studiohdr_t *g_pstudiohdr;
|
||||
|
||||
float (*g_pRotationMatrix)[3][4];
|
||||
float (*g_pBoneTransform)[128][3][4];
|
||||
|
||||
//float (*g_pRotationMatrix)[3][4];
|
||||
//float (*g_pBoneTransform)[ MAXSTUDIOBONES ][3][4];
|
||||
//float *((*g_pRotationMatrix)[3][4]);
|
||||
//float *((*g_pBoneTransform)[ MAXSTUDIOBONES ][3][4]);
|
||||
|
||||
float omega;
|
||||
float cosom;
|
||||
float sinom;
|
||||
float sclp;
|
||||
float sclq;
|
||||
|
||||
/* <1523e> ../cstrike/dlls/animation.cpp:57 */
|
||||
NOBODY int ExtractBbox(void *pmodel, int sequence, float *mins, float *maxs)
|
||||
{
|
||||
@ -261,19 +295,44 @@ NOBODY void SetBodygroup(void *pmodel, entvars_t *pev, int iGroup, int iValue)
|
||||
}
|
||||
|
||||
/* <15a6d> ../cstrike/dlls/animation.cpp:545 */
|
||||
NOBODY int GetBodygroup(void *pmodel, entvars_t *pev, int iGroup)
|
||||
int GetBodygroup(void *pmodel, entvars_t *pev, int iGroup)
|
||||
{
|
||||
// {
|
||||
// studiohdr_t *pstudiohdr; // 547
|
||||
// mstudiobodyparts_t *pbodypart; // 556
|
||||
// int iCurrent; // 561
|
||||
// }
|
||||
studiohdr_t *pstudiohdr = (studiohdr_t *)pmodel;
|
||||
|
||||
if (!pstudiohdr)
|
||||
return 0;
|
||||
|
||||
if (iGroup > pstudiohdr->numbodyparts)
|
||||
return 0;
|
||||
|
||||
mstudiobodyparts_t *pbodypart = (mstudiobodyparts_t *)((byte *)pstudiohdr + pstudiohdr->bodypartindex) + iGroup;
|
||||
|
||||
if (pbodypart->nummodels <= 1)
|
||||
return 0;
|
||||
|
||||
int iCurrent = (pev->body / pbodypart->base) % pbodypart->nummodels;
|
||||
return iCurrent;
|
||||
}
|
||||
|
||||
/* <15aed> ../cstrike/dlls/animation.cpp:605 */
|
||||
NOBODY int Server_GetBlendingInterface(int version, sv_blending_interface_s **ppinterface, engine_studio_api_s *pstudio, float *rotationmatrix, float *bonetransform)
|
||||
C_DLLEXPORT int Server_GetBlendingInterface(int version, struct sv_blending_interface_s **ppinterface, struct engine_studio_api_s *pstudio, float *rotationmatrix, float *bonetransform)
|
||||
{
|
||||
if (version != SV_BLENDING_INTERFACE_VERSION)
|
||||
return 0;
|
||||
|
||||
*ppinterface = &svBlending;
|
||||
|
||||
IEngineStudio.Mem_Calloc = pstudio->Mem_Calloc;
|
||||
IEngineStudio.Cache_Check = pstudio->Cache_Check;
|
||||
IEngineStudio.LoadCacheFile = pstudio->LoadCacheFile;
|
||||
|
||||
// TODO: Mod_Extradata offset +12
|
||||
IEngineStudio.Mod_Extradata = (void *(*)(struct model_s *))pstudio->Mod_ForName;
|
||||
|
||||
g_pRotationMatrix = (float (*)[3][4])rotationmatrix;
|
||||
g_pBoneTransform = (float (*)[128][3][4])bonetransform;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <15ba5> ../cstrike/dlls/animation.cpp:630 */
|
||||
@ -347,102 +406,397 @@ void AngleQuaternion(vec_t *angles, vec_t *quaternion)
|
||||
#endif //REGAMEDLL_FIXES
|
||||
|
||||
/* <15c4d> ../cstrike/dlls/animation.cpp:653 */
|
||||
NOBODY void QuaternionSlerp(vec_t *p, vec_t *q, float t, vec_t *qt)
|
||||
void QuaternionSlerp(vec_t *p, vec_t *q, float t, vec_t *qt)
|
||||
{
|
||||
// {
|
||||
// int i; // 655
|
||||
// float a; // 658
|
||||
// float b; // 659
|
||||
// }
|
||||
int i;
|
||||
float_precision a = 0;
|
||||
float_precision b = 0;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
a += (p[i] - q[i]) * (p[i] - q[i]);
|
||||
b += (p[i] + q[i]) * (p[i] + q[i]);
|
||||
}
|
||||
|
||||
if (a > b)
|
||||
{
|
||||
for (i = 0; i < 4; i++)
|
||||
q[i] = -q[i];
|
||||
}
|
||||
|
||||
cosom = (p[0] * q[0] + p[1] * q[1] + p[2] * q[2] + p[3] * q[3]);
|
||||
|
||||
if ((1.0 + cosom) > 0.00000001)
|
||||
{
|
||||
if ((1.0 - cosom) > 0.00000001)
|
||||
{
|
||||
float_precision cosomega = acos((float_precision)cosom);
|
||||
|
||||
omega = cosomega;
|
||||
sinom = sin(cosomega);
|
||||
|
||||
sclp = sin((1.0 - t) * omega) / sinom;
|
||||
sclq = sin(omega * t) / sinom;
|
||||
}
|
||||
else
|
||||
{
|
||||
sclq = t;
|
||||
sclp = 1.0 - t;
|
||||
}
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
qt[i] = sclp * p[i] + sclq * q[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
qt[0] = -q[1];
|
||||
qt[1] = q[0];
|
||||
qt[2] = -q[3];
|
||||
qt[3] = q[2];
|
||||
|
||||
sclp = sin((1.0 - t) * 0.5 * M_PI);
|
||||
sclq = sin(t * 0.5 * M_PI);
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
qt[i] = sclp * p[i] + sclq * qt[i];
|
||||
}
|
||||
}
|
||||
|
||||
void (*pQuaternionMatrix)(vec_t *quaternion, float matrix[3][4]);
|
||||
|
||||
/* <15cd0> ../cstrike/dlls/animation.cpp:700 */
|
||||
NOBODY void QuaternionMatrix(vec_t *quaternion, float *matrix)
|
||||
NOBODY void __declspec(naked) QuaternionMatrix(vec_t *quaternion, float matrix[3][4])
|
||||
{
|
||||
UNTESTED
|
||||
|
||||
__asm
|
||||
{
|
||||
jmp pQuaternionMatrix
|
||||
}
|
||||
|
||||
//matrix[0][0] = 1.0 - 2.0 * quaternion[1] * quaternion[1] - 2.0 * quaternion[2] * quaternion[2];
|
||||
//matrix[1][1] = 2.0 * quaternion[2] * quaternion[3] + quaternion[0] * quaternion[1];
|
||||
//matrix[2][2] = 2.0 * quaternion[2] * quaternion[0] - 2.0 * quaternion[3] * quaternion[1];
|
||||
//matrix[0][1] = 2.0 * quaternion[0] * quaternion[1] - 2.0 * quaternion[2] * quaternion[3];
|
||||
//matrix[1][2] = 1.0 - 2.0 * quaternion[0] * quaternion[0] - 2.0 * quaternion[2] * quaternion[2];
|
||||
//matrix[3][0] = 2.0 * quaternion[2] * quaternion[1] + quaternion[0] * quaternion[3];
|
||||
//matrix[0][2] = 2.0 * quaternion[2] * quaternion[0] + quaternion[3] * quaternion[1];
|
||||
//matrix[2][0] = 2.0 * quaternion[2] * quaternion[1] - 2.0 * quaternion[0] * quaternion[3];
|
||||
}
|
||||
|
||||
/* <15d12> ../cstrike/dlls/animation.cpp:715 */
|
||||
NOBODY mstudioanim_t *StudioGetAnim(model_t *m_pSubModel, mstudioseqdesc_t *pseqdesc)
|
||||
mstudioanim_t *StudioGetAnim(model_t *m_pSubModel, mstudioseqdesc_t *pseqdesc)
|
||||
{
|
||||
// {
|
||||
// mstudioseqgroup_t *pseqgroup; // 717
|
||||
// cache_user_t *paSequences; // 718
|
||||
// }
|
||||
mstudioseqgroup_t *pseqgroup;
|
||||
cache_user_t *paSequences;
|
||||
|
||||
pseqgroup = (mstudioseqgroup_t *)((byte *)g_pstudiohdr + g_pstudiohdr->seqgroupindex) + pseqdesc->seqgroup;
|
||||
|
||||
if (pseqdesc->seqgroup == 0)
|
||||
{
|
||||
return (mstudioanim_t *)((byte *)g_pstudiohdr + pseqdesc->animindex);
|
||||
}
|
||||
|
||||
paSequences = (cache_user_t *)m_pSubModel->submodels;
|
||||
|
||||
if (paSequences == NULL)
|
||||
{
|
||||
paSequences = (cache_user_t *)IEngineStudio.Mem_Calloc(16, sizeof(cache_user_t)); // UNDONE: leak!
|
||||
m_pSubModel->submodels = (dmodel_t *)paSequences;
|
||||
}
|
||||
|
||||
if (!IEngineStudio.Cache_Check((struct cache_user_s *)&(paSequences[ pseqdesc->seqgroup ])))
|
||||
{
|
||||
IEngineStudio.LoadCacheFile(pseqgroup->name, (struct cache_user_s *)&paSequences[ pseqdesc->seqgroup ]);
|
||||
}
|
||||
|
||||
return (mstudioanim_t *)((byte *)paSequences[ pseqdesc->seqgroup ].data + pseqdesc->animindex);
|
||||
}
|
||||
|
||||
/* <15d90> ../cstrike/dlls/animation.cpp:749 */
|
||||
NOBODY mstudioanim_t *LookupAnimation(studiohdr_t *pstudiohdr, model_s *model, mstudioseqdesc_t *pseqdesc, int index)
|
||||
NOXREF mstudioanim_t *LookupAnimation(studiohdr_t *pstudiohdr, model_s *model, mstudioseqdesc_t *pseqdesc, int index)
|
||||
{
|
||||
// {
|
||||
// mstudioanim_t *panim; // 751
|
||||
// }
|
||||
mstudioanim_t *panim = StudioGetAnim(model, pseqdesc);
|
||||
if (pseqdesc->numblends > index)
|
||||
return &panim[index * pstudiohdr->numbones];
|
||||
//panim += index * pstudiohdr->numbones;
|
||||
|
||||
return panim;
|
||||
|
||||
//if (index >= 0 && index <= (pseqdesc->numblends - 1))
|
||||
// panim += index * pstudiohdr->numbones;
|
||||
|
||||
}
|
||||
|
||||
/* <151a9> ../cstrike/dlls/animation.cpp:770 */
|
||||
NOBODY void StudioCalcBoneAdj(float dadt, float *adj, const byte *pcontroller1, const byte *pcontroller2, byte mouthopen)
|
||||
void StudioCalcBoneAdj(float dadt, float *adj, const byte *pcontroller1, const byte *pcontroller2, byte mouthopen)
|
||||
{
|
||||
// {
|
||||
// int i; // 772
|
||||
// int j; // 772
|
||||
// float value; // 773
|
||||
// mstudiobonecontroller_t *pbonecontroller; // 774
|
||||
// {
|
||||
// int a; // 788
|
||||
// int b; // 788
|
||||
// }
|
||||
// }
|
||||
int i, j;
|
||||
float value;
|
||||
mstudiobonecontroller_t *pbonecontroller;
|
||||
|
||||
pbonecontroller = (mstudiobonecontroller_t *)((byte *)g_pstudiohdr + g_pstudiohdr->bonecontrollerindex);
|
||||
|
||||
for (j = 0; j < g_pstudiohdr->numbonecontrollers; j++)
|
||||
{
|
||||
i = pbonecontroller[j].index;
|
||||
if (i <= 3)
|
||||
{
|
||||
// check for 360% wrapping
|
||||
if (pbonecontroller[j].type & STUDIO_RLOOP)
|
||||
{
|
||||
if (abs(pcontroller1[i] - pcontroller2[i]) > 128)
|
||||
{
|
||||
int a, b;
|
||||
a = (pcontroller1[j] + 128) % 256;
|
||||
b = (pcontroller2[j] + 128) % 256;
|
||||
value = ((a * dadt) + (b * (1 - dadt)) - 128) * (360.0/256.0) + pbonecontroller[j].start;
|
||||
}
|
||||
else
|
||||
{
|
||||
value = ((pcontroller1[i] * dadt + (pcontroller2[i]) * (1.0 - dadt))) * (360.0/256.0) + pbonecontroller[j].start;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
value = (pcontroller1[i] * dadt + pcontroller2[i] * (1.0 - dadt)) / 255.0;
|
||||
|
||||
if (value < 0)
|
||||
value = 0;
|
||||
|
||||
if (value > 1.0)
|
||||
value = 1.0;
|
||||
|
||||
value = (1.0 - value) * pbonecontroller[j].start + value * pbonecontroller[j].end;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
value = mouthopen / 64.0;
|
||||
|
||||
if (value > 1.0)
|
||||
value = 1.0;
|
||||
|
||||
value = (1.0 - value) * pbonecontroller[j].start + value * pbonecontroller[j].end;
|
||||
}
|
||||
switch(pbonecontroller[j].type & STUDIO_TYPES)
|
||||
{
|
||||
case STUDIO_XR:
|
||||
case STUDIO_YR:
|
||||
case STUDIO_ZR:
|
||||
adj[j] = value * (M_PI / 180.0);
|
||||
break;
|
||||
case STUDIO_X:
|
||||
case STUDIO_Y:
|
||||
case STUDIO_Z:
|
||||
adj[j] = value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* <15ea6> ../cstrike/dlls/animation.cpp:828 */
|
||||
NOBODY void StudioCalcBoneQuaterion(int frame, float s, mstudiobone_t *pbone, mstudioanim_t *panim, float *adj, float *q)
|
||||
void StudioCalcBoneQuaterion(int frame, float s, mstudiobone_t *pbone, mstudioanim_t *panim, float *adj, float *q)
|
||||
{
|
||||
// {
|
||||
// int j; // 830
|
||||
// int k; // 830
|
||||
// vec4_t q1; // 831
|
||||
// vec4_t q2; // 831
|
||||
// vec3_t angle1; // 832
|
||||
// vec3_t angle2; // 832
|
||||
// mstudioanimvalue_t *panimvalue; // 833
|
||||
// }
|
||||
int j, k;
|
||||
vec4_t q1, q2;
|
||||
vec3_t angle1, angle2;
|
||||
mstudioanimvalue_t *panimvalue;
|
||||
|
||||
for (j = 0; j < 3; j++)
|
||||
{
|
||||
if (panim->offset[j + 3] == 0)
|
||||
{
|
||||
// default;
|
||||
angle2[j] = angle1[j] = pbone->value[j + 3];
|
||||
}
|
||||
else
|
||||
{
|
||||
panimvalue = (mstudioanimvalue_t *)((byte *)panim + panim->offset[j + 3]);
|
||||
k = frame;
|
||||
|
||||
if (panimvalue->num.total < panimvalue->num.valid)
|
||||
k = 0;
|
||||
|
||||
while (panimvalue->num.total <= k)
|
||||
{
|
||||
k -= panimvalue->num.total;
|
||||
panimvalue += panimvalue->num.valid + 1;
|
||||
|
||||
if (panimvalue->num.total < panimvalue->num.valid)
|
||||
k = 0;
|
||||
}
|
||||
|
||||
// Bah, missing blend!
|
||||
if (panimvalue->num.valid > k)
|
||||
{
|
||||
angle1[j] = panimvalue[k + 1].value;
|
||||
|
||||
if (panimvalue->num.valid > k + 1)
|
||||
{
|
||||
angle2[j] = panimvalue[k + 2].value;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (panimvalue->num.total > k + 1)
|
||||
angle2[j] = angle1[j];
|
||||
else
|
||||
angle2[j] = panimvalue[panimvalue->num.valid + 2].value;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
angle1[j] = panimvalue[panimvalue->num.valid].value;
|
||||
if (panimvalue->num.total > k + 1)
|
||||
{
|
||||
angle2[j] = angle1[j];
|
||||
}
|
||||
else
|
||||
{
|
||||
angle2[j] = panimvalue[panimvalue->num.valid + 2].value;
|
||||
}
|
||||
}
|
||||
angle1[j] = pbone->value[j + 3] + angle1[j] * pbone->scale[j + 3];
|
||||
angle2[j] = pbone->value[j + 3] + angle2[j] * pbone->scale[j + 3];
|
||||
}
|
||||
|
||||
if (pbone->bonecontroller[j + 3] != -1)
|
||||
{
|
||||
angle1[j] += adj[pbone->bonecontroller[j + 3]];
|
||||
angle2[j] += adj[pbone->bonecontroller[j + 3]];
|
||||
}
|
||||
}
|
||||
|
||||
if (!VectorCompare(angle1, angle2))
|
||||
{
|
||||
AngleQuaternion(angle1, q1);
|
||||
AngleQuaternion(angle2, q2);
|
||||
QuaternionSlerp(q1, q2, s, q);
|
||||
}
|
||||
else
|
||||
AngleQuaternion(angle1, q);
|
||||
}
|
||||
|
||||
/* <15f94> ../cstrike/dlls/animation.cpp:908 */
|
||||
NOBODY void StudioCalcBonePosition(int frame, float s, mstudiobone_t *pbone, mstudioanim_t *panim, float *adj, float *pos)
|
||||
void StudioCalcBonePosition(int frame, float s, mstudiobone_t *pbone, mstudioanim_t *panim, float *adj, float *pos)
|
||||
{
|
||||
// {
|
||||
// int j; // 910
|
||||
// int k; // 910
|
||||
// mstudioanimvalue_t *panimvalue; // 911
|
||||
// }
|
||||
int j, k;
|
||||
mstudioanimvalue_t *panimvalue;
|
||||
|
||||
for (j = 0; j < 3; j++)
|
||||
{
|
||||
// default;
|
||||
pos[j] = pbone->value[j];
|
||||
if (panim->offset[j] != 0)
|
||||
{
|
||||
panimvalue = (mstudioanimvalue_t *)((byte *)panim + panim->offset[j]);
|
||||
|
||||
k = frame;
|
||||
|
||||
if (panimvalue->num.total < panimvalue->num.valid)
|
||||
k = 0;
|
||||
|
||||
// find span of values that includes the frame we want
|
||||
while (panimvalue->num.total <= k)
|
||||
{
|
||||
k -= panimvalue->num.total;
|
||||
panimvalue += panimvalue->num.valid + 1;
|
||||
|
||||
if (panimvalue->num.total < panimvalue->num.valid)
|
||||
k = 0;
|
||||
}
|
||||
// if we're inside the span
|
||||
if (panimvalue->num.valid > k)
|
||||
{
|
||||
// and there's more data in the span
|
||||
if (panimvalue->num.valid > k + 1)
|
||||
pos[j] += (panimvalue[k + 1].value * (1.0 - s) + s * panimvalue[k + 2].value) * pbone->scale[j];
|
||||
else
|
||||
pos[j] += panimvalue[k + 1].value * pbone->scale[j];
|
||||
}
|
||||
else
|
||||
{
|
||||
// are we at the end of the repeating values section and there's another section with data?
|
||||
if (panimvalue->num.total <= k + 1)
|
||||
pos[j] += (panimvalue[panimvalue->num.valid].value * (1.0 - s) + s * panimvalue[panimvalue->num.valid + 2].value) * pbone->scale[j];
|
||||
|
||||
else
|
||||
pos[j] += panimvalue[panimvalue->num.valid].value * pbone->scale[j];
|
||||
}
|
||||
}
|
||||
if (pbone->bonecontroller[j] != -1 && adj)
|
||||
{
|
||||
pos[j] += adj[pbone->bonecontroller[j]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* <1603c> ../cstrike/dlls/animation.cpp:970 */
|
||||
NOBODY void StudioSlerpBones(vec4_t *q1, vec3_t *pos1, vec4_t *q2, vec3_t *pos2, float s)
|
||||
void StudioSlerpBones(vec4_t *q1, float pos1[][3], vec4_t *q2, float pos2[][3], float s)
|
||||
{
|
||||
// {
|
||||
// int i; // 972
|
||||
// vec4_t q3; // 973
|
||||
// float s1; // 974
|
||||
// }
|
||||
int i;
|
||||
vec4_t q3;
|
||||
float s1;
|
||||
|
||||
if (s < 0)
|
||||
s = 0;
|
||||
|
||||
else if (s > 1.0)
|
||||
s = 1.0;
|
||||
|
||||
s1 = 1.0 - s;
|
||||
|
||||
for (i = 0; i < g_pstudiohdr->numbones; i++)
|
||||
{
|
||||
QuaternionSlerp(q1[i], q2[i], s, q3);
|
||||
|
||||
q1[i][0] = q3[0];
|
||||
q1[i][1] = q3[1];
|
||||
q1[i][2] = q3[2];
|
||||
q1[i][3] = q3[3];
|
||||
|
||||
pos1[i][0] = pos1[i][0] * s1 + pos2[i][0] * s;
|
||||
pos1[i][1] = pos1[i][1] * s1 + pos2[i][1] * s;
|
||||
pos1[i][2] = pos1[i][2] * s1 + pos2[i][2] * s;
|
||||
}
|
||||
}
|
||||
|
||||
/* <160de> ../cstrike/dlls/animation.cpp:994 */
|
||||
NOBODY void StudioCalcRotations(mstudiobone_t *pbones, int *chain, int chainlength, float *adj, float *pos, vec4_t *q, mstudioseqdesc_t *pseqdesc, mstudioanim_t *panim, float f, float s)
|
||||
NOXREF void StudioCalcRotations(mstudiobone_t *pbones, int *chain, int chainlength, float *adj, float pos[128][3], vec4_t *q, mstudioseqdesc_t *pseqdesc, mstudioanim_t *panim, float f, float s)
|
||||
{
|
||||
// {
|
||||
// int i; // 996
|
||||
// int j; // 996
|
||||
// }
|
||||
int i;
|
||||
int j;
|
||||
|
||||
for (i = chainlength - 1; i >= 0; i--)
|
||||
{
|
||||
j = chain[i];
|
||||
|
||||
StudioCalcBoneQuaterion((int)f, s, &pbones[ j ], &panim[ j ], adj, &(*q)[j]);
|
||||
StudioCalcBonePosition((int)f, s, &pbones[ j ], &panim[ j ], adj, pos[j]);
|
||||
}
|
||||
}
|
||||
|
||||
/* <161fd> ../cstrike/dlls/animation.cpp:1006 */
|
||||
NOBODY void ConcatTransforms(float *in1, float *in2, float *out)
|
||||
void ConcatTransforms(float in1[3][4], float in2[3][4], float out[3][4])
|
||||
{
|
||||
out[0][0] = in1[0][0] * in2[0][0] + in1[0][1] * in2[1][0] + in1[0][2] * in2[2][0];
|
||||
out[0][1] = in1[0][0] * in2[0][1] + in1[0][1] * in2[1][1] + in1[0][2] * in2[2][1];
|
||||
out[0][2] = in1[0][0] * in2[0][2] + in1[0][1] * in2[1][2] + in1[0][2] * in2[2][2];
|
||||
out[0][3] = in1[0][0] * in2[0][3] + in1[0][1] * in2[1][3] + in1[0][2] * in2[2][3] + in1[0][3];
|
||||
|
||||
out[1][0] = in1[1][0] * in2[0][0] + in1[1][1] * in2[1][0] + in1[1][2] * in2[2][0];
|
||||
out[1][1] = in1[1][0] * in2[0][1] + in1[1][1] * in2[1][1] + in1[1][2] * in2[2][1];
|
||||
out[1][2] = in1[1][0] * in2[0][2] + in1[1][1] * in2[1][2] + in1[1][2] * in2[2][2];
|
||||
out[1][3] = in1[1][0] * in2[0][3] + in1[1][1] * in2[1][3] + in1[1][2] * in2[2][3] + in1[1][3];
|
||||
|
||||
out[2][0] = in1[2][0] * in2[0][0] + in1[2][1] * in2[1][0] + in1[2][2] * in2[2][0];
|
||||
out[2][1] = in1[2][0] * in2[0][1] + in1[2][1] * in2[1][1] + in1[2][2] * in2[2][1];
|
||||
out[2][2] = in1[2][0] * in2[0][2] + in1[2][1] * in2[1][2] + in1[2][2] * in2[2][2];
|
||||
out[2][3] = in1[2][0] * in2[0][3] + in1[2][1] * in2[1][3] + in1[2][2] * in2[2][3] + in1[2][3];
|
||||
}
|
||||
|
||||
/* <16247> ../cstrike/dlls/animation.cpp:1115 */
|
||||
NOBODY void SV_StudioSetupBones(model_s *pModel, float frame, int sequence, const vec_t *angles, const vec_t *origin, const byte *pcontroller, const byte *pblending, int iBone, const edict_t *pEdict)
|
||||
NOBODY void SV_StudioSetupBones(struct model_s *pModel, float frame, int sequence, const vec_t *angles, const vec_t *origin, const byte *pcontroller, const byte *pblending, int iBone, const edict_t *pEdict)
|
||||
{
|
||||
// {
|
||||
// int i; // 1117
|
||||
@ -456,7 +810,7 @@ NOBODY void SV_StudioSetupBones(model_s *pModel, float frame, int sequence, cons
|
||||
// float pos; // 1124
|
||||
// float bonematrix; // 1125
|
||||
// float q; // 1126
|
||||
// float pos2; // 1127
|
||||
// float pos3; // 1127
|
||||
// float q2; // 1128
|
||||
// int chain; // 1130
|
||||
// int chainlength; // 1131
|
||||
|
@ -50,19 +50,48 @@ float SetController(void *pmodel, entvars_t *pev, int iController, float flValue
|
||||
NOBODY float SetBlending(void *pmodel, entvars_t *pev, int iBlender, float flValue);
|
||||
NOBODY int FindTransition(void *pmodel, int iEndingAnim, int iGoalAnim, int *piDir);
|
||||
NOBODY void SetBodygroup(void *pmodel, entvars_t *pev, int iGroup, int iValue);
|
||||
NOBODY int GetBodygroup(void *pmodel, entvars_t *pev, int iGroup);
|
||||
NOBODY int Server_GetBlendingInterface(int version, sv_blending_interface_s ** ppinterface, engine_studio_api_s *pstudio, float *rotationmatrix, float *bonetransform);
|
||||
int GetBodygroup(void *pmodel, entvars_t *pev, int iGroup);
|
||||
C_DLLEXPORT int Server_GetBlendingInterface(int version, struct sv_blending_interface_s **ppinterface, struct engine_studio_api_s *pstudio, float *rotationmatrix, float *bonetransform);
|
||||
void AngleQuaternion(vec_t *angles, vec_t *quaternion);
|
||||
NOBODY void QuaternionSlerp(vec_t *p, vec_t *q, float t, vec_t *qt);
|
||||
NOBODY void QuaternionMatrix(vec_t *quaternion, float *matrix);
|
||||
NOBODY mstudioanim_t *StudioGetAnim(model_t *m_pSubModel, mstudioseqdesc_t *pseqdesc);
|
||||
NOBODY mstudioanim_t *LookupAnimation(studiohdr_t *pstudiohdr, model_s *model, mstudioseqdesc_t *pseqdesc, int index);
|
||||
NOBODY void StudioCalcBoneAdj(float dadt, float *adj, const byte *pcontroller1, const byte *pcontroller2, byte mouthopen);
|
||||
NOBODY void StudioCalcBoneQuaterion(int frame, float s, mstudiobone_t *pbone, mstudioanim_t *panim, float *adj, float *q);
|
||||
NOBODY void StudioCalcBonePosition(int frame, float s, mstudiobone_t *pbone, mstudioanim_t *panim, float *adj, float *pos);
|
||||
NOBODY void StudioSlerpBones(vec4_t *q1, vec3_t *pos1, vec4_t *q2, vec3_t *pos2, float s);
|
||||
NOBODY void StudioCalcRotations(mstudiobone_t *pbones, int *chain, int chainlength, float *adj, float *pos, vec4_t *q, mstudioseqdesc_t *pseqdesc, mstudioanim_t *panim, float f, float s);
|
||||
NOBODY void ConcatTransforms(float *in1, float *in2, float *out);
|
||||
NOBODY void SV_StudioSetupBones(model_s *pModel, float frame, int sequence, const vec_t *angles, const vec_t *origin, const byte *pcontroller, const byte *pblending, int iBone, const edict_t *pEdict);
|
||||
void QuaternionSlerp(vec_t *p, vec_t *q, float t, vec_t *qt);
|
||||
NOBODY void QuaternionMatrix(vec_t *quaternion, float matrix[3][4]);
|
||||
mstudioanim_t *StudioGetAnim(model_t *m_pSubModel, mstudioseqdesc_t *pseqdesc);
|
||||
NOXREF mstudioanim_t *LookupAnimation(studiohdr_t *pstudiohdr, model_s *model, mstudioseqdesc_t *pseqdesc, int index);
|
||||
void StudioCalcBoneAdj(float dadt, float *adj, const byte *pcontroller1, const byte *pcontroller2, byte mouthopen);
|
||||
void StudioCalcBoneQuaterion(int frame, float s, mstudiobone_t *pbone, mstudioanim_t *panim, float *adj, float *q);
|
||||
void StudioCalcBonePosition(int frame, float s, mstudiobone_t *pbone, mstudioanim_t *panim, float *adj, float *pos);
|
||||
void StudioSlerpBones(vec4_t *q1, float pos1[][3], vec4_t *q2, float pos2[][3], float s);
|
||||
NOXREF void StudioCalcRotations(mstudiobone_t *pbones, int *chain, int chainlength, float *adj, float pos[128][3], vec4_t *q, mstudioseqdesc_t *pseqdesc, mstudioanim_t *panim, float f, float s);
|
||||
void ConcatTransforms(float in1[3][4], float in2[3][4], float out[3][4]);
|
||||
NOBODY void SV_StudioSetupBones(struct model_s *pModel, float frame, int sequence, const vec_t *angles, const vec_t *origin, const byte *pcontroller, const byte *pblending, int iBone, const edict_t *pEdict);
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
#define svBlending (*psvBlending)
|
||||
#define IEngineStudio (*pIEngineStudio)
|
||||
#define g_pstudiohdr (*pg_pstudiohdr)
|
||||
#define g_pRotationMatrix (*pg_pRotationMatrix)
|
||||
#define g_pBoneTransform (*pg_pBoneTransform)
|
||||
#define omega (*pomega)
|
||||
#define cosom (*pcosom)
|
||||
#define sinom (*psinom)
|
||||
#define sclp (*psclp)
|
||||
#define sclq (*psclq)
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
extern struct sv_blending_interface_s svBlending;
|
||||
extern server_studio_api_t IEngineStudio;
|
||||
extern studiohdr_t *g_pstudiohdr;
|
||||
extern float (*g_pRotationMatrix)[3][4];
|
||||
extern float (*g_pBoneTransform)[128][3][4];
|
||||
extern float omega;
|
||||
extern float cosom;
|
||||
extern float sinom;
|
||||
extern float sclp;
|
||||
extern float sclq;
|
||||
|
||||
// refs
|
||||
extern void (*pQuaternionMatrix)(vec_t *quaternion, float matrix[3][4]);
|
||||
|
||||
#endif // ANIMATION_H
|
||||
|
@ -115,7 +115,7 @@ public:
|
||||
}
|
||||
BOOL HasConditions(int iConditions)
|
||||
{
|
||||
if(m_afConditions & iConditions)
|
||||
if (m_afConditions & iConditions)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@ -123,7 +123,7 @@ public:
|
||||
}
|
||||
BOOL HasAllConditions(int iConditions)
|
||||
{
|
||||
if((m_afConditions & iConditions) == iConditions)
|
||||
if ((m_afConditions & iConditions) == iConditions)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@ -139,7 +139,7 @@ public:
|
||||
}
|
||||
BOOL HasMemory(int iMemory)
|
||||
{
|
||||
if(m_afMemory & iMemory)
|
||||
if (m_afMemory & iMemory)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@ -147,7 +147,7 @@ public:
|
||||
}
|
||||
BOOL HasAllMemories(int iMemory)
|
||||
{
|
||||
if((m_afMemory & iMemory) == iMemory)
|
||||
if ((m_afMemory & iMemory) == iMemory)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -6,10 +6,12 @@
|
||||
#ifndef HOOK_GAMEDLL
|
||||
|
||||
BotPhraseManager *TheBotPhrases = NULL;
|
||||
CBaseEntity *g_pSelectedZombieSpawn = NULL;
|
||||
|
||||
#else // HOOK_GAMEDLL
|
||||
|
||||
BotPhraseManager *TheBotPhrases;
|
||||
CBaseEntity *g_pSelectedZombieSpawn;
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
|
@ -346,7 +346,7 @@ public:
|
||||
/* <2fea95> ../cstrike/dlls/bot/cs_bot_chatter.h:298 */
|
||||
inline int BotPhraseManager::FindPlaceIndex(Place where) const
|
||||
{
|
||||
for(int i = 0; i < m_placeCount; i++)
|
||||
for (int i = 0; i < m_placeCount; i++)
|
||||
{
|
||||
if (m_placeStatementHistory[i].placeID == where)
|
||||
return i;
|
||||
@ -650,10 +650,12 @@ inline BotStatement *BotChatterInterface::GetStatement(void) const
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
#define TheBotPhrases (*pTheBotPhrases)
|
||||
#define g_pSelectedZombieSpawn (*pg_pSelectedZombieSpawn)
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
extern BotPhraseManager *TheBotPhrases;
|
||||
extern CBaseEntity *g_pSelectedZombieSpawn;
|
||||
|
||||
/* <5c4dcf> ../cstrike/dlls/bot/cs_bot_chatter.h:604 */
|
||||
inline void BotChatterInterface::Say(const char *phraseName, float lifetime, float delay)
|
||||
|
@ -225,7 +225,7 @@ public:
|
||||
if (startArea == NULL)
|
||||
return NULL;
|
||||
|
||||
for(int i = 0; i < m_zoneCount; i++)
|
||||
for (int i = 0; i < m_zoneCount; i++)
|
||||
{
|
||||
if (m_zone[i].m_areaCount == 0)
|
||||
continue;
|
||||
|
@ -580,7 +580,7 @@ NOBODY void SaveReadFields(SAVERESTOREDATA *pSaveData, const char *pname, void *
|
||||
/* <31a74> ../cstrike/dlls/cbase.cpp:802 */
|
||||
edict_t *EHANDLE::Get(void)
|
||||
{
|
||||
if(!m_pent || m_pent->serialnumber != m_serialnumber)
|
||||
if (!m_pent || m_pent->serialnumber != m_serialnumber)
|
||||
return NULL;
|
||||
|
||||
return m_pent;
|
||||
@ -590,7 +590,7 @@ edict_t *EHANDLE::Get(void)
|
||||
edict_t *EHANDLE::Set(edict_t *pent)
|
||||
{
|
||||
m_pent = pent;
|
||||
if(pent)
|
||||
if (pent)
|
||||
m_serialnumber = pent->serialnumber;
|
||||
|
||||
return pent;
|
||||
@ -605,7 +605,7 @@ EHANDLE::operator CBaseEntity *(void)
|
||||
/* <31b30> ../cstrike/dlls/cbase.cpp:829 */
|
||||
CBaseEntity *EHANDLE::operator=(CBaseEntity *pEntity)
|
||||
{
|
||||
if(pEntity)
|
||||
if (pEntity)
|
||||
{
|
||||
m_pent = ENT(pEntity->pev);
|
||||
if (m_pent)
|
||||
|
@ -442,22 +442,22 @@ public:
|
||||
NOBODY virtual CBaseEntity *GetNextTarget(void);
|
||||
virtual void Think(void)
|
||||
{
|
||||
if(m_pfnThink)
|
||||
if (m_pfnThink)
|
||||
(this->*m_pfnThink)();
|
||||
}
|
||||
virtual void Touch(CBaseEntity *pOther)
|
||||
{
|
||||
if(m_pfnTouch)
|
||||
if (m_pfnTouch)
|
||||
(this->*m_pfnTouch)(pOther);
|
||||
}
|
||||
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType = USE_OFF, float value = 0.0f)
|
||||
{
|
||||
if(m_pfnUse)
|
||||
if (m_pfnUse)
|
||||
(this->*m_pfnUse)(pActivator, pCaller, useType, value);
|
||||
}
|
||||
virtual void Blocked(CBaseEntity *pOther)
|
||||
{
|
||||
if(m_pfnBlocked)
|
||||
if (m_pfnBlocked)
|
||||
(this->*m_pfnBlocked)(pOther);
|
||||
}
|
||||
virtual CBaseEntity *Respawn(void)
|
||||
@ -544,14 +544,14 @@ public:
|
||||
CBaseMonster *GetMonsterPointer(entvars_t *pevMonster)
|
||||
{
|
||||
CBaseEntity *pEntity = Instance(pevMonster);
|
||||
if(pEntity)
|
||||
if (pEntity)
|
||||
return pEntity->MyMonsterPointer();
|
||||
return NULL;
|
||||
}
|
||||
CBaseMonster *GetMonsterPointer(edict_t *pentMonster)
|
||||
{
|
||||
CBaseEntity *pEntity = Instance(pentMonster);
|
||||
if(pEntity)
|
||||
if (pEntity)
|
||||
return pEntity->MyMonsterPointer();
|
||||
return NULL;
|
||||
}
|
||||
@ -786,8 +786,8 @@ class CBaseToggle: public CBaseAnimating
|
||||
{
|
||||
public:
|
||||
virtual void KeyValue(KeyValueData *pkvd);
|
||||
NOBODY virtual int Save(CSave &save);
|
||||
NOBODY virtual int Restore(CRestore &restore);
|
||||
virtual int Save(CSave &save);
|
||||
virtual int Restore(CRestore &restore);
|
||||
virtual int GetToggleState(void)
|
||||
{
|
||||
return m_toggle_state;
|
||||
@ -873,7 +873,7 @@ public:
|
||||
int Restore_(CRestore &restore);
|
||||
int ObjectCaps_(void)
|
||||
{
|
||||
if(pev->takedamage == DAMAGE_NO)
|
||||
if (pev->takedamage == DAMAGE_NO)
|
||||
return FCAP_IMPULSE_USE;
|
||||
|
||||
return (CBaseToggle::ObjectCaps() & ~FCAP_ACROSS_TRANSITION);
|
||||
@ -1046,10 +1046,10 @@ public:
|
||||
template <class T> T *GetClassPtr(T *a)
|
||||
{
|
||||
entvars_t *pev = (entvars_t *)a;
|
||||
if(!pev)
|
||||
if (!pev)
|
||||
pev = VARS(CREATE_ENTITY());
|
||||
a = (T *)GET_PRIVATE(ENT(pev));
|
||||
if(!a)
|
||||
if (!a)
|
||||
{
|
||||
a = new(pev) T;
|
||||
a->pev = pev;
|
||||
|
@ -235,11 +235,14 @@ NOBODY TeamName SelectDefaultTeam(void)
|
||||
}
|
||||
|
||||
/* <473a3> ../cstrike/dlls/client.cpp:638 */
|
||||
NOBODY void CheckStartMoney(void)
|
||||
void CheckStartMoney(void)
|
||||
{
|
||||
// {
|
||||
// int money; // 640
|
||||
// }
|
||||
int money = (int)startmoney.value;
|
||||
|
||||
if (money > 16000)
|
||||
CVAR_SET_FLOAT("mp_startmoney", 16000);
|
||||
else if (money < 800)
|
||||
CVAR_SET_FLOAT("mp_startmoney", 800);
|
||||
}
|
||||
|
||||
/* <4c084> ../cstrike/dlls/client.cpp:661 */
|
||||
|
@ -125,7 +125,7 @@ NOBODY void ListPlayers(CBasePlayer *current);
|
||||
NOBODY int CountTeamPlayers(int iTeam);
|
||||
NOBODY void ProcessKickVote(CBasePlayer *pVotingPlayer, CBasePlayer *pKickPlayer);
|
||||
NOBODY TeamName SelectDefaultTeam(void);
|
||||
NOBODY void CheckStartMoney(void);
|
||||
void CheckStartMoney(void);
|
||||
NOBODY void ClientPutInServer(edict_t *pEntity);
|
||||
NOBODY int Q_strlen_(const char *str);
|
||||
NOBODY void Host_Say(edict_t *pEntity, int teamonly);
|
||||
|
@ -266,8 +266,8 @@ public:
|
||||
virtual BOOL FShouldSwitchWeapon(CBasePlayer *pPlayer, CBasePlayerItem *pWeapon);
|
||||
virtual BOOL GetNextBestWeapon(CBasePlayer *pPlayer, CBasePlayerItem *pCurrentWeapon);
|
||||
virtual BOOL IsMultiplayer(void);
|
||||
NOBODY virtual BOOL IsDeathmatch(void);
|
||||
NOBODY virtual BOOL IsCoOp(void);
|
||||
virtual BOOL IsDeathmatch(void);
|
||||
virtual BOOL IsCoOp(void);
|
||||
NOBODY virtual BOOL ClientConnected(edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[128]);
|
||||
NOBODY virtual void InitHUD(CBasePlayer *pl);
|
||||
NOBODY virtual void ClientDisconnected(edict_t *pClient);
|
||||
|
@ -48,6 +48,6 @@
|
||||
extern enginefuncs_t g_engfuncs;
|
||||
extern globalvars_t *gpGlobals;
|
||||
|
||||
extern "C" C_DLLEXPORT void WINAPI GiveFnptrsToDll(enginefuncs_t *pEnginefuncsTable,globalvars_t *pGlobals);
|
||||
C_DLLEXPORT void WINAPI GiveFnptrsToDll(enginefuncs_t *pEnginefuncsTable,globalvars_t *pGlobals);
|
||||
|
||||
#endif // H_EXPORT_H
|
||||
|
@ -154,7 +154,7 @@ public:
|
||||
Schedule_t *derivedClass::ScheduleFromName(const char *pName)\
|
||||
{\
|
||||
Schedule_t *pSchedule = ScheduleInList(pName, m_scheduleList, ARRAYSIZE(m_scheduleList));\
|
||||
if(!pSchedule)\
|
||||
if (!pSchedule)\
|
||||
return baseClass::ScheduleFromName(pName);\
|
||||
return pSchedule;\
|
||||
}
|
||||
|
@ -887,14 +887,15 @@ BOOL CHalfLifeMultiplay::IsMultiplayer_(void)
|
||||
}
|
||||
|
||||
/* <1128f3> ../cstrike/dlls/multiplay_gamerules.cpp:3024 */
|
||||
NOBODY BOOL CHalfLifeMultiplay::IsDeathmatch_(void)
|
||||
BOOL CHalfLifeMultiplay::IsDeathmatch_(void)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* <11291b> ../cstrike/dlls/multiplay_gamerules.cpp:3031 */
|
||||
NOBODY BOOL CHalfLifeMultiplay::IsCoOp_(void)
|
||||
BOOL CHalfLifeMultiplay::IsCoOp_(void)
|
||||
{
|
||||
return TRUE;
|
||||
return gpGlobals->coop;
|
||||
}
|
||||
|
||||
/* <113fcf> ../cstrike/dlls/multiplay_gamerules.cpp:3038 */
|
||||
|
@ -32,9 +32,9 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#define bits_NODE_LAND ( 1 << 0 ) // Land node, so nudge if necessary.
|
||||
#define bits_NODE_AIR ( 1 << 1 ) // Air node, don't nudge.
|
||||
#define bits_NODE_WATER ( 1 << 2 ) // Water node, don't nudge.
|
||||
#define bits_NODE_LAND (1 << 0) // Land node, so nudge if necessary.
|
||||
#define bits_NODE_AIR (1 << 1) // Air node, don't nudge.
|
||||
#define bits_NODE_WATER (1 << 2) // Water node, don't nudge.
|
||||
#define bits_NODE_GROUP_REALM (bits_NODE_LAND | bits_NODE_AIR | bits_NODE_WATER)
|
||||
|
||||
class CBaseEntity;
|
||||
|
@ -237,14 +237,14 @@ void CBasePlayer::Observer_HandleButtons(void)
|
||||
// Attack moves to the next player
|
||||
if (m_afButtonPressed & IN_ATTACK)
|
||||
{
|
||||
Observer_FindNextPlayer( false );
|
||||
Observer_FindNextPlayer(false);
|
||||
m_flNextObserverInput = gpGlobals->time + 0.2f;
|
||||
}
|
||||
|
||||
// Attack2 moves to the prev player
|
||||
if (m_afButtonPressed & IN_ATTACK2)
|
||||
{
|
||||
Observer_FindNextPlayer( true );
|
||||
Observer_FindNextPlayer(true);
|
||||
m_flNextObserverInput = gpGlobals->time + 0.2f;
|
||||
}
|
||||
}
|
||||
@ -475,7 +475,7 @@ void CBasePlayer::Observer_SetMode(int iMode)
|
||||
// if we are not roaming, we need a valid target to track
|
||||
if (iMode != OBS_ROAMING && m_hObserverTarget == NULL)
|
||||
{
|
||||
Observer_FindNextPlayer(false); // TODO: Reverse me
|
||||
Observer_FindNextPlayer(false);
|
||||
|
||||
// if we didn't find a valid target switch to roaming
|
||||
if (m_hObserverTarget == NULL)
|
||||
@ -501,7 +501,7 @@ void CBasePlayer::Observer_SetMode(int iMode)
|
||||
WRITE_BYTE((iMode == OBS_ROAMING) != 0);
|
||||
MESSAGE_END();
|
||||
|
||||
UpdateClientEffects(this, oldMode); // TODO: Reverse me
|
||||
UpdateClientEffects(this, oldMode);
|
||||
|
||||
// print spepctaor mode on client screen
|
||||
|
||||
|
@ -3,13 +3,6 @@
|
||||
#define DEFINE_WEAPON(m_wpnid, m_cost, m_slotnum, m_acost)\
|
||||
{ m_wpnid, m_cost, 3, m_slotnum, m_acost }
|
||||
|
||||
/* <14e3fc> ../cstrike/dlls/player.cpp:5868 */
|
||||
struct ZombieSpawn
|
||||
{
|
||||
CBaseEntity *entity;
|
||||
CountdownTimer useableTimer;
|
||||
};/* size: 12, cachelines: 1, members: 2 */
|
||||
|
||||
/*
|
||||
* Globals initialization
|
||||
*/
|
||||
@ -203,30 +196,30 @@ int gmsgHudTextArgs;
|
||||
int gmsgShake;
|
||||
int gmsgFade;
|
||||
int gmsgFlashlight;
|
||||
//int gmsgFlashBattery;
|
||||
//int gmsgResetHUD;
|
||||
//int gmsgInitHUD;
|
||||
//int gmsgViewMode;
|
||||
//int gmsgShowGameTitle;
|
||||
int gmsgFlashBattery;
|
||||
int gmsgResetHUD;
|
||||
int gmsgInitHUD;
|
||||
int gmsgViewMode;
|
||||
int gmsgShowGameTitle;
|
||||
int gmsgCurWeapon;
|
||||
//int gmsgHealth;
|
||||
//int gmsgDamage;
|
||||
//int gmsgBattery;
|
||||
//int gmsgTrain;
|
||||
int gmsgHealth;
|
||||
int gmsgDamage;
|
||||
int gmsgBattery;
|
||||
int gmsgTrain;
|
||||
int gmsgLogo;
|
||||
int gmsgWeaponList;
|
||||
int gmsgAmmoX;
|
||||
//int gmsgDeathMsg;
|
||||
int gmsgDeathMsg;
|
||||
int gmsgScoreAttrib;
|
||||
int gmsgScoreInfo;
|
||||
int gmsgTeamInfo;
|
||||
//int gmsgTeamScore;
|
||||
//int gmsgGameMode;
|
||||
//int gmsgMOTD;
|
||||
//int gmsgServerName;
|
||||
int gmsgTeamScore;
|
||||
int gmsgGameMode;
|
||||
int gmsgMOTD;
|
||||
int gmsgServerName;
|
||||
int gmsgAmmoPickup;
|
||||
int gmsgItemPickup;
|
||||
//int gmsgHideWeapon;
|
||||
int gmsgHideWeapon;
|
||||
int gmsgSayText;
|
||||
int gmsgTextMsg;
|
||||
int gmsgSetFOV;
|
||||
@ -243,28 +236,28 @@ int gmsgBarTime;
|
||||
int gmsgReloadSound;
|
||||
int gmsgCrosshair;
|
||||
int gmsgNVGToggle;
|
||||
//int gmsgRadar;
|
||||
int gmsgRadar;
|
||||
int gmsgSpectator;
|
||||
//int gmsgVGUIMenu;
|
||||
int gmsgVGUIMenu;
|
||||
int gmsgCZCareer;
|
||||
//int gmsgCZCareerHUD;
|
||||
int gmsgCZCareerHUD;
|
||||
int gmsgTaskTime;
|
||||
//int gmsgTutorText;
|
||||
int gmsgTutorText;
|
||||
int gmsgTutorLine;
|
||||
//int gmsgShadowIdx;
|
||||
int gmsgShadowIdx;
|
||||
int gmsgTutorState;
|
||||
int gmsgTutorClose;
|
||||
//int gmsgAllowSpec;
|
||||
int gmsgAllowSpec;
|
||||
int gmsgBombDrop;
|
||||
//int gmsgBombPickup;
|
||||
int gmsgBombPickup;
|
||||
int gmsgHostagePos;
|
||||
//int gmsgHostageK;
|
||||
int gmsgHostageK;
|
||||
int gmsgGeigerRange;
|
||||
int gmsgSendCorpse;
|
||||
//int gmsgHLTV;
|
||||
//int gmsgSpecHealth;
|
||||
//int gmsgForceCam;
|
||||
//int gmsgADStop;
|
||||
int gmsgHLTV;
|
||||
int gmsgSpecHealth;
|
||||
int gmsgForceCam;
|
||||
int gmsgADStop;
|
||||
int gmsgReceiveW;
|
||||
int gmsgScenarioIcon;
|
||||
int gmsgBotVoice;
|
||||
@ -274,9 +267,9 @@ int gmsgLocation;
|
||||
int gmsgSpecHealth2;
|
||||
int gmsgBarTime2;
|
||||
int gmsgBotProgress;
|
||||
//int gmsgBrass;
|
||||
//int gmsgFog;
|
||||
//int gmsgShowTimer;
|
||||
int gmsgBrass;
|
||||
int gmsgFog;
|
||||
int gmsgShowTimer;
|
||||
|
||||
BOOL gInitHUD;
|
||||
cvar_t *sv_aim;
|
||||
@ -292,27 +285,108 @@ char *(*CDeadHEV::pm_szPoses)[4];
|
||||
int gEvilImpulse101;
|
||||
char g_szMapBriefingText[512];
|
||||
|
||||
//extern cvar_t fadetoblack; // move player.h
|
||||
//extern cvar_t playerid; // move player.h
|
||||
|
||||
//CBaseEntity *g_pSelectedZombieSpawn;
|
||||
|
||||
//entvars_t *g_pevLastInflictor;
|
||||
//extern cvar_t startmoney; // move player.h
|
||||
//CBaseEntity *g_pLastSpawn;
|
||||
//CBaseEntity *g_pLastCTSpawn;
|
||||
//CBaseEntity *g_pLastTerroristSpawn;
|
||||
//ZombieSpawn zombieSpawn[256];
|
||||
//int zombieSpawnCount;
|
||||
//extern float g_flWeaponCheat;
|
||||
//float g_flWeaponCheat; // move player.h
|
||||
CBaseEntity *g_pLastSpawn;
|
||||
CBaseEntity *g_pLastCTSpawn;
|
||||
CBaseEntity *g_pLastTerroristSpawn;
|
||||
|
||||
//const char *BotArgs[4];
|
||||
//bool UseBotArgs;
|
||||
/* <14e3fc> ../cstrike/dlls/player.cpp:5868 */
|
||||
struct ZombieSpawn
|
||||
{
|
||||
CBaseEntity *entity;
|
||||
CountdownTimer useableTimer;
|
||||
|
||||
};/* size: 12, cachelines: 1, members: 2 */
|
||||
|
||||
ZombieSpawn zombieSpawn[256];
|
||||
int zombieSpawnCount;
|
||||
|
||||
/* <15353b> ../cstrike/dlls/player.cpp:282 */
|
||||
NOBODY void LinkUserMessages(void)
|
||||
void LinkUserMessages(void)
|
||||
{
|
||||
if (gmsgCurWeapon)
|
||||
return;
|
||||
|
||||
gmsgCurWeapon = REG_USER_MSG("CurWeapon", 3);
|
||||
gmsgGeigerRange = REG_USER_MSG("Geiger", 1);
|
||||
gmsgFlashlight = REG_USER_MSG("Flashlight", 2);
|
||||
gmsgFlashBattery = REG_USER_MSG("FlashBat", 1);
|
||||
gmsgHealth = REG_USER_MSG("Health", 1);
|
||||
gmsgDamage = REG_USER_MSG("Damage", 12);
|
||||
gmsgBattery = REG_USER_MSG("Battery", 2);
|
||||
gmsgTrain = REG_USER_MSG("Train", 1);
|
||||
gmsgHudText = REG_USER_MSG("HudTextPro", -1);
|
||||
REG_USER_MSG("HudText", -1);
|
||||
gmsgSayText = REG_USER_MSG("SayText", -1);
|
||||
gmsgTextMsg = REG_USER_MSG("TextMsg", -1);
|
||||
gmsgWeaponList = REG_USER_MSG("WeaponList", -1);
|
||||
gmsgResetHUD = REG_USER_MSG("ResetHUD", 0);
|
||||
gmsgInitHUD = REG_USER_MSG("InitHUD", 0);
|
||||
gmsgViewMode = REG_USER_MSG("ViewMode", 0);
|
||||
gmsgShowGameTitle = REG_USER_MSG("GameTitle", 1);
|
||||
gmsgDeathMsg = REG_USER_MSG("DeathMsg", -1);
|
||||
gmsgScoreAttrib = REG_USER_MSG("ScoreAttrib", 2);
|
||||
gmsgScoreInfo = REG_USER_MSG("ScoreInfo", 9);
|
||||
gmsgTeamInfo = REG_USER_MSG("TeamInfo", -1);
|
||||
gmsgTeamScore = REG_USER_MSG("TeamScore", -1);
|
||||
gmsgGameMode = REG_USER_MSG("GameMode", 1);
|
||||
gmsgMOTD = REG_USER_MSG("MOTD", -1);
|
||||
gmsgServerName = REG_USER_MSG("ServerName", -1);
|
||||
gmsgAmmoPickup = REG_USER_MSG("AmmoPickup", 2);
|
||||
gmsgWeapPickup = REG_USER_MSG("WeapPickup", 1);
|
||||
gmsgItemPickup = REG_USER_MSG("ItemPickup", -1);
|
||||
gmsgHideWeapon = REG_USER_MSG("HideWeapon", 1);
|
||||
gmsgSetFOV = REG_USER_MSG("SetFOV", 1);
|
||||
gmsgShowMenu = REG_USER_MSG("ShowMenu", -1);
|
||||
gmsgShake = REG_USER_MSG("ScreenShake", 6);
|
||||
gmsgFade = REG_USER_MSG("ScreenFade", 10);
|
||||
gmsgAmmoX = REG_USER_MSG("AmmoX", 2);
|
||||
gmsgSendAudio = REG_USER_MSG("SendAudio", -1);
|
||||
gmsgRoundTime = REG_USER_MSG("RoundTime", 2);
|
||||
gmsgMoney = REG_USER_MSG("Money", 5);
|
||||
gmsgArmorType = REG_USER_MSG("ArmorType", 1);
|
||||
gmsgBlinkAcct = REG_USER_MSG("BlinkAcct", 1);
|
||||
gmsgStatusValue = REG_USER_MSG("StatusValue", -1);
|
||||
gmsgStatusText = REG_USER_MSG("StatusText", -1);
|
||||
gmsgStatusIcon = REG_USER_MSG("StatusIcon", -1);
|
||||
gmsgBarTime = REG_USER_MSG("BarTime", 2);
|
||||
gmsgReloadSound = REG_USER_MSG("ReloadSound", 2);
|
||||
gmsgCrosshair = REG_USER_MSG("Crosshair", 1);
|
||||
gmsgNVGToggle = REG_USER_MSG("NVGToggle", 1);
|
||||
gmsgRadar = REG_USER_MSG("Radar", 7);
|
||||
gmsgSpectator = REG_USER_MSG("Spectator", 2);
|
||||
gmsgVGUIMenu = REG_USER_MSG("VGUIMenu", -1);
|
||||
gmsgTutorText = REG_USER_MSG("TutorText", -1);
|
||||
gmsgTutorLine = REG_USER_MSG("TutorLine", -1);
|
||||
gmsgTutorState = REG_USER_MSG("TutorState", -1);
|
||||
gmsgTutorClose = REG_USER_MSG("TutorClose", -1);
|
||||
gmsgAllowSpec = REG_USER_MSG("AllowSpec", 1);
|
||||
gmsgBombDrop = REG_USER_MSG("BombDrop", 7);
|
||||
gmsgBombPickup = REG_USER_MSG("BombPickup", 0);
|
||||
gmsgSendCorpse = REG_USER_MSG("ClCorpse", -1);
|
||||
gmsgHostagePos = REG_USER_MSG("HostagePos", 8);
|
||||
gmsgHostageK = REG_USER_MSG("HostageK", 1);
|
||||
gmsgHLTV = REG_USER_MSG("HLTV", 2);
|
||||
gmsgSpecHealth = REG_USER_MSG("SpecHealth", 1);
|
||||
gmsgForceCam = REG_USER_MSG("ForceCam", 3);
|
||||
gmsgADStop = REG_USER_MSG("ADStop", 0);
|
||||
gmsgReceiveW = REG_USER_MSG("ReceiveW", 1);
|
||||
gmsgCZCareer = REG_USER_MSG("CZCareer", -1);
|
||||
gmsgCZCareerHUD = REG_USER_MSG("CZCareerHUD", -1);
|
||||
gmsgShadowIdx = REG_USER_MSG("ShadowIdx", 4);
|
||||
gmsgTaskTime = REG_USER_MSG("TaskTime", 4);
|
||||
gmsgScenarioIcon = REG_USER_MSG("Scenario", -1);
|
||||
gmsgBotVoice = REG_USER_MSG("BotVoice", 2);
|
||||
gmsgBuyClose = REG_USER_MSG("BuyClose", 0);
|
||||
gmsgSpecHealth2 = REG_USER_MSG("SpecHealth2", 2);
|
||||
gmsgBarTime2 = REG_USER_MSG("BarTime2", 4);
|
||||
gmsgItemStatus = REG_USER_MSG("ItemStatus", 1);
|
||||
gmsgLocation = REG_USER_MSG("Location", -1);
|
||||
gmsgBotProgress = REG_USER_MSG("BotProgress", -1);
|
||||
gmsgBrass = REG_USER_MSG("Brass", -1);
|
||||
gmsgFog = REG_USER_MSG("Fog", 7);
|
||||
gmsgShowTimer = REG_USER_MSG("ShowTimer", 0);
|
||||
gmsgHudTextArgs = REG_USER_MSG("HudTextArgs", -1);
|
||||
}
|
||||
|
||||
/* <1535a5> ../cstrike/dlls/player.cpp:380 */
|
||||
@ -1653,7 +1727,7 @@ void VIP_SafetyZoneIcon_Set(CBasePlayer *player)
|
||||
WRITE_BYTE(0);
|
||||
MESSAGE_END();
|
||||
|
||||
if(!(player->m_flDisplayHistory & DHF_IN_VIPSAFETY_ZONE))
|
||||
if (!(player->m_flDisplayHistory & DHF_IN_VIPSAFETY_ZONE))
|
||||
{
|
||||
if (player->m_iTeam == CT)
|
||||
{
|
||||
@ -3217,7 +3291,7 @@ NOBODY void FixPlayerCrouchStuck(edict_t *pPlayer)
|
||||
}
|
||||
|
||||
/* <153ef5> ../cstrike/dlls/player.cpp:4580 */
|
||||
NOBODY void CBasePlayer::Duck_(void)
|
||||
void CBasePlayer::Duck_(void)
|
||||
{
|
||||
if (pev->button & IN_DUCK)
|
||||
SetAnimation(PLAYER_WALK);
|
||||
@ -3329,16 +3403,63 @@ NOXREF void CBasePlayer::UpdateGeigerCounter(void)
|
||||
}
|
||||
|
||||
/* <156189> ../cstrike/dlls/player.cpp:5352 */
|
||||
NOBODY void CBasePlayer::CheckSuitUpdate(void)
|
||||
void CBasePlayer::CheckSuitUpdate(void)
|
||||
{
|
||||
// {
|
||||
// int i; // 5354
|
||||
// int isentence; // 5355
|
||||
// int isearch; // 5356
|
||||
// {
|
||||
// char sentence; // 5390
|
||||
// }
|
||||
// }
|
||||
_LOG_TRACE
|
||||
|
||||
int i;
|
||||
int isentence = 0;
|
||||
int isearch = m_iSuitPlayNext;
|
||||
|
||||
// Ignore suit updates if no suit
|
||||
if (!(pev->weapons & (1<<WEAPON_SUIT)))
|
||||
return;
|
||||
|
||||
// if in range of radiation source, ping geiger counter
|
||||
UpdateGeigerCounter();
|
||||
|
||||
if (g_pGameRules->IsMultiplayer())
|
||||
{
|
||||
// don't bother updating HEV voice in multiplayer.
|
||||
return;
|
||||
}
|
||||
|
||||
if (gpGlobals->time >= m_flSuitUpdate && m_flSuitUpdate > 0)
|
||||
{
|
||||
// play a sentence off of the end of the queue
|
||||
for (i = 0; i < CSUITPLAYLIST; i++)
|
||||
{
|
||||
if (isentence = m_rgSuitPlayList[ isearch ])
|
||||
break;
|
||||
|
||||
if (++isearch == CSUITPLAYLIST)
|
||||
isearch = 0;
|
||||
}
|
||||
|
||||
if (isentence)
|
||||
{
|
||||
m_rgSuitPlayList[ isearch ] = 0;
|
||||
|
||||
if (isentence > 0)
|
||||
{
|
||||
// play sentence number
|
||||
|
||||
char sentence[CBSENTENCENAME_MAX + 1];
|
||||
Q_strcpy(sentence, "!");
|
||||
Q_strcat(sentence, gszallsentencenames[isentence]);
|
||||
EMIT_SOUND_SUIT(ENT(pev), sentence);
|
||||
}
|
||||
else
|
||||
{
|
||||
// play sentence group
|
||||
EMIT_GROUPID_SUIT(ENT(pev), -isentence);
|
||||
}
|
||||
m_flSuitUpdate = gpGlobals->time + SUITUPDATETIME;
|
||||
}
|
||||
else
|
||||
// queue is empty, don't check
|
||||
m_flSuitUpdate = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* <156201> ../cstrike/dlls/player.cpp:5414 */
|
||||
@ -3408,7 +3529,7 @@ NOBODY void CBasePlayer::PostThink_(void)
|
||||
}
|
||||
|
||||
/* <14e39d> ../cstrike/dlls/player.cpp:5837 */
|
||||
NOXREF BOOL IsSpawnPointValid(CBaseEntity *pPlayer, CBaseEntity *pSpot)
|
||||
BOOL IsSpawnPointValid(CBaseEntity *pPlayer, CBaseEntity *pSpot)
|
||||
{
|
||||
CBaseEntity *ent = NULL;
|
||||
|
||||
@ -3425,18 +3546,27 @@ NOXREF BOOL IsSpawnPointValid(CBaseEntity *pPlayer, CBaseEntity *pSpot)
|
||||
}
|
||||
|
||||
/* <1563a8> ../cstrike/dlls/player.cpp:5879 */
|
||||
NOBODY void InitZombieSpawns(void)
|
||||
NOXREF void InitZombieSpawns(void)
|
||||
{
|
||||
// {
|
||||
// class CBaseEntity *spot; // 5884
|
||||
// operator!=(const Vector *const this,
|
||||
// const Vector &v); // 5889
|
||||
// Invalidate(CountdownTimer *const this); // 5892
|
||||
// }
|
||||
CBaseEntity *spot = NULL;
|
||||
|
||||
g_pSelectedZombieSpawn = NULL;
|
||||
zombieSpawnCount = 0;
|
||||
|
||||
while ((spot = UTIL_FindEntityByClassname(spot, "info_player_start")) != NULL)
|
||||
{
|
||||
if (spot->pev->origin != Vector(0, 0, 0))
|
||||
{
|
||||
zombieSpawn[ zombieSpawnCount ].entity = spot;
|
||||
zombieSpawn[ zombieSpawnCount ].useableTimer.Invalidate();
|
||||
|
||||
zombieSpawnCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* <14e440> ../cstrike/dlls/player.cpp:5906 */
|
||||
CBaseEntity *FindZombieSpawn(CBaseEntity *player, bool forceSpawn)
|
||||
NOXREF CBaseEntity *FindZombieSpawn(CBaseEntity *player, bool forceSpawn)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@ -3444,57 +3574,156 @@ CBaseEntity *FindZombieSpawn(CBaseEntity *player, bool forceSpawn)
|
||||
/* <15645f> ../cstrike/dlls/player.cpp:6060 */
|
||||
edict_t *EntSelectSpawnPoint(CBaseEntity *pPlayer)
|
||||
{
|
||||
//
|
||||
//CTSpawn: // 6095
|
||||
//
|
||||
//ReturnSpot: // 6222
|
||||
// {
|
||||
// class CBaseEntity *pSpot; // 6062
|
||||
// edict_t *player; // 6063
|
||||
// edict(CBaseEntity *const this); // 6065
|
||||
// FNullEnt(CBaseEntity *ent); // 6071
|
||||
// FNullEnt(CBaseEntity *ent); // 6085
|
||||
// {
|
||||
// class CBaseEntity *pFirstSpot; // 6116
|
||||
// FNullEnt(CBaseEntity *ent); // 6113
|
||||
// IsSpawnPointValid(CBaseEntity *pPlayer,
|
||||
// class CBaseEntity *pSpot); // 6123
|
||||
// FNullEnt(CBaseEntity *ent); // 6140
|
||||
// {
|
||||
// class CBaseEntity *ent; // 6142
|
||||
// edict(CBaseEntity *const this); // 6146
|
||||
// VARS(edict_t *pent); // 6147
|
||||
// INDEXENT(int iEdictNum); // 6147
|
||||
// INDEXENT(int iEdictNum); // 6147
|
||||
// VARS(edict_t *pent); // 6147
|
||||
// }
|
||||
// operator==(const Vector *const this,
|
||||
// const Vector &v); // 6125
|
||||
// }
|
||||
// {
|
||||
// class CBaseEntity *pFirstSpot; // 6168
|
||||
// FNullEnt(CBaseEntity *ent); // 6165
|
||||
// IsSpawnPointValid(CBaseEntity *pPlayer,
|
||||
// class CBaseEntity *pSpot); // 6175
|
||||
// FNullEnt(CBaseEntity *ent); // 6192
|
||||
// {
|
||||
// class CBaseEntity *ent; // 6194
|
||||
// edict(CBaseEntity *const this); // 6198
|
||||
// VARS(edict_t *pent); // 6199
|
||||
// INDEXENT(int iEdictNum); // 6199
|
||||
// INDEXENT(int iEdictNum); // 6199
|
||||
// VARS(edict_t *pent); // 6199
|
||||
// }
|
||||
// operator==(const Vector *const this,
|
||||
// const Vector &v); // 6177
|
||||
// }
|
||||
// FNullEnt(CBaseEntity *ent); // 6074
|
||||
// FNullEnt(CBaseEntity *ent); // 6218
|
||||
// FNullEnt(CBaseEntity *ent); // 6223
|
||||
// INDEXENT(int iEdictNum); // 6226
|
||||
// edict(CBaseEntity *const this); // 6234
|
||||
// FNullEnt(CBaseEntity *ent); // 6212
|
||||
// }
|
||||
CBaseEntity *pSpot;
|
||||
edict_t *player = pPlayer->edict();
|
||||
|
||||
// choose a info_player_deathmatch point
|
||||
if (g_pGameRules->IsCoOp())
|
||||
{
|
||||
pSpot = UTIL_FindEntityByClassname(g_pLastSpawn, "info_player_coop");
|
||||
|
||||
if (!FNullEnt(pSpot))
|
||||
goto ReturnSpot;
|
||||
|
||||
pSpot = UTIL_FindEntityByClassname(g_pLastSpawn, "info_player_start");
|
||||
|
||||
if (!FNullEnt(pSpot))
|
||||
goto ReturnSpot;
|
||||
}
|
||||
else if (g_pGameRules->IsDeathmatch() && ((CBasePlayer *)pPlayer)->m_bIsVIP)
|
||||
{
|
||||
pSpot = UTIL_FindEntityByClassname(NULL, "info_vip_start");
|
||||
|
||||
if (!FNullEnt(pSpot))
|
||||
goto ReturnSpot;
|
||||
|
||||
goto CTSpawn;
|
||||
}
|
||||
else if (g_pGameRules->IsDeathmatch() && ((CBasePlayer *)pPlayer)->m_iTeam == CT)
|
||||
{
|
||||
CTSpawn:
|
||||
pSpot = UTIL_FindEntityByClassname(g_pLastCTSpawn, "info_player_start");
|
||||
|
||||
// skip over the null point
|
||||
if (FNullEnt(pSpot))
|
||||
pSpot = UTIL_FindEntityByClassname(pSpot, "info_player_start");
|
||||
|
||||
CBaseEntity *pFirstSpot = pSpot;
|
||||
|
||||
do
|
||||
{
|
||||
if (pSpot)
|
||||
{
|
||||
// check if pSpot is valid
|
||||
if (IsSpawnPointValid(pPlayer, pSpot))
|
||||
{
|
||||
if (pSpot->pev->origin == Vector(0, 0, 0))
|
||||
{
|
||||
pSpot = UTIL_FindEntityByClassname(pSpot, "info_player_start");
|
||||
continue;
|
||||
}
|
||||
|
||||
// if so, go to pSpot
|
||||
goto ReturnSpot;
|
||||
}
|
||||
}
|
||||
|
||||
// increment pSpot
|
||||
pSpot = UTIL_FindEntityByClassname(pSpot, "info_player_start");
|
||||
}
|
||||
// loop if we're not back to the start
|
||||
while (pSpot != pFirstSpot);
|
||||
|
||||
// we haven't found a place to spawn yet, so kill any guy at the first spawn point and spawn there
|
||||
if (!FNullEnt(pSpot))
|
||||
{
|
||||
CBaseEntity *ent = NULL;
|
||||
while ((ent = UTIL_FindEntityInSphere(ent, pSpot->pev->origin, 64)) != NULL)
|
||||
{
|
||||
// if ent is a client, kill em (unless they are ourselves)
|
||||
if (ent->IsPlayer() && ent->edict() != player)
|
||||
ent->TakeDamage(VARS(INDEXENT(0)), VARS(INDEXENT(0)), 200, DMG_GENERIC);
|
||||
}
|
||||
goto ReturnSpot;
|
||||
}
|
||||
}
|
||||
else if (g_pGameRules->IsDeathmatch() && ((CBasePlayer *)pPlayer)->m_iTeam == TERRORIST)
|
||||
{
|
||||
pSpot = UTIL_FindEntityByClassname(g_pLastTerroristSpawn, "info_player_deathmatch");
|
||||
|
||||
// skip over the null point
|
||||
if (FNullEnt(pSpot))
|
||||
pSpot = UTIL_FindEntityByClassname(pSpot, "info_player_deathmatch");
|
||||
|
||||
CBaseEntity *pFirstSpot = pSpot;
|
||||
|
||||
do
|
||||
{
|
||||
if (pSpot)
|
||||
{
|
||||
// check if pSpot is valid
|
||||
if (IsSpawnPointValid(pPlayer, pSpot))
|
||||
{
|
||||
if (pSpot->pev->origin == Vector(0, 0, 0))
|
||||
{
|
||||
pSpot = UTIL_FindEntityByClassname(pSpot, "info_player_deathmatch");
|
||||
continue;
|
||||
}
|
||||
|
||||
// if so, go to pSpot
|
||||
goto ReturnSpot;
|
||||
}
|
||||
}
|
||||
|
||||
// increment pSpot
|
||||
pSpot = UTIL_FindEntityByClassname(pSpot, "info_player_deathmatch");
|
||||
}
|
||||
// loop if we're not back to the start
|
||||
while (pSpot != pFirstSpot);
|
||||
|
||||
// we haven't found a place to spawn yet, so kill any guy at the first spawn point and spawn there
|
||||
if (!FNullEnt(pSpot))
|
||||
{
|
||||
CBaseEntity *ent = NULL;
|
||||
while ((ent = UTIL_FindEntityInSphere(ent, pSpot->pev->origin, 64)) != NULL)
|
||||
{
|
||||
// if ent is a client, kill em (unless they are ourselves)
|
||||
if (ent->IsPlayer() && ent->edict() != player)
|
||||
ent->TakeDamage(VARS(INDEXENT(0)), VARS(INDEXENT(0)), 200, DMG_GENERIC);
|
||||
}
|
||||
goto ReturnSpot;
|
||||
}
|
||||
}
|
||||
|
||||
// If startspot is set, (re)spawn there.
|
||||
if (FStringNull(gpGlobals->startspot) || !Q_strlen(STRING(gpGlobals->startspot)))
|
||||
{
|
||||
pSpot = UTIL_FindEntityByClassname(NULL, "info_player_deathmatch");
|
||||
|
||||
if (!FNullEnt(pSpot))
|
||||
goto ReturnSpot;
|
||||
}
|
||||
else
|
||||
{
|
||||
pSpot = UTIL_FindEntityByTargetname(NULL, STRING(gpGlobals->startspot));
|
||||
|
||||
if (!FNullEnt(pSpot))
|
||||
goto ReturnSpot;
|
||||
}
|
||||
|
||||
ReturnSpot:
|
||||
if (FNullEnt(pSpot))
|
||||
{
|
||||
ALERT(at_error, "PutClientInServer: no info_player_start on level");
|
||||
return INDEXENT(0);
|
||||
}
|
||||
|
||||
if (((CBasePlayer *)pPlayer)->m_iTeam == TERRORIST)
|
||||
g_pLastTerroristSpawn = pSpot;
|
||||
else
|
||||
g_pLastCTSpawn = pSpot;
|
||||
|
||||
return pSpot->edict();
|
||||
}
|
||||
|
||||
/* <15331b> ../cstrike/dlls/player.cpp:6237 */
|
||||
@ -3603,15 +3832,54 @@ NOBODY void CBasePlayer::Spawn_(void)
|
||||
}
|
||||
|
||||
/* <153555> ../cstrike/dlls/player.cpp:6620 */
|
||||
NOBODY void CBasePlayer::Precache_(void)
|
||||
void CBasePlayer::Precache_(void)
|
||||
{
|
||||
// in the event that the player JUST spawned, and the level node graph
|
||||
// was loaded, fix all of the node graph pointers before the game starts.
|
||||
|
||||
// !!!BUGBUG - now that we have multiplayer, this needs to be moved!
|
||||
if (WorldGraph.m_fGraphPresent && !WorldGraph.m_fGraphPointersSet)
|
||||
{
|
||||
if (!WorldGraph.FSetGraphPointers())
|
||||
{
|
||||
ALERT(at_console, "**Graph pointers were not set!\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
ALERT(at_console, "**Graph Pointers Set!\n");
|
||||
}
|
||||
}
|
||||
|
||||
// SOUNDS / MODELS ARE PRECACHED in ClientPrecache() (game specific)
|
||||
// because they need to precache before any clients have connected
|
||||
|
||||
// init geiger counter vars during spawn and each time
|
||||
// we cross a level transition
|
||||
|
||||
m_flgeigerRange = 1000;
|
||||
m_igeigerRangePrev = 1000;
|
||||
m_bitsDamageType = 0;
|
||||
m_bitsHUDDamage = -1;
|
||||
m_iClientBattery = -1;
|
||||
m_iTrain = (TRAIN_NEW | TRAIN_OFF);
|
||||
|
||||
// Make sure any necessary user messages have been registered
|
||||
LinkUserMessages();
|
||||
|
||||
// won't update for 1/2 a second
|
||||
m_iUpdateTime = 5;
|
||||
|
||||
if (gInitHUD)
|
||||
m_fInitHUD = TRUE;
|
||||
}
|
||||
|
||||
/* <151a77> ../cstrike/dlls/player.cpp:6671 */
|
||||
NOBODY int CBasePlayer::Save_(CSave &save)
|
||||
int CBasePlayer::Save_(CSave &save)
|
||||
{
|
||||
// Save(CBasePlayer *const this,
|
||||
// class CSave &save); // 6671
|
||||
if (!CBaseMonster::Save(save))
|
||||
return 0;
|
||||
|
||||
return save.WriteFields("PLAYER", this, IMPLEMENT_ARRAY_CLASS(CBasePlayer, m_playerSaveData), ARRAYSIZE(IMPLEMENT_ARRAY_CLASS(CBasePlayer, m_playerSaveData)));
|
||||
}
|
||||
|
||||
/* <153355> ../cstrike/dlls/player.cpp:6685 */
|
||||
@ -3633,72 +3901,181 @@ void CBasePlayer::SetScoreboardAttributes(CBasePlayer *destination)
|
||||
}
|
||||
|
||||
/* <156e88> ../cstrike/dlls/player.cpp:6712 */
|
||||
NOBODY void CBasePlayer::RenewItems(void)
|
||||
NOXREF void CBasePlayer::RenewItems(void)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
/* <156b9b> ../cstrike/dlls/player.cpp:6718 */
|
||||
NOBODY int CBasePlayer::Restore_(CRestore &restore)
|
||||
int CBasePlayer::Restore_(CRestore &restore)
|
||||
{
|
||||
// {
|
||||
// int status; // 6723
|
||||
// SAVERESTOREDATA *pSaveData; // 6725
|
||||
// }
|
||||
// Restore(CBasePlayer *const this,
|
||||
// class CRestore &restore); // 6718
|
||||
if (!CBaseMonster::Restore(restore))
|
||||
return 0;
|
||||
|
||||
int status = restore.ReadFields("PLAYER", this, IMPLEMENT_ARRAY_CLASS(CBasePlayer, m_playerSaveData), ARRAYSIZE(IMPLEMENT_ARRAY_CLASS(CBasePlayer, m_playerSaveData)));
|
||||
SAVERESTOREDATA *pSaveData = (SAVERESTOREDATA *)gpGlobals->pSaveData;
|
||||
|
||||
if (!pSaveData->fUseLandmark)
|
||||
{
|
||||
ALERT(at_console, "No Landmark:%s\n", pSaveData->szLandmarkName);
|
||||
|
||||
edict_t *pentSpawnSpot = EntSelectSpawnPoint(this);
|
||||
|
||||
pev->origin = VARS(pentSpawnSpot)->origin + Vector(0, 0, 1);
|
||||
pev->angles = VARS(pentSpawnSpot)->angles;
|
||||
}
|
||||
|
||||
pev->v_angle.z = 0;
|
||||
pev->angles = pev->v_angle;
|
||||
pev->fixangle = 1;
|
||||
|
||||
m_bloodColor = BLOOD_COLOR_RED;
|
||||
m_modelIndexPlayer = pev->modelindex;
|
||||
|
||||
if (pev->flags & FL_DUCKING)
|
||||
UTIL_SetSize(pev, VEC_DUCK_HULL_MIN, VEC_DUCK_HULL_MAX);
|
||||
else
|
||||
UTIL_SetSize(pev, VEC_HULL_MIN, VEC_HULL_MAX);
|
||||
|
||||
m_flDisplayHistory &= ~DHM_CONNECT_CLEAR;
|
||||
SetScoreboardAttributes();
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/* <156eab> ../cstrike/dlls/player.cpp:6771 */
|
||||
NOBODY void CBasePlayer::Reset(void)
|
||||
void CBasePlayer::Reset(void)
|
||||
{
|
||||
// AddAccount(CBasePlayer::Reset(// int amount,
|
||||
// bool bTrackChange); // 6776
|
||||
// RemoveShield(CBasePlayer *const this); // 6779
|
||||
// AddAccount(CBasePlayer *const this,
|
||||
// int amount,
|
||||
// bool bTrackChange); // 6782
|
||||
// MESSAGE_BEGIN(int msg_dest,
|
||||
// int msg_type,
|
||||
// const float *pOrigin,
|
||||
// edict_t *ed); // 6784
|
||||
// edict(CBaseEntity *const this); // 6785
|
||||
// ENTINDEX(edict_t *pEdict); // 6785
|
||||
pev->frags = 0;
|
||||
m_iDeaths = 0;
|
||||
m_iAccount = 0;
|
||||
|
||||
MESSAGE_BEGIN(MSG_ONE, gmsgMoney, NULL, pev);
|
||||
WRITE_LONG(m_iAccount);
|
||||
WRITE_BYTE(0);
|
||||
MESSAGE_END();
|
||||
|
||||
m_bNotKilled = false;
|
||||
|
||||
RemoveShield();
|
||||
CheckStartMoney();
|
||||
AddAccount(startmoney.value);
|
||||
|
||||
MESSAGE_BEGIN(MSG_ALL, gmsgScoreInfo);
|
||||
WRITE_BYTE(ENTINDEX(edict()));
|
||||
WRITE_SHORT(0);
|
||||
WRITE_SHORT(0);
|
||||
WRITE_SHORT(0);
|
||||
WRITE_SHORT(m_iTeam);
|
||||
MESSAGE_END();
|
||||
}
|
||||
|
||||
/* <157066> ../cstrike/dlls/player.cpp:6794 */
|
||||
NOBODY void CBasePlayer::SelectNextItem(int iItem)
|
||||
NOXREF void CBasePlayer::SelectNextItem(int iItem)
|
||||
{
|
||||
// {
|
||||
// class CBasePlayerItem *pItem; // 6796
|
||||
// {
|
||||
// class CBasePlayerItem *pLast; // 6812
|
||||
// }
|
||||
// ResetAutoaim(CBasePlayer *const this); // 6823
|
||||
// {
|
||||
// class CBasePlayerWeapon *pWeapon; // 6833
|
||||
// }
|
||||
// UpdateShieldCrosshair(CBasePlayer *const this,
|
||||
// bool draw); // 6844
|
||||
// }
|
||||
CBasePlayerItem *pItem = m_rgpPlayerItems[ iItem ];
|
||||
|
||||
if (!pItem)
|
||||
return;
|
||||
|
||||
if (pItem == m_pActiveItem)
|
||||
{
|
||||
pItem = m_pActiveItem->m_pNext;
|
||||
|
||||
if (!pItem)
|
||||
return;
|
||||
|
||||
CBasePlayerItem *pLast = pItem;
|
||||
|
||||
while (pLast->m_pNext != NULL)
|
||||
pLast = pLast->m_pNext;
|
||||
|
||||
pLast->m_pNext = m_pActiveItem;
|
||||
m_pActiveItem->m_pNext = NULL;
|
||||
m_rgpPlayerItems[ iItem ] = pItem;
|
||||
}
|
||||
|
||||
ResetAutoaim();
|
||||
|
||||
if (m_pActiveItem)
|
||||
m_pActiveItem->Holster();
|
||||
|
||||
if (HasShield())
|
||||
{
|
||||
CBasePlayerWeapon *pWeapon = (CBasePlayerWeapon *)m_pActiveItem;
|
||||
pWeapon->m_iWeaponState &= ~WPNSTATE_SHIELD_DRAWN;
|
||||
m_bShieldDrawn = false;
|
||||
}
|
||||
|
||||
m_pLastItem = m_pActiveItem;
|
||||
m_pActiveItem = pItem;
|
||||
|
||||
if (m_pActiveItem)
|
||||
{
|
||||
UpdateShieldCrosshair(true);
|
||||
|
||||
m_pActiveItem->Deploy();
|
||||
m_pActiveItem->UpdateItemInfo();
|
||||
|
||||
ResetMaxSpeed();
|
||||
}
|
||||
}
|
||||
|
||||
/* <15714a> ../cstrike/dlls/player.cpp:6851 */
|
||||
NOBODY void CBasePlayer::SelectItem(const char *pstr)
|
||||
void CBasePlayer::SelectItem(const char *pstr)
|
||||
{
|
||||
// {
|
||||
// class CBasePlayerItem *pItem; // 6856
|
||||
// {
|
||||
// int i; // 6858
|
||||
// FClassnameIs(entvars_t *pev,
|
||||
// const char *szClassname); // 6866
|
||||
// }
|
||||
// ResetAutoaim(CBasePlayer *const this); // 6883
|
||||
// {
|
||||
// class CBasePlayerWeapon *pWeapon; // 6896
|
||||
// UpdateShieldCrosshair(CBasePlayer *const this,
|
||||
// bool draw); // 6901
|
||||
// }
|
||||
// }
|
||||
if (!pstr)
|
||||
return;
|
||||
|
||||
CBasePlayerItem *pItem = NULL;
|
||||
|
||||
for (int i = 0; i < MAX_ITEM_TYPES; i++)
|
||||
{
|
||||
pItem = m_rgpPlayerItems[ i ];
|
||||
|
||||
if (pItem != NULL)
|
||||
{
|
||||
while (pItem != NULL)
|
||||
{
|
||||
if (FClassnameIs(pItem->pev, pstr))
|
||||
break;
|
||||
|
||||
pItem = pItem->m_pNext;
|
||||
}
|
||||
|
||||
if (pItem)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!pItem)
|
||||
return;
|
||||
|
||||
if (pItem == m_pActiveItem)
|
||||
return;
|
||||
|
||||
ResetAutoaim();
|
||||
|
||||
// FIX, this needs to queue them up and delay
|
||||
if (m_pActiveItem)
|
||||
m_pActiveItem->Holster();
|
||||
|
||||
m_pLastItem = m_pActiveItem;
|
||||
m_pActiveItem = pItem;
|
||||
|
||||
if (m_pActiveItem)
|
||||
{
|
||||
CBasePlayerWeapon *pWeapon = (CBasePlayerWeapon *)m_pActiveItem;
|
||||
pWeapon->m_iWeaponState &= ~WPNSTATE_SHIELD_DRAWN;
|
||||
|
||||
m_bShieldDrawn = false;
|
||||
UpdateShieldCrosshair(true);
|
||||
|
||||
m_pActiveItem->Deploy();
|
||||
m_pActiveItem->UpdateItemInfo();
|
||||
|
||||
ResetMaxSpeed();
|
||||
}
|
||||
}
|
||||
|
||||
/* <157268> ../cstrike/dlls/player.cpp:6909 */
|
||||
@ -3712,7 +4089,7 @@ void CBasePlayer::SelectLastItem(void)
|
||||
for (int i = 1; i < MAX_ITEMS; i++)
|
||||
{
|
||||
CBasePlayerItem *pItem = m_rgpPlayerItems[i];
|
||||
if(pItem && pItem != m_pActiveItem)
|
||||
if (pItem && pItem != m_pActiveItem)
|
||||
{
|
||||
m_pLastItem = pItem;
|
||||
break;
|
||||
@ -3720,7 +4097,7 @@ void CBasePlayer::SelectLastItem(void)
|
||||
}
|
||||
}
|
||||
|
||||
if(!m_pLastItem || m_pLastItem == m_pActiveItem)
|
||||
if (!m_pLastItem || m_pLastItem == m_pActiveItem)
|
||||
return;
|
||||
|
||||
ResetAutoaim();
|
||||
@ -3794,7 +4171,7 @@ void CSprayCan::Spawn(entvars_t *pevOwner)
|
||||
}
|
||||
|
||||
/* <151815> ../cstrike/dlls/player.cpp:7021 */
|
||||
NOBODY void CSprayCan::Think_(void)
|
||||
void CSprayCan::Think_(void)
|
||||
{
|
||||
TraceResult tr;
|
||||
int playernum;
|
||||
@ -3934,20 +4311,20 @@ void CBasePlayer::FlashlightTurnOff(void)
|
||||
}
|
||||
|
||||
/* <158ae7> ../cstrike/dlls/player.cpp:7179 */
|
||||
NOBODY void CBasePlayer::ForceClientDllUpdate(void)
|
||||
void CBasePlayer::ForceClientDllUpdate(void)
|
||||
{
|
||||
m_fInitHUD = TRUE;
|
||||
m_iClientHealth = -1;
|
||||
m_iClientBattery = -1;
|
||||
m_iTrain |= TRAIN_NEW;
|
||||
m_fWeapon = FALSE;
|
||||
m_fInitHUD = TRUE;
|
||||
m_iTrain |= (TRAIN_NEW | TRAIN_OFF);
|
||||
|
||||
UpdateClientData();
|
||||
HandleSignals();// TODO: Reverse me!
|
||||
HandleSignals();
|
||||
}
|
||||
|
||||
/* <157f8d> ../cstrike/dlls/player.cpp:7202 */
|
||||
NOBODY void CBasePlayer::ImpulseCommands_(void)
|
||||
void CBasePlayer::ImpulseCommands_(void)
|
||||
{
|
||||
TraceResult tr;
|
||||
|
||||
@ -4485,16 +4862,12 @@ NOXREF void CBasePlayer::ItemPostFrame(void)
|
||||
#else
|
||||
if (gpGlobals->time < m_flNextAttack)
|
||||
#endif // CLIENT_WEAPONS
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: Reverse me!
|
||||
ImpulseCommands();
|
||||
|
||||
if (!m_pActiveItem)
|
||||
return;
|
||||
|
||||
if (m_pActiveItem != NULL)
|
||||
m_pActiveItem->ItemPostFrame();
|
||||
}
|
||||
|
||||
@ -4582,7 +4955,7 @@ void CBasePlayer::SendHostageIcons(void)
|
||||
|
||||
Q_snprintf(buf, ARRAYSIZE(buf), "hostage%d", numHostages);
|
||||
|
||||
if(numHostages)
|
||||
if (numHostages)
|
||||
{
|
||||
MESSAGE_BEGIN(MSG_ONE, gmsgScenarioIcon, NULL, pev);
|
||||
WRITE_BYTE(1);
|
||||
@ -5905,7 +6278,7 @@ float GetPlayerYaw(const edict_t *pEdict)
|
||||
}
|
||||
|
||||
/* <15a5f9> ../cstrike/dlls/player.cpp:9863 */
|
||||
int GetPlayerGaitsequence(edict_t *pEdict)
|
||||
int GetPlayerGaitsequence(const edict_t *pEdict)
|
||||
{
|
||||
entvars_t *pev = VARS((edict_t *)pEdict);
|
||||
CBasePlayer *pPlayer = reinterpret_cast< CBasePlayer * >(CBasePlayer::Instance( pev ));
|
||||
|
@ -44,6 +44,9 @@
|
||||
|
||||
#define MAX_RECENT_PATH 20
|
||||
|
||||
#define SUITUPDATETIME 3.5
|
||||
#define SUITFIRSTUPDATETIME 0.1
|
||||
|
||||
#define PLAYER_FATAL_FALL_SPEED 1100.0f
|
||||
#define PLAYER_MAX_SAFE_FALL_SPEED 500.0f
|
||||
#define PLAYER_SEARCH_RADIUS 64.0f
|
||||
@ -278,8 +281,14 @@ struct WeaponStruct
|
||||
#define g_weaponStruct (*pg_weaponStruct)
|
||||
#define gEvilImpulse101 (*pgEvilImpulse101)
|
||||
#define g_szMapBriefingText (*pg_szMapBriefingText)
|
||||
#define g_pLastSpawn (*pg_pLastSpawn)
|
||||
#define g_pLastCTSpawn (*pg_pLastCTSpawn)
|
||||
#define g_pLastTerroristSpawn (*pg_pLastTerroristSpawn)
|
||||
#define gInitHUD (*pgInitHUD)
|
||||
#define sv_aim (*psv_aim)
|
||||
#define zombieSpawnCount (*pzombieSpawnCount)
|
||||
#define zombieSpawn (*pzombieSpawn)
|
||||
#define g_pSelectedZombieSpawn (*pg_pSelectedZombieSpawn)
|
||||
#define giPrecacheGrunt (*pgiPrecacheGrunt)
|
||||
#define gmsgWeapPickup (*pgmsgWeapPickup)
|
||||
#define gmsgHudText (*pgmsgHudText)
|
||||
@ -287,30 +296,30 @@ struct WeaponStruct
|
||||
#define gmsgShake (*pgmsgShake)
|
||||
#define gmsgFade (*pgmsgFade)
|
||||
#define gmsgFlashlight (*pgmsgFlashlight)
|
||||
//#define gmsgFlashBattery (*pgmsgFlashBattery)
|
||||
//#define gmsgResetHUD (*pgmsgResetHUD)
|
||||
//#define gmsgInitHUD (*pgmsgInitHUD)
|
||||
//#define gmsgViewMode (*pgmsgViewMode)
|
||||
//#define gmsgShowGameTitle (*pgmsgShowGameTitle)
|
||||
#define gmsgFlashBattery (*pgmsgFlashBattery)
|
||||
#define gmsgResetHUD (*pgmsgResetHUD)
|
||||
#define gmsgInitHUD (*pgmsgInitHUD)
|
||||
#define gmsgViewMode (*pgmsgViewMode)
|
||||
#define gmsgShowGameTitle (*pgmsgShowGameTitle)
|
||||
#define gmsgCurWeapon (*pgmsgCurWeapon)
|
||||
//#define gmsgHealth (*pgmsgHealth)
|
||||
//#define gmsgDamage (*pgmsgDamage)
|
||||
//#define gmsgBattery (*pgmsgBattery)
|
||||
//#define gmsgTrain (*pgmsgTrain)
|
||||
#define gmsgHealth (*pgmsgHealth)
|
||||
#define gmsgDamage (*pgmsgDamage)
|
||||
#define gmsgBattery (*pgmsgBattery)
|
||||
#define gmsgTrain (*pgmsgTrain)
|
||||
#define gmsgLogo (*pgmsgLogo)
|
||||
#define gmsgWeaponList (*pgmsgWeaponList)
|
||||
#define gmsgAmmoX (*pgmsgAmmoX)
|
||||
//#define gmsgDeathMsg (*pgmsgDeathMsg)
|
||||
#define gmsgDeathMsg (*pgmsgDeathMsg)
|
||||
#define gmsgScoreAttrib (*pgmsgScoreAttrib)
|
||||
#define gmsgScoreInfo (*pgmsgScoreInfo)
|
||||
#define gmsgTeamInfo (*pgmsgTeamInfo)
|
||||
//#define gmsgTeamScore (*pgmsgTeamScore)
|
||||
//#define gmsgGameMode (*pgmsgGameMode)
|
||||
//#define gmsgMOTD (*pgmsgMOTD)
|
||||
//#define gmsgServerName (*pgmsgServerName)
|
||||
#define gmsgTeamScore (*pgmsgTeamScore)
|
||||
#define gmsgGameMode (*pgmsgGameMode)
|
||||
#define gmsgMOTD (*pgmsgMOTD)
|
||||
#define gmsgServerName (*pgmsgServerName)
|
||||
#define gmsgAmmoPickup (*pgmsgAmmoPickup)
|
||||
#define gmsgItemPickup (*pgmsgItemPickup)
|
||||
//#define gmsgHideWeapon (*pgmsgHideWeapon)
|
||||
#define gmsgHideWeapon (*pgmsgHideWeapon)
|
||||
#define gmsgSayText (*pgmsgSayText)
|
||||
#define gmsgTextMsg (*pgmsgTextMsg)
|
||||
#define gmsgSetFOV (*pgmsgSetFOV)
|
||||
@ -327,28 +336,28 @@ struct WeaponStruct
|
||||
#define gmsgReloadSound (*pgmsgReloadSound)
|
||||
#define gmsgCrosshair (*pgmsgCrosshair)
|
||||
#define gmsgNVGToggle (*pgmsgNVGToggle)
|
||||
//#define gmsgRadar (*pgmsgRadar)
|
||||
#define gmsgRadar (*pgmsgRadar)
|
||||
#define gmsgSpectator (*pgmsgSpectator)
|
||||
//#define gmsgVGUIMenu (*pgmsgVGUIMenu)
|
||||
#define gmsgVGUIMenu (*pgmsgVGUIMenu)
|
||||
#define gmsgCZCareer (*pgmsgCZCareer)
|
||||
//#define gmsgCZCareerHUD (*pgmsgCZCareerHUD)
|
||||
#define gmsgCZCareerHUD (*pgmsgCZCareerHUD)
|
||||
#define gmsgTaskTime (*pgmsgTaskTime)
|
||||
//#define gmsgTutorText (*pgmsgTutorText)
|
||||
#define gmsgTutorText (*pgmsgTutorText)
|
||||
#define gmsgTutorLine (*pgmsgTutorLine)
|
||||
//#define gmsgShadowIdx (*pgmsgShadowIdx)
|
||||
#define gmsgShadowIdx (*pgmsgShadowIdx)
|
||||
#define gmsgTutorState (*pgmsgTutorState)
|
||||
#define gmsgTutorClose (*pgmsgTutorClose)
|
||||
//#define gmsgAllowSpec (*pgmsgAllowSpec)
|
||||
#define gmsgAllowSpec (*pgmsgAllowSpec)
|
||||
#define gmsgBombDrop (*pgmsgBombDrop)
|
||||
//#define gmsgBombPickup (*pgmsgBombPickup)
|
||||
#define gmsgBombPickup (*pgmsgBombPickup)
|
||||
#define gmsgHostagePos (*pgmsgHostagePos)
|
||||
//#define gmsgHostageK (*pgmsgHostageK)
|
||||
#define gmsgHostageK (*pgmsgHostageK)
|
||||
#define gmsgGeigerRange (*pgmsgGeigerRange)
|
||||
#define gmsgSendCorpse (*pgmsgSendCorpse)
|
||||
//#define gmsgHLTV (*pgmsgHLTV)
|
||||
//#define gmsgSpecHealth (*pgmsgSpecHealth)
|
||||
//#define gmsgForceCam (*pgmsgForceCam)
|
||||
//#define gmsgADStop (*pgmsgADStop)
|
||||
#define gmsgHLTV (*pgmsgHLTV)
|
||||
#define gmsgSpecHealth (*pgmsgSpecHealth)
|
||||
#define gmsgForceCam (*pgmsgForceCam)
|
||||
#define gmsgADStop (*pgmsgADStop)
|
||||
#define gmsgReceiveW (*pgmsgReceiveW)
|
||||
#define gmsgScenarioIcon (*pgmsgScenarioIcon)
|
||||
#define gmsgBotVoice (*pgmsgBotVoice)
|
||||
@ -358,9 +367,9 @@ struct WeaponStruct
|
||||
#define gmsgSpecHealth2 (*pgmsgSpecHealth2)
|
||||
#define gmsgBarTime2 (*pgmsgBarTime2)
|
||||
#define gmsgBotProgress (*pgmsgBotProgress)
|
||||
//#define gmsgBrass (*pgmsgBrass)
|
||||
//#define gmsgFog (*pgmsgFog)
|
||||
//#define gmsgShowTimer (*pgmsgShowTimer)
|
||||
#define gmsgBrass (*pgmsgBrass)
|
||||
#define gmsgFog (*pgmsgFog)
|
||||
#define gmsgShowTimer (*pgmsgShowTimer)
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
@ -438,7 +447,7 @@ public:
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
public:
|
||||
NOBODY void Spawn(entvars_t *pevOwner);
|
||||
void Spawn(entvars_t *pevOwner);
|
||||
|
||||
};/* size: 152, cachelines: 3, members: 1 */
|
||||
|
||||
@ -458,10 +467,10 @@ public:
|
||||
enum { MaxLocationLen = 32 };
|
||||
|
||||
NOBODY virtual void Spawn(void);
|
||||
NOBODY virtual void Precache(void);
|
||||
NOBODY virtual int Save(CSave &save);
|
||||
NOBODY virtual int Restore(CRestore &restore);
|
||||
NOBODY virtual int ObjectCaps(void)
|
||||
virtual void Precache(void);
|
||||
virtual int Save(CSave &save);
|
||||
virtual int Restore(CRestore &restore);
|
||||
virtual int ObjectCaps(void)
|
||||
{
|
||||
return ObjectCaps_();
|
||||
}
|
||||
@ -510,7 +519,7 @@ public:
|
||||
{
|
||||
return ShouldFadeOnDeath_();
|
||||
}
|
||||
NOBODY virtual void ResetMaxSpeed(void);
|
||||
virtual void ResetMaxSpeed(void);
|
||||
NOBODY virtual void Jump(void);
|
||||
NOBODY virtual void Duck(void);
|
||||
NOBODY virtual void PreThink(void);
|
||||
@ -521,7 +530,7 @@ public:
|
||||
return IsBot_();
|
||||
}
|
||||
NOBODY virtual void UpdateClientData(void);
|
||||
NOBODY virtual void ImpulseCommands(void);
|
||||
virtual void ImpulseCommands(void);
|
||||
virtual void RoundRespawn(void);
|
||||
virtual Vector GetAutoaimVector(float flDelta);
|
||||
virtual void Blind(float flUntilTime, float flHoldTime, float flFadeTime, int iAlpha);
|
||||
@ -634,9 +643,9 @@ public:
|
||||
void Pain(int m_LastHitGroup, bool HasArmour);
|
||||
BOOL IsBombGuy(void);
|
||||
bool IsLookingAtPosition(Vector *pos, float angleTolerance = 20.0f);
|
||||
NOBODY void Reset();
|
||||
void Reset();
|
||||
void SetScoreboardAttributes(CBasePlayer *destination = NULL);
|
||||
NOBODY void RenewItems(void);
|
||||
NOXREF void RenewItems(void);
|
||||
void PackDeadPlayerItems(void);
|
||||
void GiveDefaultItems(void);
|
||||
void RemoveAllItems(BOOL removeSuit);
|
||||
@ -669,20 +678,20 @@ public:
|
||||
void CheatImpulseCommands(int iImpulse);
|
||||
NOXREF void StartDeathCam(void);
|
||||
NOBODY void StartObserver(Vector vecPosition, Vector vecViewAngle);
|
||||
NOBODY void HandleSignals(void);
|
||||
void HandleSignals(void);
|
||||
void DropPlayerItem(const char *pszItemName);
|
||||
BOOL HasPlayerItem(CBasePlayerItem *pCheckItem);
|
||||
BOOL HasNamedPlayerItem(const char *pszItemName);
|
||||
NOXREF BOOL HasWeapons(void);
|
||||
NOXREF void SelectPrevItem(int iItem);
|
||||
NOBODY void SelectNextItem(int iItem);
|
||||
NOXREF void SelectNextItem(int iItem);
|
||||
void SelectLastItem(void);
|
||||
NOBODY void SelectItem(const char *pstr);
|
||||
void SelectItem(const char *pstr);
|
||||
NOXREF void ItemPreFrame(void);
|
||||
NOXREF void ItemPostFrame(void);
|
||||
void GiveNamedItem(const char *pszName);
|
||||
void EnableControl(BOOL fControl);
|
||||
NOBODY bool HintMessage(const char *pMessage, BOOL bDisplayIfPlayerDead = FALSE, BOOL bOverride = FALSE);
|
||||
bool HintMessage(const char *pMessage, BOOL bDisplayIfPlayerDead = FALSE, BOOL bOverride = FALSE);
|
||||
void SendAmmoUpdate(void);
|
||||
NOXREF void SendFOV(int fov);
|
||||
NOBODY void WaterMove(void);
|
||||
@ -694,7 +703,7 @@ public:
|
||||
void WINAPI_HOOK MenuPrint(const char *msg);
|
||||
void ResetMenu(void);
|
||||
void SyncRoundTimer(void);
|
||||
NOBODY void CheckSuitUpdate(void);
|
||||
NOXREF void CheckSuitUpdate(void);
|
||||
void SetSuitUpdate(char *name = NULL, int fgroup = 0, int iNoRepeatTime = 0);
|
||||
NOXREF void UpdateGeigerCounter(void);
|
||||
NOBODY void CheckTimeBasedDamage(void);
|
||||
@ -702,9 +711,9 @@ public:
|
||||
NOXREF void BarnacleVictimReleased(void);
|
||||
static int GetAmmoIndex(const char *psz);
|
||||
int AmmoInventory(int iAmmoIndex);
|
||||
NOBODY void ResetAutoaim(void);
|
||||
void ResetAutoaim(void);
|
||||
Vector AutoaimDeflection(class Vector &vecSrc, float flDist, float flDelta);
|
||||
NOBODY void ForceClientDllUpdate(void);
|
||||
void ForceClientDllUpdate(void);
|
||||
void DeathMessage(entvars_t *pevAttacker) { };
|
||||
void SetCustomDecalFrames(int);
|
||||
NOXREF int GetCustomDecalFrames(void);
|
||||
@ -739,14 +748,26 @@ public:
|
||||
|
||||
return false;
|
||||
}
|
||||
NOBODY bool IsBlind(void);
|
||||
NOBODY bool IsAutoFollowAllowed(void);
|
||||
NOBODY void InhibitAutoFollow(float);
|
||||
NOBODY void AllowAutoFollow(void);
|
||||
bool IsBlind(void)
|
||||
{
|
||||
return (gpGlobals->time > m_blindUntilTime);
|
||||
}
|
||||
bool IsAutoFollowAllowed(void)
|
||||
{
|
||||
return (gpGlobals->time > m_allowAutoFollowTime);
|
||||
}
|
||||
void InhibitAutoFollow(float duration)
|
||||
{
|
||||
m_allowAutoFollowTime = duration;
|
||||
}
|
||||
void AllowAutoFollow(void)
|
||||
{
|
||||
m_allowAutoFollowTime = 0;
|
||||
}
|
||||
void ClearAutoBuyData(void);
|
||||
void AddAutoBuyData(const char *str);
|
||||
NOBODY void AutoBuy(void);
|
||||
NOBODY void ClientCommand(const char *cmd, const char *arg1 = NULL, const char *arg2 = NULL, const char *arg3 = NULL);
|
||||
void ClientCommand(const char *cmd, const char *arg1 = NULL, const char *arg2 = NULL, const char *arg3 = NULL);
|
||||
void PrioritizeAutoBuyString(char *autobuyString, const char *priorityString);
|
||||
NOBODY const char *PickPrimaryCareerTaskWeapon(void);
|
||||
NOBODY const char *PickSecondaryCareerTaskWeapon(void);
|
||||
@ -756,7 +777,7 @@ public:
|
||||
void PostAutoBuyCommandProcessing(AutoBuyInfoStruct *commandInfo, bool &boughtPrimary, bool &boughtSecondary);
|
||||
void ParseAutoBuyString(const char *string, bool &boughtPrimary, bool &boughtSecondary);
|
||||
NOXREF AutoBuyInfoStruct *GetAutoBuyCommandInfo(const char *command);
|
||||
NOBODY void InitRebuyData(const char *str);
|
||||
void InitRebuyData(const char *str);
|
||||
void BuildRebuyStruct(void);
|
||||
void Rebuy(void);
|
||||
NOXREF void RebuyPrimaryWeapon(void);
|
||||
@ -1008,8 +1029,14 @@ extern WeaponStruct g_weaponStruct[MAX_WEAPONS];
|
||||
|
||||
extern int gEvilImpulse101;
|
||||
extern char g_szMapBriefingText[512];
|
||||
extern CBaseEntity *g_pLastSpawn;
|
||||
extern CBaseEntity *g_pLastCTSpawn;
|
||||
extern CBaseEntity *g_pLastTerroristSpawn;
|
||||
extern BOOL gInitHUD;
|
||||
extern cvar_t *sv_aim;
|
||||
extern int zombieSpawnCount;
|
||||
extern struct ZombieSpawn zombieSpawn[256];
|
||||
extern CBaseEntity *g_pSelectedZombieSpawn;
|
||||
|
||||
extern int giPrecacheGrunt;
|
||||
extern int gmsgWeapPickup;
|
||||
@ -1018,30 +1045,30 @@ extern int gmsgHudTextArgs;
|
||||
extern int gmsgShake;
|
||||
extern int gmsgFade;
|
||||
extern int gmsgFlashlight;
|
||||
//extern int gmsgFlashBattery;
|
||||
//extern int gmsgResetHUD;
|
||||
//extern int gmsgInitHUD;
|
||||
//extern int gmsgViewMode;
|
||||
//extern int gmsgShowGameTitle;
|
||||
extern int gmsgFlashBattery;
|
||||
extern int gmsgResetHUD;
|
||||
extern int gmsgInitHUD;
|
||||
extern int gmsgViewMode;
|
||||
extern int gmsgShowGameTitle;
|
||||
extern int gmsgCurWeapon;
|
||||
//extern int gmsgHealth;
|
||||
//extern int gmsgDamage;
|
||||
//extern int gmsgBattery;
|
||||
//extern int gmsgTrain;
|
||||
extern int gmsgHealth;
|
||||
extern int gmsgDamage;
|
||||
extern int gmsgBattery;
|
||||
extern int gmsgTrain;
|
||||
extern int gmsgLogo;
|
||||
extern int gmsgWeaponList;
|
||||
extern int gmsgAmmoX;
|
||||
//extern int gmsgDeathMsg;
|
||||
extern int gmsgDeathMsg;
|
||||
extern int gmsgScoreAttrib;
|
||||
extern int gmsgScoreInfo;
|
||||
extern int gmsgTeamInfo;
|
||||
//extern int gmsgTeamScore;
|
||||
//extern int gmsgGameMode;
|
||||
//extern int gmsgMOTD;
|
||||
//extern int gmsgServerName;
|
||||
extern int gmsgTeamScore;
|
||||
extern int gmsgGameMode;
|
||||
extern int gmsgMOTD;
|
||||
extern int gmsgServerName;
|
||||
extern int gmsgAmmoPickup;
|
||||
extern int gmsgItemPickup;
|
||||
//extern int gmsgHideWeapon;
|
||||
extern int gmsgHideWeapon;
|
||||
extern int gmsgSayText;
|
||||
extern int gmsgTextMsg;
|
||||
extern int gmsgSetFOV;
|
||||
@ -1058,28 +1085,28 @@ extern int gmsgBarTime;
|
||||
extern int gmsgReloadSound;
|
||||
extern int gmsgCrosshair;
|
||||
extern int gmsgNVGToggle;
|
||||
//extern int gmsgRadar;
|
||||
extern int gmsgRadar;
|
||||
extern int gmsgSpectator;
|
||||
//extern int gmsgVGUIMenu;
|
||||
extern int gmsgVGUIMenu;
|
||||
extern int gmsgCZCareer;
|
||||
//extern int gmsgCZCareerHUD;
|
||||
extern int gmsgCZCareerHUD;
|
||||
extern int gmsgTaskTime;
|
||||
//extern int gmsgTutorText;
|
||||
extern int gmsgTutorText;
|
||||
extern int gmsgTutorLine;
|
||||
//extern int gmsgShadowIdx;
|
||||
extern int gmsgShadowIdx;
|
||||
extern int gmsgTutorState;
|
||||
extern int gmsgTutorClose;
|
||||
//extern int gmsgAllowSpec;
|
||||
extern int gmsgAllowSpec;
|
||||
extern int gmsgBombDrop;
|
||||
//extern int gmsgBombPickup;
|
||||
extern int gmsgBombPickup;
|
||||
extern int gmsgHostagePos;
|
||||
//extern int gmsgHostageK;
|
||||
extern int gmsgHostageK;
|
||||
extern int gmsgGeigerRange;
|
||||
extern int gmsgSendCorpse;
|
||||
//extern int gmsgHLTV;
|
||||
//extern int gmsgSpecHealth;
|
||||
//extern int gmsgForceCam;
|
||||
//extern int gmsgADStop;
|
||||
extern int gmsgHLTV;
|
||||
extern int gmsgSpecHealth;
|
||||
extern int gmsgForceCam;
|
||||
extern int gmsgADStop;
|
||||
extern int gmsgReceiveW;
|
||||
extern int gmsgScenarioIcon;
|
||||
extern int gmsgBotVoice;
|
||||
@ -1089,9 +1116,9 @@ extern int gmsgLocation;
|
||||
extern int gmsgSpecHealth2;
|
||||
extern int gmsgBarTime2;
|
||||
extern int gmsgBotProgress;
|
||||
//extern int gmsgBrass;
|
||||
//extern int gmsgFog;
|
||||
//extern int gmsgShowTimer;
|
||||
extern int gmsgBrass;
|
||||
extern int gmsgFog;
|
||||
extern int gmsgShowTimer;
|
||||
|
||||
//NOBODY void player(entvars_t *pev);
|
||||
//NOBODY void weapon_shield(entvars_t *pev);
|
||||
@ -1128,15 +1155,15 @@ void LogAttack(CBasePlayer *pAttacker, CBasePlayer *pVictim, int teamAttack, int
|
||||
void packPlayerItem(CBasePlayer *pPlayer, CBasePlayerItem *pItem, bool packAmmo);
|
||||
bool CanSeeUseable(CBasePlayer *me, CBaseEntity *entity);
|
||||
NOBODY void FixPlayerCrouchStuck(edict_t *pPlayer);
|
||||
NOXREF BOOL IsSpawnPointValid(CBaseEntity *pPlayer, CBaseEntity *pSpot);
|
||||
NOBODY void InitZombieSpawns(void);
|
||||
NOBODY CBaseEntity *FindZombieSpawn(CBaseEntity *player, bool forceSpawn);
|
||||
NOBODY edict_t *EntSelectSpawnPoint(CBaseEntity *pPlayer);
|
||||
BOOL IsSpawnPointValid(CBaseEntity *pPlayer, CBaseEntity *pSpot);
|
||||
NOXREF void InitZombieSpawns(void);
|
||||
NOXREF CBaseEntity *FindZombieSpawn(CBaseEntity *player, bool forceSpawn);
|
||||
edict_t *EntSelectSpawnPoint(CBaseEntity *pPlayer);
|
||||
void SetScoreAttrib(CBasePlayer *dest, CBasePlayer *src);
|
||||
NOXREF CBaseEntity *FindEntityForward(CBaseEntity *pMe);
|
||||
float GetPlayerPitch(const edict_t *pEdict);
|
||||
float GetPlayerYaw(const edict_t *pEdict);
|
||||
int GetPlayerGaitsequence(edict_t *pEdict);
|
||||
int GetPlayerGaitsequence(const edict_t *pEdict);
|
||||
NOXREF const char *GetBuyStringForWeaponClass(int weaponClass);
|
||||
NOXREF bool IsPrimaryWeaponClass(int classId);
|
||||
NOXREF bool IsPrimaryWeaponId(int id);
|
||||
|
@ -45,13 +45,13 @@
|
||||
#define IMPLEMENT_SAVERESTORE(derivedClass,baseClass)\
|
||||
int derivedClass::Save(CSave &save)\
|
||||
{\
|
||||
if(!baseClass::Save(save))\
|
||||
if (!baseClass::Save(save))\
|
||||
return 0;\
|
||||
return save.WriteFields(#derivedClass, this, m_SaveData, ARRAYSIZE(m_SaveData));\
|
||||
}\
|
||||
int derivedClass::Restore(CRestore &restore)\
|
||||
{\
|
||||
if(!baseClass::Restore(restore))\
|
||||
if (!baseClass::Restore(restore))\
|
||||
return 0;\
|
||||
return restore.ReadFields(#derivedClass, this, m_SaveData, ARRAYSIZE(m_SaveData));\
|
||||
}
|
||||
@ -67,13 +67,13 @@
|
||||
#define IMPLEMENT_SAVERESTORE(derivedClass, baseClass)\
|
||||
int derivedClass::Save_(CSave &save)\
|
||||
{\
|
||||
if(!baseClass::Save(save))\
|
||||
if (!baseClass::Save(save))\
|
||||
return 0;\
|
||||
return save.WriteFields(#derivedClass, this, (*pm_SaveData), ARRAYSIZE(*pm_SaveData));\
|
||||
}\
|
||||
int derivedClass::Restore_(CRestore &restore)\
|
||||
{\
|
||||
if(!baseClass::Restore(restore))\
|
||||
if (!baseClass::Restore(restore))\
|
||||
return 0;\
|
||||
return restore.ReadFields(#derivedClass, this, (*pm_SaveData), ARRAYSIZE(*pm_SaveData));\
|
||||
}
|
||||
@ -228,7 +228,7 @@ public:
|
||||
NOBODY GLOBALESTATE EntityGetState(string_t globalname);
|
||||
int EntityInTable(string_t globalname)
|
||||
{
|
||||
if(Find(globalname) != NULL)
|
||||
if (Find(globalname) != NULL)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
@ -538,7 +538,7 @@ void SENTENCEG_Init(void)
|
||||
{
|
||||
// skip whitespace
|
||||
i = 0;
|
||||
while(buffer[i] && buffer[i] == ' ')
|
||||
while (buffer[i] && buffer[i] == ' ')
|
||||
i++;
|
||||
|
||||
if (!buffer[i])
|
||||
@ -796,7 +796,7 @@ void TEXTURETYPE_Init(void)
|
||||
{
|
||||
// skip whitespace
|
||||
i = 0;
|
||||
while(buffer[i] && isspace(buffer[i]))
|
||||
while (buffer[i] && isspace(buffer[i]))
|
||||
i++;
|
||||
|
||||
if (!buffer[i])
|
||||
@ -810,7 +810,7 @@ void TEXTURETYPE_Init(void)
|
||||
grgchTextureType[gcTextures] = toupper(buffer[i++]);
|
||||
|
||||
// skip whitespace
|
||||
while(buffer[i] && isspace(buffer[i]))
|
||||
while (buffer[i] && isspace(buffer[i]))
|
||||
i++;
|
||||
|
||||
if (!buffer[i])
|
||||
|
@ -207,16 +207,16 @@ private:
|
||||
/* <19dfe1> ../cstrike/dlls/triggers.cpp:293 */
|
||||
inline BOOL IsClone(void)
|
||||
{
|
||||
if(pev->spawnflags & SF_MULTIMAN_CLONE)
|
||||
if (pev->spawnflags & SF_MULTIMAN_CLONE)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
/* <19e4f3> ../cstrike/dlls/triggers.cpp:294 */
|
||||
inline BOOL ShouldClone(void)
|
||||
{
|
||||
if(IsClone())
|
||||
if (IsClone())
|
||||
return FALSE;
|
||||
if(pev->spawnflags & SF_MULTIMAN_THREAD)
|
||||
if (pev->spawnflags & SF_MULTIMAN_THREAD)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ int UTIL_SharedRandomLong(unsigned int seed, int low, int high)
|
||||
{
|
||||
unsigned int range = high - low + 1;
|
||||
U_Srand((unsigned int)(high + low + seed));
|
||||
if(range != 1)
|
||||
if (range != 1)
|
||||
{
|
||||
int rnum = U_Random();
|
||||
int offset = rnum % range;
|
||||
@ -187,7 +187,7 @@ float UTIL_SharedRandomFloat(unsigned int seed, float low, float high)
|
||||
U_Random();
|
||||
U_Random();
|
||||
|
||||
if(range)
|
||||
if (range)
|
||||
{
|
||||
int tensixrand = U_Random() & 0xFFFFu;
|
||||
float offset = (float)tensixrand / 0x10000u;
|
||||
@ -2421,7 +2421,7 @@ char UTIL_TextureHit(TraceResult *ptr, Vector vecSrc, Vector vecEnd)
|
||||
NOXREF int GetPlayerTeam(int index)
|
||||
{
|
||||
CBasePlayer *pPlayer = (CBasePlayer *)UTIL_PlayerByIndex(index);
|
||||
if(pPlayer)
|
||||
if (pPlayer)
|
||||
return pPlayer->m_iTeam;
|
||||
return 0;
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ inline EOFFSET OFFSET(const entvars_t *pev)
|
||||
/* <4631> ../cstrike/dlls/util.h:180 */
|
||||
inline entvars_t *VARS(edict_t *pent)
|
||||
{
|
||||
if(!pent)
|
||||
if (!pent)
|
||||
return NULL;
|
||||
|
||||
return &pent->v;
|
||||
|
@ -955,7 +955,7 @@ int CBasePlayerWeapon::DefaultReload(int iClipSize, int iAnim, float fDelay)
|
||||
/* <1d2607> ../cstrike/dlls/weapons.cpp:1389 */
|
||||
BOOL CBasePlayerWeapon::PlayEmptySound_(void)
|
||||
{
|
||||
if(m_iPlayEmptySound)
|
||||
if (m_iPlayEmptySound)
|
||||
{
|
||||
if (m_iId == WEAPON_USP || m_iId == WEAPON_GLOCK18 || m_iId == WEAPON_P228 || m_iId == WEAPON_DEAGLE || m_iId == WEAPON_ELITE || m_iId == WEAPON_FIVESEVEN)
|
||||
EMIT_SOUND(ENT(m_pPlayer->pev), CHAN_WEAPON, "weapons/dryfire_pistol.wav", 0.8, ATTN_NORM);
|
||||
|
@ -497,7 +497,7 @@ uchar16 *StripUnprintableWorker(uchar16 *pwch, bool *pbStrippedAny)
|
||||
uchar16 *pwchDest = pwch;
|
||||
*pbStrippedAny = 0;
|
||||
|
||||
while(*pwchSource)
|
||||
while (*pwchSource)
|
||||
{
|
||||
uchar16 cc = *pwchSource;
|
||||
if (*pwchSource >= 0x20u && !Q_IsUnprintableW(cc) && cc != 0x2026)
|
||||
|
@ -95,7 +95,7 @@ inline CBitVecAccessor::CBitVecAccessor(uint32 *pDWords, int iBit)
|
||||
/* <2d37d7> ../game_shared/bitvec.h:80 */
|
||||
inline void CBitVecAccessor::operator=(int val)
|
||||
{
|
||||
if(val)
|
||||
if (val)
|
||||
m_pDWords[m_iBit >> 5] |= (1 << (m_iBit & 31));
|
||||
else
|
||||
m_pDWords[m_iBit >> 5] &= ~(uint32)(1 << (m_iBit & 31));
|
||||
@ -118,7 +118,7 @@ inline int CBitVec<NUM_BITS>::GetNumBits()
|
||||
template<int NUM_BITS>
|
||||
inline CBitVec<NUM_BITS>::CBitVec()
|
||||
{
|
||||
for(int i = 0; i < NUM_DWORDS; i++)
|
||||
for (int i = 0; i < NUM_DWORDS; i++)
|
||||
m_DWords[i] = 0;
|
||||
}
|
||||
|
||||
@ -126,7 +126,7 @@ inline CBitVec<NUM_BITS>::CBitVec()
|
||||
template<int NUM_BITS>
|
||||
inline void CBitVec<NUM_BITS>::Init(int val)
|
||||
{
|
||||
for(int i = 0; i < GetNumBits(); i++)
|
||||
for (int i = 0; i < GetNumBits(); i++)
|
||||
{
|
||||
(*this)[i] = val;
|
||||
}
|
||||
@ -152,8 +152,8 @@ inline CBitVecAccessor CBitVec<NUM_BITS>::operator[](int i)
|
||||
template<int NUM_BITS>
|
||||
inline bool CBitVec<NUM_BITS>::operator==(CBitVec<NUM_BITS> const &other)
|
||||
{
|
||||
for(int i = 0; i < NUM_DWORDS; i++)
|
||||
if(m_DWords[i] != other.m_DWords[i])
|
||||
for (int i = 0; i < NUM_DWORDS; i++)
|
||||
if (m_DWords[i] != other.m_DWords[i])
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
@ -29,7 +29,7 @@ const float smokeRadius = 115.0f; ///< for smoke grenades
|
||||
/* <49f6d7> ../game_shared/bot/bot_manager.cpp:58 */
|
||||
NOBODY GameEventType NameToGameEvent(const char *name)
|
||||
{
|
||||
/*for(int i=0; GameEventName[i]; ++i)
|
||||
/*for (int i=0; GameEventName[i]; ++i)
|
||||
if (!Q_stricmp(GameEventName[i], name))
|
||||
return static_cast<GameEventType>(i);*/
|
||||
|
||||
@ -58,7 +58,7 @@ void CBotManager::StartFrame_(void)
|
||||
Vector edge, lastEdge;
|
||||
|
||||
ActiveGrenadeList::iterator iter = m_activeGrenadeList.begin();
|
||||
while(iter != m_activeGrenadeList.end())
|
||||
while (iter != m_activeGrenadeList.end())
|
||||
{
|
||||
ActiveGrenade *ag = *iter;
|
||||
|
||||
@ -78,7 +78,7 @@ void CBotManager::StartFrame_(void)
|
||||
|
||||
lastEdge = Vector(smokeRadius + pos->x, pos->y, pos->z);
|
||||
float angle;
|
||||
for(angle = 0.0f; angle <= 180.0f; angle += 22.5f)
|
||||
for (angle = 0.0f; angle <= 180.0f; angle += 22.5f)
|
||||
{
|
||||
edge.x = smokeRadius * BotCOS(angle) + pos->x;
|
||||
edge.y = pos->y;
|
||||
@ -90,7 +90,7 @@ void CBotManager::StartFrame_(void)
|
||||
}
|
||||
|
||||
lastEdge = Vector(pos->x, smokeRadius + pos->y, pos->z);
|
||||
for(angle = 0.0f; angle <= 180.0f; angle += 22.5f)
|
||||
for (angle = 0.0f; angle <= 180.0f; angle += 22.5f)
|
||||
{
|
||||
edge.x = pos->x;
|
||||
edge.y = smokeRadius * BotCOS(angle) + pos->y;
|
||||
@ -174,7 +174,7 @@ void CBotManager::AddGrenade(int type, CGrenade *grenade)
|
||||
/* <49f95a> ../game_shared/bot/bot_manager.cpp:267 */
|
||||
void CBotManager::RemoveGrenade(CGrenade *grenade)
|
||||
{
|
||||
for(ActiveGrenadeList::iterator iter = m_activeGrenadeList.begin(); iter != m_activeGrenadeList.end(); ++iter)
|
||||
for (ActiveGrenadeList::iterator iter = m_activeGrenadeList.begin(); iter != m_activeGrenadeList.end(); ++iter)
|
||||
{
|
||||
ActiveGrenade *ag = *iter;
|
||||
|
||||
@ -253,7 +253,7 @@ bool CBotManager::IsLineBlockedBySmoke(const Vector *from, const Vector *to)
|
||||
float sightLength = sightDir.NormalizeInPlace();
|
||||
|
||||
ActiveGrenadeList::iterator iter = m_activeGrenadeList.begin();
|
||||
while(iter != m_activeGrenadeList.end())
|
||||
while (iter != m_activeGrenadeList.end())
|
||||
{
|
||||
ActiveGrenade *ag = *iter;
|
||||
|
||||
|
@ -183,7 +183,7 @@ inline void BotProfile::Inherit(const BotProfile *parent, const BotProfile *base
|
||||
if (parent->m_weaponPreferenceCount != baseline->m_weaponPreferenceCount)
|
||||
{
|
||||
m_weaponPreferenceCount = parent->m_weaponPreferenceCount;
|
||||
for(int i = 0; i<parent->m_weaponPreferenceCount; i++)
|
||||
for (int i = 0; i<parent->m_weaponPreferenceCount; i++)
|
||||
m_weaponPreference[i] = parent->m_weaponPreference[i];
|
||||
}
|
||||
|
||||
|
@ -253,7 +253,7 @@ NOBODY bool UTIL_KickBotFromTeam(TeamName kickTeam)
|
||||
NOBODY bool UTIL_IsTeamAllBots(int team)
|
||||
{
|
||||
int botCount = 0;
|
||||
for(int i=1; i <= gpGlobals->maxClients; ++i)
|
||||
for (int i=1; i <= gpGlobals->maxClients; ++i)
|
||||
{
|
||||
CBasePlayer *player = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
|
||||
|
||||
@ -365,7 +365,7 @@ NOBODY void UTIL_ConstructBotNetName(char *name, int nameLength, const BotProfil
|
||||
/* <4adb6c> ../game_shared/bot/bot_util.cpp:440 */
|
||||
NOBODY bool UTIL_IsVisibleToTeam(const Vector &spot, int team, float maxRange)
|
||||
{
|
||||
for(int i = 1; i <= gpGlobals->maxClients; ++i)
|
||||
for (int i = 1; i <= gpGlobals->maxClients; ++i)
|
||||
{
|
||||
CBasePlayer *player = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
|
||||
|
||||
@ -529,7 +529,7 @@ void BotPrecache(void)
|
||||
/* <4ae1b1> ../game_shared/bot/bot_util.cpp:666 */
|
||||
void InitBotTrig(void)
|
||||
{
|
||||
for(int i = 0; i < COS_TABLE_SIZE; i++)
|
||||
for (int i = 0; i < COS_TABLE_SIZE; i++)
|
||||
{
|
||||
float_precision angle = 2.0f * M_PI * (float)i / (float)(COS_TABLE_SIZE - 1);
|
||||
cosTable[i] = cos( angle );
|
||||
|
@ -142,16 +142,16 @@ private:
|
||||
/* <14ed68> ../game_shared/bot/bot_util.h:224 */
|
||||
inline bool IsEntityValid(CBaseEntity *entity)
|
||||
{
|
||||
if(entity == NULL)
|
||||
if (entity == NULL)
|
||||
return false;
|
||||
|
||||
if(FNullEnt(entity->pev))
|
||||
if (FNullEnt(entity->pev))
|
||||
return false;
|
||||
|
||||
if(FStrEq(STRING(entity->pev->netname), ""))
|
||||
if (FStrEq(STRING(entity->pev->netname), ""))
|
||||
return false;
|
||||
|
||||
if(entity->pev->flags & FL_DORMANT)
|
||||
if (entity->pev->flags & FL_DORMANT)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@ -198,16 +198,16 @@ template <
|
||||
>
|
||||
bool ForEachPlayer(Functor &func)
|
||||
{
|
||||
for(int i = 1; i <= gpGlobals->maxClients; i++)
|
||||
for (int i = 1; i <= gpGlobals->maxClients; i++)
|
||||
{
|
||||
CBasePlayer *player = static_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
|
||||
if(!IsEntityValid((CBaseEntity *)player))
|
||||
if (!IsEntityValid((CBaseEntity *)player))
|
||||
continue;
|
||||
|
||||
if(!player->IsPlayer())
|
||||
if (!player->IsPlayer())
|
||||
continue;
|
||||
|
||||
if(func(player) == false)
|
||||
if (func(player) == false)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -407,7 +407,7 @@ inline bool IsWalkableTraceLineClear(Vector &from, Vector &to, unsigned int flag
|
||||
edict_t *ignore = NULL;
|
||||
Vector useFrom = from;
|
||||
|
||||
while(true)
|
||||
while (true)
|
||||
{
|
||||
UTIL_TraceLine(useFrom, to, ignore_monsters, ignore, &result);
|
||||
|
||||
|
@ -638,7 +638,7 @@ inline bool CNavArea::IsDegenerate(void) const
|
||||
inline CNavArea *CNavArea::GetAdjacentArea(NavDirType dir, int i) const
|
||||
{
|
||||
NavConnectList::const_iterator iter;
|
||||
for(iter = m_connect[dir].begin(); iter != m_connect[dir].end(); ++iter)
|
||||
for (iter = m_connect[dir].begin(); iter != m_connect[dir].end(); ++iter)
|
||||
{
|
||||
if (i == 0)
|
||||
return (*iter).area;
|
||||
@ -846,7 +846,7 @@ bool NavAreaBuildPath(CNavArea *startArea, CNavArea *goalArea, const Vector *goa
|
||||
*closestArea = startArea;
|
||||
float closestAreaDist = startArea->GetTotalCost();
|
||||
|
||||
while(!CNavArea::IsOpenListEmpty())
|
||||
while (!CNavArea::IsOpenListEmpty())
|
||||
{
|
||||
CNavArea *area = CNavArea::PopOpenList();
|
||||
if (area == goalArea)
|
||||
@ -875,7 +875,7 @@ bool NavAreaBuildPath(CNavArea *startArea, CNavArea *goalArea, const Vector *goa
|
||||
};
|
||||
int ladderTopDir;
|
||||
|
||||
while(true)
|
||||
while (true)
|
||||
{
|
||||
CNavArea *newArea;
|
||||
NavTraverseType how;
|
||||
@ -1014,7 +1014,7 @@ float NavAreaTravelDistance(CNavArea *startArea, CNavArea *endArea, CostFunctor
|
||||
return -1.0f;
|
||||
|
||||
float distance = 0.0f;
|
||||
for(CNavArea *area = endArea; area->GetParent(); area = area->GetParent())
|
||||
for (CNavArea *area = endArea; area->GetParent(); area = area->GetParent())
|
||||
{
|
||||
distance += (*area->GetCenter() - *area->GetParent()->GetCenter()).Length();
|
||||
}
|
||||
@ -1043,7 +1043,7 @@ float NavAreaTravelDistance(const Vector *startPos, CNavArea *startArea, const V
|
||||
CNavArea *area = goalArea->GetParent();
|
||||
float distance = (*goalPos - *area->GetCenter()).Length();
|
||||
|
||||
for(; area->GetParent(); area = area->GetParent())
|
||||
for (; area->GetParent(); area = area->GetParent())
|
||||
{
|
||||
distance += (*area->GetCenter() - *area->GetParent()->GetCenter()).Length();
|
||||
}
|
||||
@ -1098,16 +1098,16 @@ void SearchSurroundingAreas(CNavArea *startArea, const Vector *startPos, Functor
|
||||
startArea->SetParent(NULL);
|
||||
startArea->Mark();
|
||||
|
||||
while(!CNavArea::IsOpenListEmpty())
|
||||
while (!CNavArea::IsOpenListEmpty())
|
||||
{
|
||||
|
||||
CNavArea *area = CNavArea::PopOpenList();
|
||||
if (func(area))
|
||||
{
|
||||
for(int dir = 0; dir < NUM_DIRECTIONS; ++dir)
|
||||
for (int dir = 0; dir < NUM_DIRECTIONS; ++dir)
|
||||
{
|
||||
int count = area->GetAdjacentCount((NavDirType)dir);
|
||||
for(int i = 0; i < count; ++i)
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
CNavArea *adjArea = area->GetAdjacentArea((NavDirType)dir, i);
|
||||
AddAreaToOpenList(adjArea, area, startPos, maxRange);
|
||||
@ -1118,7 +1118,7 @@ void SearchSurroundingAreas(CNavArea *startArea, const Vector *startPos, Functor
|
||||
const NavLadderList *ladderList = area->GetLadderList(LADDER_UP);
|
||||
if (ladderList)
|
||||
{
|
||||
for(ladderIt = ladderList->begin(); ladderIt != ladderList->end(); ++ladderIt)
|
||||
for (ladderIt = ladderList->begin(); ladderIt != ladderList->end(); ++ladderIt)
|
||||
{
|
||||
const CNavLadder *ladder = *ladderIt;
|
||||
if (ladder->m_isDangling)
|
||||
@ -1134,7 +1134,7 @@ void SearchSurroundingAreas(CNavArea *startArea, const Vector *startPos, Functor
|
||||
ladderList = area->GetLadderList(LADDER_DOWN);
|
||||
if (ladderList)
|
||||
{
|
||||
for(ladderIt = ladderList->begin(); ladderIt != ladderList->end(); ++ladderIt)
|
||||
for (ladderIt = ladderList->begin(); ladderIt != ladderList->end(); ++ladderIt)
|
||||
{
|
||||
const CNavLadder *ladder = *ladderIt;
|
||||
AddAreaToOpenList(ladder->m_bottomArea, area, startPos, maxRange);
|
||||
@ -1149,7 +1149,7 @@ template <typename Functor>
|
||||
void ForAllAreas(Functor &func)
|
||||
{
|
||||
NavAreaList::iterator iter;
|
||||
for(iter = TheNavAreaList.begin(); iter != TheNavAreaList.end(); ++iter)
|
||||
for (iter = TheNavAreaList.begin(); iter != TheNavAreaList.end(); ++iter)
|
||||
{
|
||||
CNavArea *area = *iter;
|
||||
func(area);
|
||||
@ -1190,7 +1190,7 @@ CNavArea *FindMinimumCostArea(CNavArea *startArea, CostFunctor &costFunc)
|
||||
int cheapAreaSetCount = 0;
|
||||
|
||||
NavAreaList::iterator iter;
|
||||
for(iter = TheNavAreaList.begin(); iter != TheNavAreaList.end(); ++iter)
|
||||
for (iter = TheNavAreaList.begin(); iter != TheNavAreaList.end(); ++iter)
|
||||
{
|
||||
CNavArea *area = *iter;
|
||||
const Extent *extent = area->GetExtent();
|
||||
@ -1206,7 +1206,7 @@ CNavArea *FindMinimumCostArea(CNavArea *startArea, CostFunctor &costFunc)
|
||||
else
|
||||
{
|
||||
int expensive = 0;
|
||||
for(int i = 1; i < NUM_CHEAP_AREAS; i++)
|
||||
for (int i = 1; i < NUM_CHEAP_AREAS; i++)
|
||||
if (cheapAreaSet[i].cost > cheapAreaSet[expensive].cost)
|
||||
expensive = i;
|
||||
|
||||
@ -1227,7 +1227,7 @@ CNavArea *FindMinimumCostArea(CNavArea *startArea, CostFunctor &costFunc)
|
||||
int which = RANDOM_LONG(0, numAreas-1);
|
||||
|
||||
NavAreaList::iterator iter;
|
||||
for(iter = TheNavAreaList.begin(); iter != TheNavAreaList.end(); ++iter)
|
||||
for (iter = TheNavAreaList.begin(); iter != TheNavAreaList.end(); ++iter)
|
||||
if (which-- == 0)
|
||||
break;
|
||||
|
||||
|
@ -90,7 +90,7 @@ inline void CPerformanceCounter::InitializePerformanceCounter(void)
|
||||
highpart = (unsigned int)performanceFreq.HighPart;
|
||||
m_iLowShift = 0;
|
||||
|
||||
while(highpart || (lowpart > 2000000.0))
|
||||
while (highpart || (lowpart > 2000000.0))
|
||||
{
|
||||
m_iLowShift++;
|
||||
lowpart >>= 1;
|
||||
@ -116,7 +116,7 @@ inline double CPerformanceCounter::GetCurTime(void)
|
||||
|
||||
LARGE_INTEGER PerformanceCount;
|
||||
QueryPerformanceCounter(&PerformanceCount);
|
||||
if(!m_iLowShift)
|
||||
if (!m_iLowShift)
|
||||
temp = (unsigned int)PerformanceCount.LowPart;
|
||||
else
|
||||
temp = ((unsigned int)PerformanceCount.LowPart>>m_iLowShift)|((unsigned int)PerformanceCount.HighPart<<(32 - m_iLowShift));
|
||||
@ -142,7 +142,7 @@ inline double CPerformanceCounter::GetCurTime(void)
|
||||
if (m_flCurrentTime == m_flLastCurrentTime)
|
||||
{
|
||||
sametimecount++;
|
||||
if(sametimecount > 100000)
|
||||
if (sametimecount > 100000)
|
||||
{
|
||||
m_flCurrentTime += 1.0;
|
||||
sametimecount = 0;
|
||||
@ -160,7 +160,7 @@ inline double CPerformanceCounter::GetCurTime(void)
|
||||
static int secbase = 0;
|
||||
|
||||
gettimeofday(&tp,NULL);
|
||||
if(!secbase)
|
||||
if (!secbase)
|
||||
{
|
||||
secbase = tp.tv_sec;
|
||||
return (tp.tv_usec / 1000000.0);
|
||||
|
@ -39,7 +39,7 @@
|
||||
inline unsigned int ComputeSimpleChecksum(const unsigned char *dataPointer, int dataLength)
|
||||
{
|
||||
unsigned int checksum = 0;
|
||||
for(int i = 1; i <= dataLength; i++)
|
||||
for (int i = 1; i <= dataLength; i++)
|
||||
{
|
||||
checksum += (*dataPointer) * i;
|
||||
++dataPointer;
|
||||
|
@ -73,7 +73,7 @@ inline bool SteamFile::Read(void *data, int length)
|
||||
return false;
|
||||
|
||||
byte *readCursor = static_cast<byte *>(data);
|
||||
for(int i = 0; i < length; i++)
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
*readCursor++ = *m_cursor++;
|
||||
--m_bytesLeft;
|
||||
|
@ -83,7 +83,7 @@ void CVoiceGameMgr::Update(double frametime)
|
||||
// Only update periodically.
|
||||
m_UpdateInterval += frametime;
|
||||
|
||||
if(m_UpdateInterval >= UPDATE_INTERVAL)
|
||||
if (m_UpdateInterval >= UPDATE_INTERVAL)
|
||||
UpdateMasks();
|
||||
}
|
||||
|
||||
|
@ -197,13 +197,13 @@ FunctionHook g_FunctionHooks[] =
|
||||
{ 0x01DB0000, "AngleVectors", (size_t)&AngleVectors },
|
||||
|
||||
//{ 0x0, "AngleVectorsTranspose", (size_t)&AngleVectorsTranspose },
|
||||
//{ 0x0, "AngleMatrix", (size_t)&AngleMatrix },
|
||||
{ 0x01DB0200, "AngleMatrix", (size_t)&AngleMatrix },
|
||||
//{ 0x0, "AngleIMatrix", (size_t)&AngleIMatrix },
|
||||
//{ 0x0, "NormalizeAngles", (size_t)&NormalizeAngles },
|
||||
//{ 0x0, "InterpolateAngles", (size_t)&InterpolateAngles },
|
||||
//{ 0x0, "AngleBetweenVectors", (size_t)&AngleBetweenVectors },
|
||||
//{ 0x0, "VectorTransform", (size_t)&VectorTransform },
|
||||
//{ 0x0, "VectorCompare", (size_t)&VectorCompare },
|
||||
{ 0x01DB0610, "VectorCompare", (size_t)&VectorCompare },
|
||||
//{ 0x0, "VectorMA", (size_t)&VectorMA },
|
||||
//{ 0x01DB0680, "_DotProduct", (size_t)&_DotProduct }, // NOXREF
|
||||
//{ 0x01DB06A0, "_VectorSubtract", (size_t)&_VectorSubtract }, // NOXREF
|
||||
@ -268,7 +268,7 @@ FunctionHook g_FunctionHooks[] =
|
||||
//{ 0x01D64460, "CountTeamPlayers", (size_t)&CountTeamPlayers }, //extern c func
|
||||
//{ 0x0, "_Z15ProcessKickVoteP11CBasePlayerS0_", (size_t)&ProcessKickVote },
|
||||
//{ 0x0, "_Z17SelectDefaultTeamv", (size_t)&SelectDefaultTeam },
|
||||
//{ 0x0, "_Z15CheckStartMoneyv", (size_t)&CheckStartMoney },
|
||||
{ 0x01D649A0, "_Z15CheckStartMoneyv", (size_t)&CheckStartMoney },
|
||||
//{ 0x01D649F0, "_Z17ClientPutInServerP7edict_s", (size_t)&ClientPutInServer },
|
||||
//{ 0x0, "Q_strlen", (size_t)&Q_strlen_ },
|
||||
//{ 0x0, "_Z8Host_SayP7edict_si", (size_t)&Host_Say },
|
||||
@ -495,8 +495,8 @@ FunctionHook g_FunctionHooks[] =
|
||||
//CBaseToggle
|
||||
//virtual func
|
||||
{ 0x01DBB7D0, "_ZN11CBaseToggle8KeyValueEP14KeyValueData_s", mfunc_ptr_cast(&CBaseToggle::KeyValue_) },
|
||||
//{ 0x0, "_ZN11CBaseToggle4SaveER5CSave", mfunc_ptr_cast(&CBaseToggle::Save_) },
|
||||
///{ 0x0, "_ZN11CBaseToggle7RestoreER8CRestore", mfunc_ptr_cast(&CBaseToggle::Restore_) },
|
||||
{ 0x01DBB770, "_ZN11CBaseToggle4SaveER5CSave", mfunc_ptr_cast(&CBaseToggle::Save_) },
|
||||
{ 0x01DBB7A0, "_ZN11CBaseToggle7RestoreER8CRestore", mfunc_ptr_cast(&CBaseToggle::Restore_) },
|
||||
//{ 0x0, "_ZN11CBaseToggle14GetToggleStateEv", mfunc_ptr_cast(&CBaseToggle::GetToggleState_) },
|
||||
//{ 0x0, "_ZN11CBaseToggle8GetDelayEv", mfunc_ptr_cast(&CBaseToggle::GetDelay_) },
|
||||
//non-virtual func
|
||||
@ -590,10 +590,10 @@ FunctionHook g_FunctionHooks[] =
|
||||
//CBasePlayer
|
||||
//virtual func
|
||||
//{ 0x01DA5200, "_ZN11CBasePlayer5SpawnEv", mfunc_ptr_cast(&CBasePlayer::Spawn_) },
|
||||
//{ 0x01DA5E40, "_ZN11CBasePlayer8PrecacheEv", mfunc_ptr_cast(&CBasePlayer::Precache_) },
|
||||
//{ 0x0, "_ZN11CBasePlayer4SaveER5CSave", mfunc_ptr_cast(&CBasePlayer::Save_) },
|
||||
//{ 0x0, "_ZN11CBasePlayer7RestoreER8CRestore", mfunc_ptr_cast(&CBasePlayer::Restore_) },
|
||||
//{ 0x0, "_ZN11CBasePlayer10ObjectCapsEv", mfunc_ptr_cast(&CBasePlayer::ObjectCaps_) },
|
||||
{ 0x01DA5E40, "_ZN11CBasePlayer8PrecacheEv", mfunc_ptr_cast(&CBasePlayer::Precache_) },
|
||||
{ 0x01DA5EE0, "_ZN11CBasePlayer4SaveER5CSave", mfunc_ptr_cast(&CBasePlayer::Save_) },
|
||||
{ 0x01DA6080, "_ZN11CBasePlayer7RestoreER8CRestore", mfunc_ptr_cast(&CBasePlayer::Restore_) },
|
||||
{ 0x01D210A0, "_ZN11CBasePlayer10ObjectCapsEv", mfunc_ptr_cast(&CBasePlayer::ObjectCaps_) },
|
||||
{ 0x01DA3550, "_ZN11CBasePlayer8ClassifyEv", mfunc_ptr_cast(&CBasePlayer::Classify_) },
|
||||
{ 0x01D9BE00, "_ZN11CBasePlayer11TraceAttackEP9entvars_sf6VectorP11TraceResulti", mfunc_ptr_cast(&CBasePlayer::TraceAttack_) },
|
||||
//{ 0x0, "_ZN11CBasePlayer10TakeDamageEP9entvars_sS1_fi", mfunc_ptr_cast(&CBasePlayer::TakeDamage_) },
|
||||
@ -617,13 +617,13 @@ FunctionHook g_FunctionHooks[] =
|
||||
//{ 0x01D21060, "_ZN11CBasePlayer17ShouldFadeOnDeathEv", mfunc_ptr_cast(&CBasePlayer::ShouldFadeOnDeath_) },
|
||||
{ 0x01DA9CB0, "_ZN11CBasePlayer13ResetMaxSpeedEv", mfunc_ptr_cast(&CBasePlayer::ResetMaxSpeed_) },
|
||||
//{ 0x0, "_ZN11CBasePlayer4JumpEv", mfunc_ptr_cast(&CBasePlayer::Jump_) },
|
||||
//{ 0x01DA3530, "_ZN11CBasePlayer4DuckEv", mfunc_ptr_cast(&CBasePlayer::Duck_) },
|
||||
//{ 0x0, "_ZN11CBasePlayer8PreThinkEv", mfunc_ptr_cast(&CBasePlayer::PreThink_) },
|
||||
{ 0x01DA3530, "_ZN11CBasePlayer4DuckEv", mfunc_ptr_cast(&CBasePlayer::Duck_) },
|
||||
//{ 0x01DA3850, "_ZN11CBasePlayer8PreThinkEv", mfunc_ptr_cast(&CBasePlayer::PreThink_) },
|
||||
//{ 0x01DA4610, "_ZN11CBasePlayer9PostThinkEv", mfunc_ptr_cast(&CBasePlayer::PostThink_) },
|
||||
{ 0x01D9BD80, "_ZN11CBasePlayer14GetGunPositionEv", mfunc_ptr_cast(&CBasePlayer::GetGunPosition_) },
|
||||
//{ 0x0, "_ZN11CBasePlayer5IsBotEv", mfunc_ptr_cast(&CBasePlayer::IsBot_) },
|
||||
//{ 0x01DA8F90, "_ZN11CBasePlayer16UpdateClientDataEv", mfunc_ptr_cast(&CBasePlayer::UpdateClientData_) },
|
||||
//{ 0x01DA7020, "_ZN11CBasePlayer15ImpulseCommandsEv", mfunc_ptr_cast(&CBasePlayer::ImpulseCommands_) }, // NOXREF
|
||||
{ 0x01DA7020, "_ZN11CBasePlayer15ImpulseCommandsEv", mfunc_ptr_cast(&CBasePlayer::ImpulseCommands_) },
|
||||
{ 0x01DA2490, "_ZN11CBasePlayer12RoundRespawnEv", mfunc_ptr_cast(&CBasePlayer::RoundRespawn_) },
|
||||
{ 0x01DA9DC0, "_ZN11CBasePlayer16GetAutoaimVectorEf", mfunc_ptr_cast(&CBasePlayer::GetAutoaimVector_) },
|
||||
{ 0x01DAA220, "_ZN11CBasePlayer5BlindEfffi", mfunc_ptr_cast(&CBasePlayer::Blind_) },
|
||||
@ -652,9 +652,9 @@ FunctionHook g_FunctionHooks[] =
|
||||
{ 0x01D9B9B0, "_ZN11CBasePlayer4PainEib", mfunc_ptr_cast(&CBasePlayer::Pain) },
|
||||
{ 0x01D9F410, "_ZN11CBasePlayer9IsBombGuyEv", mfunc_ptr_cast(&CBasePlayer::IsBombGuy) },
|
||||
{ 0x01DACC30, "_ZNK11CBasePlayer19IsLookingAtPositionEPK6Vectorf", mfunc_ptr_cast(&CBasePlayer::IsLookingAtPosition) },
|
||||
//{ 0x01DA6310, "_ZN11CBasePlayer5ResetEv", mfunc_ptr_cast(&CBasePlayer::Reset) },
|
||||
{ 0x01DA6310, "_ZN11CBasePlayer5ResetEv", mfunc_ptr_cast(&CBasePlayer::Reset) },
|
||||
{ 0x01DA5F10, "_ZN11CBasePlayer23SetScoreboardAttributesEPS_", mfunc_ptr_cast(&CBasePlayer::SetScoreboardAttributes) },
|
||||
//{ 0x0, "_ZN11CBasePlayer10RenewItemsEv", mfunc_ptr_cast(&CBasePlayer::RenewItems) },
|
||||
//{ 0x01DA6070, "_ZN11CBasePlayer10RenewItemsEv", mfunc_ptr_cast(&CBasePlayer::RenewItems) }, // NOXREF
|
||||
{ 0x01D9D630, "_ZN11CBasePlayer19PackDeadPlayerItemsEv", mfunc_ptr_cast(&CBasePlayer::PackDeadPlayerItems) },
|
||||
{ 0x01D9DAD0, "_ZN11CBasePlayer16GiveDefaultItemsEv", mfunc_ptr_cast(&CBasePlayer::GiveDefaultItems) },
|
||||
{ 0x01D9DD60, "_ZN11CBasePlayer14RemoveAllItemsEi", mfunc_ptr_cast(&CBasePlayer::RemoveAllItems) },
|
||||
@ -717,7 +717,7 @@ FunctionHook g_FunctionHooks[] =
|
||||
//{ 0x01DA6920, "_ZN11CBasePlayer10HasWeaponsEv", mfunc_ptr_cast(&CBasePlayer::HasWeapons) }, // NOXREF
|
||||
//{ 0x01DA6940, "_ZN11CBasePlayer14SelectPrevItemEi", mfunc_ptr_cast(&CBasePlayer::SelectPrevItem) }, // NOXREF
|
||||
//{ 0x01DA6470, "_ZN11CBasePlayer14SelectNextItemEi", mfunc_ptr_cast(&CBasePlayer::SelectNextItem) }, // NOXREF
|
||||
//{ 0x01DA65E0, "_ZN11CBasePlayer10SelectItemEPKc", mfunc_ptr_cast(&CBasePlayer::SelectItem) },
|
||||
{ 0x01DA65E0, "_ZN11CBasePlayer10SelectItemEPKc", mfunc_ptr_cast(&CBasePlayer::SelectItem) },
|
||||
{ 0x01DA67A0, "_ZN11CBasePlayer14SelectLastItemEv", mfunc_ptr_cast(&CBasePlayer::SelectLastItem) },
|
||||
//{ 0x01DA8BB0, "_ZN11CBasePlayer12ItemPreFrameEv", mfunc_ptr_cast(&CBasePlayer::ItemPreFrame) }, // NOXREF
|
||||
//{ 0x01DA8BE0, "_ZN11CBasePlayer13ItemPostFrameEv", mfunc_ptr_cast(&CBasePlayer::ItemPostFrame) }, // NOXREF
|
||||
@ -735,7 +735,7 @@ FunctionHook g_FunctionHooks[] =
|
||||
{ 0x01DA14D0, "_ZN11CBasePlayer9MenuPrintEPS_PKc", mfunc_ptr_cast(&CBasePlayer::MenuPrint) },
|
||||
//{ 0x01DA11F0, "_ZN11CBasePlayer9ResetMenuEv", mfunc_ptr_cast(&CBasePlayer::ResetMenu) }, // NOXREF
|
||||
{ 0x01DA1240, "_ZN11CBasePlayer14SyncRoundTimerEv", mfunc_ptr_cast(&CBasePlayer::SyncRoundTimer) },
|
||||
//{ 0x0, "_ZN11CBasePlayer15CheckSuitUpdateEv", mfunc_ptr_cast(&CBasePlayer::CheckSuitUpdate) },
|
||||
//{ 0x01DA4220, "_ZN11CBasePlayer15CheckSuitUpdateEv", mfunc_ptr_cast(&CBasePlayer::CheckSuitUpdate) },
|
||||
{ 0x01DA43E0, "_ZN11CBasePlayer13SetSuitUpdateEPcii", mfunc_ptr_cast(&CBasePlayer::SetSuitUpdate) }, // NOXREF
|
||||
//{ 0x01DA4170, "_ZN11CBasePlayer19UpdateGeigerCounterEv", mfunc_ptr_cast(&CBasePlayer::UpdateGeigerCounter) }, // NOXREF
|
||||
//{ 0x0, "_ZN11CBasePlayer20CheckTimeBasedDamageEv", mfunc_ptr_cast(&CBasePlayer::CheckTimeBasedDamage) },
|
||||
@ -745,7 +745,7 @@ FunctionHook g_FunctionHooks[] =
|
||||
{ 0x01DA8C60, "_ZN11CBasePlayer13AmmoInventoryEi", mfunc_ptr_cast(&CBasePlayer::AmmoInventory) },
|
||||
//{ 0x01DAA150, "_ZN11CBasePlayer12ResetAutoaimEv", mfunc_ptr_cast(&CBasePlayer::ResetAutoaim) }, // NOXREF
|
||||
//{ 0x01DAA120, "_ZN11CBasePlayer17AutoaimDeflectionER6Vectorff", mfunc_ptr_cast(&CBasePlayer::AutoaimDeflection) }, // NOXREF
|
||||
//{ 0x01DA6FD0, "_ZN11CBasePlayer20ForceClientDllUpdateEv", mfunc_ptr_cast(&CBasePlayer::ForceClientDllUpdate) },
|
||||
{ 0x01DA6FD0, "_ZN11CBasePlayer20ForceClientDllUpdateEv", mfunc_ptr_cast(&CBasePlayer::ForceClientDllUpdate) },
|
||||
//{ 0x0, "_ZN11CBasePlayer12DeathMessageEP9entvars_s", mfunc_ptr_cast(&CBasePlayer::DeathMessage) },
|
||||
{ 0x01DAA1E0, "_ZN11CBasePlayer20SetCustomDecalFramesEi", mfunc_ptr_cast(&CBasePlayer::SetCustomDecalFrames) },
|
||||
//{ 0x01DAA210, "_ZN11CBasePlayer20GetCustomDecalFramesEv", mfunc_ptr_cast(&CBasePlayer::GetCustomDecalFrames) }, // NOXREF
|
||||
@ -806,7 +806,7 @@ FunctionHook g_FunctionHooks[] =
|
||||
{ 0x01DAEA40, "_ZN11CBasePlayer17IsObservingPlayerEPS_", mfunc_ptr_cast(&CBasePlayer::IsObservingPlayer) },
|
||||
//{ 0x0, "_ZNK11CBasePlayer22CanSwitchObserverModesEv", mfunc_ptr_cast(&CBasePlayer::CanSwitchObserverModes) },
|
||||
//{ 0x0, "_ZN11CBasePlayer7IntenseEv", mfunc_ptr_cast(&CBasePlayer::Intense) },
|
||||
//{ 0x01D9AB20, "_Z16LinkUserMessagesv", (size_t)&LinkUserMessages },
|
||||
{ 0x01D9AB20, "_Z16LinkUserMessagesv", (size_t)&LinkUserMessages },
|
||||
{ 0x01D9B0F0, "_Z18WriteSigonMessagesv", (size_t)&WriteSigonMessages },
|
||||
{ 0x01D9B280, "_Z14SendItemStatusP11CBasePlayer", (size_t)&SendItemStatus },
|
||||
{ 0x01D9D8A0, "_ZL14GetCSModelNamei", (size_t)&GetCSModelName },
|
||||
@ -819,9 +819,9 @@ FunctionHook g_FunctionHooks[] =
|
||||
{ 0x01DA3110, "_ZL13CanSeeUseableP11CBasePlayerP11CBaseEntity_isra_13", (size_t)&CanSeeUseable },
|
||||
//{ 0x01DA34E0, "_Z20FixPlayerCrouchStuckP7edict_s", (size_t)&FixPlayerCrouchStuck },
|
||||
//{ 0x01DA4A90, "_Z17IsSpawnPointValidP11CBaseEntityS0_", (size_t)&IsSpawnPointValid }, // NOXREF
|
||||
//{ 0x01DA4B10, "_Z16InitZombieSpawnsv", (size_t)&InitZombieSpawns }, // NOXREF
|
||||
//{ 0x01DA4B20, "_Z16InitZombieSpawnsv", (size_t)&InitZombieSpawns }, // NOXREF
|
||||
//{ 0x01DA4BC0, "_Z15FindZombieSpawnP11CBaseEntityb", (size_t)&FindZombieSpawn }, // NOXREF
|
||||
//{ 0x01DA4BD0, "_Z19EntSelectSpawnPointP11CBaseEntity", (size_t)&EntSelectSpawnPoint },
|
||||
{ 0x01DA4BD0, "_Z19EntSelectSpawnPointP11CBaseEntity", (size_t)&EntSelectSpawnPoint },
|
||||
|
||||
#ifdef _WIN32
|
||||
{ 0x01DA5180, "", (size_t)&SetScoreAttrib },
|
||||
@ -2485,8 +2485,8 @@ FunctionHook g_FunctionHooks[] =
|
||||
{ 0x01D909E0, "_ZN18CHalfLifeMultiplay19FShouldSwitchWeaponEP11CBasePlayerP15CBasePlayerItem", mfunc_ptr_cast(&CHalfLifeMultiplay::FShouldSwitchWeapon_) },
|
||||
{ 0x01D90A70, "_ZN18CHalfLifeMultiplay17GetNextBestWeaponEP11CBasePlayerP15CBasePlayerItem", mfunc_ptr_cast(&CHalfLifeMultiplay::GetNextBestWeapon_) },
|
||||
{ 0x01D909B0, "_ZN18CHalfLifeMultiplay13IsMultiplayerEv", mfunc_ptr_cast(&CHalfLifeMultiplay::IsMultiplayer_) },
|
||||
//{ 0x01D909C0, "_ZN18CHalfLifeMultiplay12IsDeathmatchEv", mfunc_ptr_cast(&CHalfLifeMultiplay::IsDeathmatch_) },
|
||||
//{ 0x01D909D0, "_ZN18CHalfLifeMultiplay6IsCoOpEv", mfunc_ptr_cast(&CHalfLifeMultiplay::IsCoOp_) },
|
||||
{ 0x01D909C0, "_ZN18CHalfLifeMultiplay12IsDeathmatchEv", mfunc_ptr_cast(&CHalfLifeMultiplay::IsDeathmatch_) },
|
||||
{ 0x01D909D0, "_ZN18CHalfLifeMultiplay6IsCoOpEv", mfunc_ptr_cast(&CHalfLifeMultiplay::IsCoOp_) },
|
||||
//{ 0x0, "_ZN18CHalfLifeMultiplay15ClientConnectedEP7edict_sPKcS3_Pc", mfunc_ptr_cast(&CHalfLifeMultiplay::ClientConnected_) },
|
||||
//{ 0x01D90BC0, "_ZN18CHalfLifeMultiplay7InitHUDEP11CBasePlayer", mfunc_ptr_cast(&CHalfLifeMultiplay::InitHUD_) },
|
||||
//{ 0x0, "_ZN18CHalfLifeMultiplay18ClientDisconnectedEP7edict_s", mfunc_ptr_cast(&CHalfLifeMultiplay::ClientDisconnected_) },
|
||||
@ -3420,20 +3420,20 @@ FunctionHook g_FunctionHooks[] =
|
||||
//{ 0x0, "_Z11SetBlendingPvP9entvars_sif", (size_t)&SetBlending },
|
||||
//{ 0x0, "_Z14FindTransitionPviiPi", (size_t)&FindTransition },
|
||||
//{ 0x0, "_Z12SetBodygroupPvP9entvars_sii", (size_t)&SetBodygroup },
|
||||
//{ 0x0, "_Z12GetBodygroupPvP9entvars_si", (size_t)&GetBodygroup },
|
||||
//{ 0x01D5B080, "Server_GetBlendingInterface", (size_t)&Server_GetBlendingInterface },
|
||||
{ 0x01D5B0E0, "_Z15AngleQuaternionPfS_", (size_t)&AngleQuaternion }, /// TODO: FIXME CZERO!!! Test demo czer-testsmoke-1.bin
|
||||
//{ 0x0, "_Z15QuaternionSlerpPfS_fS_", (size_t)&QuaternionSlerp },
|
||||
//{ 0x0, "_Z16QuaternionMatrixPfPA4_f", (size_t)&QuaternionMatrix },
|
||||
//{ 0x0, "_Z13StudioGetAnimP7model_sP16mstudioseqdesc_t", (size_t)&StudioGetAnim },
|
||||
//{ 0x0, "_Z15LookupAnimationP11studiohdr_tP7model_sP16mstudioseqdesc_ti", (size_t)&LookupAnimation },
|
||||
//{ 0x0, "_Z17StudioCalcBoneAdjfPfPKhS1_h", (size_t)&StudioCalcBoneAdj },
|
||||
//{ 0x0, "_Z23StudioCalcBoneQuaterionifP13mstudiobone_tP13mstudioanim_tPfS3_", (size_t)&StudioCalcBoneQuaterion },
|
||||
//{ 0x0, "_Z22StudioCalcBonePositionifP13mstudiobone_tP13mstudioanim_tPfS3_", (size_t)&StudioCalcBonePosition },
|
||||
//{ 0x0, "_Z16StudioSlerpBonesPA4_fPA3_fS0_S2_f", (size_t)&StudioSlerpBones },
|
||||
//{ 0x0, "_Z19StudioCalcRotationsP13mstudiobone_tPiiPfPA3_fPA4_fP16mstudioseqdesc_tP13mstudioanim_tff", (size_t)&StudioCalcRotations },
|
||||
//{ 0x0, "_Z16ConcatTransformsPA4_fS0_S0_", (size_t)&ConcatTransforms },
|
||||
//{ 0x0, "_Z19SV_StudioSetupBonesP7model_sfiPKfS2_PKhS4_iPK7edict_s", (size_t)&SV_StudioSetupBones },
|
||||
{ 0x01D5B020, "_Z12GetBodygroupPvP9entvars_si", (size_t)&GetBodygroup },
|
||||
{ 0x01D5B080, "Server_GetBlendingInterface", (size_t)&Server_GetBlendingInterface },
|
||||
{ 0x01D5B0E0, "_Z15AngleQuaternionPfS_", (size_t)&AngleQuaternion },
|
||||
{ 0x01D5B190, "_Z15QuaternionSlerpPfS_fS_", (size_t)&QuaternionSlerp },
|
||||
//{ 0x01D5B350, "_Z16QuaternionMatrixPfPA4_f", (size_t)&QuaternionMatrix },
|
||||
{ 0x01D5B430, "_Z13StudioGetAnimP7model_sP16mstudioseqdesc_t", (size_t)&StudioGetAnim },
|
||||
//{ 0x01D5B4C0, "_Z15LookupAnimationP11studiohdr_tP7model_sP16mstudioseqdesc_ti", (size_t)&LookupAnimation }, // NOXREF
|
||||
{ 0x01D5B500, "_Z17StudioCalcBoneAdjfPfPKhS1_h", (size_t)&StudioCalcBoneAdj },
|
||||
{ 0x01D5B720, "_Z23StudioCalcBoneQuaterionifP13mstudiobone_tP13mstudioanim_tPfS3_", (size_t)&StudioCalcBoneQuaterion },
|
||||
{ 0x01D5B8E0, "_Z22StudioCalcBonePositionifP13mstudiobone_tP13mstudioanim_tPfS3_", (size_t)&StudioCalcBonePosition },
|
||||
{ 0x01D5BA20, "_Z16StudioSlerpBonesPA4_fPA3_fS0_S2_f", (size_t)&StudioSlerpBones },
|
||||
//{ 0x01D5BB50, "_Z19StudioCalcRotationsP13mstudiobone_tPiiPfPA3_fPA4_fP16mstudioseqdesc_tP13mstudioanim_tff", (size_t)&StudioCalcRotations }, // NOXREF
|
||||
{ 0x01D5BBE0, "_Z16ConcatTransformsPA4_fS0_S0_", (size_t)&ConcatTransforms },
|
||||
//{ 0x01D5BD20, "_Z19SV_StudioSetupBonesP7model_sfiPKfS2_PKhS4_iPK7edict_s", (size_t)&SV_StudioSetupBones },
|
||||
|
||||
#endif // Animation_Region
|
||||
|
||||
@ -5177,6 +5177,8 @@ AddressRef g_FunctionRefs[] =
|
||||
|
||||
{ 0x01D6EEB0, "_ZN4CGib15SpawnRandomGibsEP9entvars_sii", (size_t)&pCGib__SpawnRandomGibs },
|
||||
|
||||
{ 0x01D5B350, "_Z16QuaternionMatrixPfPA4_f", (size_t)&pQuaternionMatrix },
|
||||
|
||||
#endif // Function_References_Region
|
||||
{ NULL, NULL, NULL }
|
||||
};
|
||||
@ -5280,30 +5282,30 @@ AddressRef g_DataRefs[] =
|
||||
{ 0x01E635A0, "gmsgShake", (size_t)&pgmsgShake },
|
||||
{ 0x01E635A4, "gmsgFade", (size_t)&pgmsgFade },
|
||||
{ 0x01E635A8, "gmsgFlashlight", (size_t)&pgmsgFlashlight },
|
||||
//{ 0x0, "gmsgFlashBattery", (size_t)&pgmsgFlashBattery },
|
||||
//{ 0x0, "gmsgResetHUD", (size_t)&pgmsgResetHUD },
|
||||
//{ 0x0, "gmsgInitHUD", (size_t)&pgmsgInitHUD },
|
||||
//{ 0x0, "gmsgViewMode", (size_t)&pgmsgViewMode },
|
||||
//{ 0x01E635BC, "gmsgShowGameTitle", (size_t)&pgmsgShowGameTitle },
|
||||
{ 0x01E635AC, "gmsgFlashBattery", (size_t)&pgmsgFlashBattery },
|
||||
{ 0x01E635B0, "gmsgResetHUD", (size_t)&pgmsgResetHUD },
|
||||
{ 0x01E635B4, "gmsgInitHUD", (size_t)&pgmsgInitHUD },
|
||||
{ 0x01E635B8, "gmsgViewMode", (size_t)&pgmsgViewMode },
|
||||
{ 0x01E635BC, "gmsgShowGameTitle", (size_t)&pgmsgShowGameTitle },
|
||||
{ 0x01E635C0, "gmsgCurWeapon", (size_t)&pgmsgCurWeapon },
|
||||
//{ 0x0, "gmsgHealth", (size_t)&pgmsgHealth },
|
||||
//{ 0x0, "gmsgDamage", (size_t)&pgmsgDamage },
|
||||
//{ 0x0, "gmsgBattery", (size_t)&pgmsgBattery },
|
||||
//{ 0x0, "gmsgTrain", (size_t)&pgmsgTrain },
|
||||
{ 0x01E635C4, "gmsgHealth", (size_t)&pgmsgHealth },
|
||||
{ 0x01E635C8, "gmsgDamage", (size_t)&pgmsgDamage },
|
||||
{ 0x01E635CC, "gmsgBattery", (size_t)&pgmsgBattery },
|
||||
{ 0x01E635D0, "gmsgTrain", (size_t)&pgmsgTrain },
|
||||
{ 0x01E635D4, "gmsgLogo", (size_t)&pgmsgLogo },
|
||||
{ 0x01E635D8, "gmsgWeaponList", (size_t)&pgmsgWeaponList },
|
||||
{ 0x01E635DC, "gmsgAmmoX", (size_t)&pgmsgAmmoX },
|
||||
//{ 0x0, "gmsgDeathMsg", (size_t)&pgmsgDeathMsg },
|
||||
{ 0x01E635E8, "gmsgDeathMsg", (size_t)&pgmsgDeathMsg },
|
||||
{ 0x01E635EC, "gmsgScoreAttrib", (size_t)&pgmsgScoreAttrib },
|
||||
{ 0x01E635F0, "gmsgScoreInfo", (size_t)&pgmsgScoreInfo },
|
||||
{ 0x01E635F4, "gmsgTeamInfo", (size_t)&pgmsgTeamInfo },
|
||||
//{ 0x0, "gmsgTeamScore", (size_t)&pgmsgTeamScore },
|
||||
//{ 0x0, "gmsgGameMode", (size_t)&pgmsgGameMode },
|
||||
//{ 0x0, "gmsgMOTD", (size_t)&pgmsgMOTD },
|
||||
//{ 0x0, "gmsgServerName", (size_t)&pgmsgServerName },
|
||||
{ 0x01E635F8, "gmsgTeamScore", (size_t)&pgmsgTeamScore },
|
||||
{ 0x01E635FC, "gmsgGameMode", (size_t)&pgmsgGameMode },
|
||||
{ 0x01E63600, "gmsgMOTD", (size_t)&pgmsgMOTD },
|
||||
{ 0x01E63604, "gmsgServerName", (size_t)&pgmsgServerName },
|
||||
{ 0x01E63608, "gmsgAmmoPickup", (size_t)&pgmsgAmmoPickup },
|
||||
{ 0x01E63610, "gmsgItemPickup", (size_t)&pgmsgItemPickup },
|
||||
//{ 0x0, "gmsgHideWeapon", (size_t)&pgmsgHideWeapon },
|
||||
{ 0x01E63614, "gmsgHideWeapon", (size_t)&pgmsgHideWeapon },
|
||||
{ 0x01E63618, "gmsgSayText", (size_t)&pgmsgSayText },
|
||||
{ 0x01E6361C, "gmsgTextMsg", (size_t)&pgmsgTextMsg },
|
||||
{ 0x01E63620, "gmsgSetFOV", (size_t)&pgmsgSetFOV },
|
||||
@ -5320,28 +5322,28 @@ AddressRef g_DataRefs[] =
|
||||
{ 0x01E6364C, "gmsgReloadSound", (size_t)&pgmsgReloadSound },
|
||||
{ 0x01E63650, "gmsgCrosshair", (size_t)&pgmsgCrosshair },
|
||||
{ 0x01E63654, "gmsgNVGToggle", (size_t)&pgmsgNVGToggle },
|
||||
//{ 0x0, "gmsgRadar", (size_t)&pgmsgRadar },
|
||||
{ 0x01E63658, "gmsgRadar", (size_t)&pgmsgRadar },
|
||||
{ 0x01E6365C, "gmsgSpectator", (size_t)&pgmsgSpectator },
|
||||
//{ 0x0, "gmsgVGUIMenu", (size_t)&pgmsgVGUIMenu },
|
||||
{ 0x01E63660, "gmsgVGUIMenu", (size_t)&pgmsgVGUIMenu },
|
||||
{ 0x01E63664, "gmsgCZCareer", (size_t)&pgmsgCZCareer },
|
||||
//{ 0x0, "gmsgCZCareerHUD", (size_t)&pgmsgCZCareerHUD },
|
||||
{ 0x01E63668, "gmsgCZCareerHUD", (size_t)&pgmsgCZCareerHUD },
|
||||
{ 0x01E6366C, "gmsgTaskTime", (size_t)&pgmsgTaskTime },
|
||||
//{ 0x0, "gmsgTutorText", (size_t)&pgmsgTutorText },
|
||||
{ 0x01E63670, "gmsgTutorText", (size_t)&pgmsgTutorText },
|
||||
{ 0x01E63674, "gmsgTutorLine", (size_t)&pgmsgTutorLine },
|
||||
//{ 0x0, "gmsgShadowIdx", (size_t)&pgmsgShadowIdx },
|
||||
{ 0x01E63678, "gmsgShadowIdx", (size_t)&pgmsgShadowIdx },
|
||||
{ 0x01E6367C, "gmsgTutorState", (size_t)&pgmsgTutorState },
|
||||
{ 0x01E63680, "gmsgTutorClose", (size_t)&pgmsgTutorClose },
|
||||
//{ 0x0, "gmsgAllowSpec", (size_t)&pgmsgAllowSpec },
|
||||
{ 0x01E63684, "gmsgAllowSpec", (size_t)&pgmsgAllowSpec },
|
||||
{ 0x01E63688, "gmsgBombDrop", (size_t)&pgmsgBombDrop },
|
||||
//{ 0x0, "gmsgBombPickup", (size_t)&pgmsgBombPickup },
|
||||
{ 0x01E6368C, "gmsgBombPickup", (size_t)&pgmsgBombPickup },
|
||||
{ 0x01E63690, "gmsgHostagePos", (size_t)&pgmsgHostagePos },
|
||||
//{ 0x0, "gmsgHostageK", (size_t)&pgmsgHostageK },
|
||||
{ 0x01E63694, "gmsgHostageK", (size_t)&pgmsgHostageK },
|
||||
{ 0x01E63698, "gmsgGeigerRange", (size_t)&pgmsgGeigerRange },
|
||||
{ 0x01E6369C, "gmsgSendCorpse", (size_t)&pgmsgSendCorpse },
|
||||
//{ 0x0, "gmsgHLTV", (size_t)&pgmsgHLTV },
|
||||
//{ 0x0, "gmsgSpecHealth", (size_t)&pgmsgSpecHealth },
|
||||
//{ 0x0, "gmsgForceCam", (size_t)&pgmsgForceCam },
|
||||
//{ 0x0, "gmsgADStop", (size_t)&pgmsgADStop },
|
||||
{ 0x01E636A0, "gmsgHLTV", (size_t)&pgmsgHLTV },
|
||||
{ 0x01E636A4, "gmsgSpecHealth", (size_t)&pgmsgSpecHealth },
|
||||
{ 0x01E636A8, "gmsgForceCam", (size_t)&pgmsgForceCam },
|
||||
{ 0x01E636AC, "gmsgADStop", (size_t)&pgmsgADStop },
|
||||
{ 0x01E636B0, "gmsgReceiveW", (size_t)&pgmsgReceiveW },
|
||||
{ 0x01E636B4, "gmsgScenarioIcon", (size_t)&pgmsgScenarioIcon },
|
||||
{ 0x01E636B8, "gmsgBotVoice", (size_t)&pgmsgBotVoice },
|
||||
@ -5351,9 +5353,9 @@ AddressRef g_DataRefs[] =
|
||||
{ 0x01E636C8, "gmsgSpecHealth2", (size_t)&pgmsgSpecHealth2 },
|
||||
{ 0x01E636CC, "gmsgBarTime2", (size_t)&pgmsgBarTime2 },
|
||||
{ 0x01E636D0, "gmsgBotProgress", (size_t)&pgmsgBotProgress },
|
||||
//{ 0x0, "gmsgBrass", (size_t)&pgmsgBrass },
|
||||
//{ 0x0, "gmsgFog", (size_t)&pgmsgFog },
|
||||
//{ 0x0, "gmsgShowTimer", (size_t)&pgmsgShowTimer },
|
||||
{ 0x01E636D4, "gmsgBrass", (size_t)&pgmsgBrass },
|
||||
{ 0x01E636D8, "gmsgFog", (size_t)&pgmsgFog },
|
||||
{ 0x01E636DC, "gmsgShowTimer", (size_t)&pgmsgShowTimer },
|
||||
|
||||
{ 0x01E61B80, "g_psv_gravity", (size_t)&pg_psv_gravity },
|
||||
{ 0x01E61B84, "g_psv_aim", (size_t)&pg_psv_aim },//TODO: unused, used cvar_t *sv_aim
|
||||
@ -5525,7 +5527,7 @@ AddressRef g_DataRefs[] =
|
||||
//{ 0x0, "_ZN9CPushable12m_soundNamesE", mfunc_ptr_cast(&CPushable::pm_soundNames) },
|
||||
|
||||
{ 0x01E1E00C, "_ZN8CDeadHEV9m_szPosesE", mfunc_ptr_cast(&CDeadHEV::pm_szPoses) },
|
||||
|
||||
{ 0x01E1DD88, "_ZN11CBasePlayer16m_playerSaveDataE", mfunc_ptr_cast(&CBasePlayer::pm_playerSaveData) },
|
||||
//{ 0x01E14A68, "_ZN11CBaseEntity10m_SaveDataE", mfunc_ptr_cast(&CBaseEntity::pm_SaveData) },
|
||||
//{ 0x0, "_ZN12CGlobalState10m_SaveDataE", mfunc_ptr_cast(&CGlobalState::pm_SaveData) },
|
||||
//{ 0x0, "_ZN9CEnvSpark10m_SaveDataE", mfunc_ptr_cast(&CEnvSpark::pm_SaveData) },
|
||||
@ -5569,7 +5571,7 @@ AddressRef g_DataRefs[] =
|
||||
//{ 0x0, "_ZN12CMultiSource10m_SaveDataE", mfunc_ptr_cast(&CMultiSource::pm_SaveData) },
|
||||
{ 0x01E20538, "_ZN10CBaseDelay10m_SaveDataE", mfunc_ptr_cast(&CBaseDelay::pm_SaveData) },
|
||||
{ 0x01E13438, "_ZN14CBaseAnimating10m_SaveDataE", mfunc_ptr_cast(&CBaseAnimating::pm_SaveData) },
|
||||
//{ 0x0, "_ZN11CBaseToggle10m_SaveDataE", mfunc_ptr_cast(&CBaseToggle::pm_SaveData) },
|
||||
{ 0x01E20558, "_ZN11CBaseToggle10m_SaveDataE", mfunc_ptr_cast(&CBaseToggle::pm_SaveData) },
|
||||
//{ 0x0, "_ZN11CBaseButton10m_SaveDataE", mfunc_ptr_cast(&CBaseButton::pm_SaveData) },
|
||||
//{ 0x0, "_ZN15CAmbientGeneric10m_SaveDataE", mfunc_ptr_cast(&CAmbientGeneric::pm_SaveData) },
|
||||
//{ 0x0, "_ZN9CEnvSound10m_SaveDataE", mfunc_ptr_cast(&CEnvSound::pm_SaveData) },
|
||||
@ -5659,7 +5661,9 @@ AddressRef g_DataRefs[] =
|
||||
{ 0x01E76594, "TheCareerTasks", (size_t)&pTheCareerTasks },
|
||||
{ 0x01E28C7C, "TheBotProfiles", (size_t)&pTheBotProfiles },
|
||||
|
||||
{ 0x01E287CC, "g_pSelectedZombieSpawn", (size_t)&pg_pSelectedZombieSpawn },
|
||||
{ 0x01E287F0, "TheBotPhrases", (size_t)&pTheBotPhrases },
|
||||
|
||||
{ 0x01E7657C, "TheTutor", (size_t)&pTheTutor },
|
||||
{ 0x01E2A25C, "g_pHostages", (size_t)&pg_pHostages },
|
||||
{ 0x01E2A258, "g_iHostageNumber", (size_t)&pg_iHostageNumber },
|
||||
@ -5669,6 +5673,25 @@ AddressRef g_DataRefs[] =
|
||||
{ 0x01E61740, "theDebugBuffer", (size_t)&ptheDebugBuffer },
|
||||
|
||||
{ 0x01E75D04, "g_LessCtx", (size_t)&pg_LessCtx },
|
||||
{ 0x01E62788, "g_pLastSpawn", (size_t)&pg_pLastSpawn },
|
||||
|
||||
{ 0x01E63590, "g_pLastCTSpawn", (size_t)&pg_pLastCTSpawn },
|
||||
{ 0x01E63594, "g_pLastTerroristSpawn", (size_t)&pg_pLastTerroristSpawn },
|
||||
|
||||
{ 0x01E62990, "_ZL11zombieSpawn", (size_t)&pzombieSpawn },
|
||||
{ 0x01E636E8, "_ZL16zombieSpawnCount", (size_t)&pzombieSpawnCount },
|
||||
|
||||
{ 0x01E13838, "svBlending", (size_t)&psvBlending },
|
||||
{ 0x01E312D0, "IEngineStudio", (size_t)&pIEngineStudio },
|
||||
{ 0x01E2DAA8, "g_pstudiohdr", (size_t)&pg_pstudiohdr },
|
||||
{ 0x01E2F8C0, "g_pRotationMatrix", (size_t)&pg_pRotationMatrix },
|
||||
{ 0x01E2F8B0, "g_pBoneTransform", (size_t)&pg_pBoneTransform },
|
||||
|
||||
{ 0x01E2F8BC, "omega", (size_t)&pomega },
|
||||
{ 0x01E312E0, "cosom", (size_t)&pcosom },
|
||||
{ 0x01E306C8, "sinom", (size_t)&psinom },
|
||||
{ 0x01E2F8B4, "sclp", (size_t)&psclp },
|
||||
{ 0x01E2F8B8, "sclq", (size_t)&psclq },
|
||||
|
||||
#endif // Data_References_Region
|
||||
|
||||
|
@ -726,7 +726,7 @@ bool HIDDEN HookFunction(Module *module, FunctionHook *hook)
|
||||
patch[0] = 0xE9;
|
||||
|
||||
#if 1
|
||||
if(strcmp(hook->symbolName,"_ZN11CBasePlayer10SwitchTeamEv")==0)
|
||||
if (strcmp(hook->symbolName,"_ZN11CBasePlayer10SwitchTeamEv")==0)
|
||||
{
|
||||
addr_orig = (void *)hook->originalAddress;
|
||||
|
||||
|
@ -60,19 +60,42 @@ NOBODY void AngleVectorsTranspose(const vec_t *angles, vec_t *forward, vec_t *ri
|
||||
}
|
||||
|
||||
/* <2ce5d0> ../cstrike/pm_shared/pm_math.c:112 */
|
||||
NOBODY void AngleMatrix(const vec_t *angles, float *matrix)
|
||||
void AngleMatrix(const vec_t *angles, float (*matrix)[4])
|
||||
{
|
||||
// float angle; // 114
|
||||
// float sr; // 115
|
||||
// float sp; // 115
|
||||
// float sy; // 115
|
||||
// float cr; // 115
|
||||
// float cp; // 115
|
||||
// float cy; // 115
|
||||
float_precision angle;
|
||||
float_precision sr, sp, sy, cr, cp, cy;
|
||||
|
||||
angle = (float_precision)(angles[ROLL] * (M_PI * 2 / 360));
|
||||
sy = sin(angle);
|
||||
cy = cos(angle);
|
||||
|
||||
angle = (float_precision)(angles[YAW] * (M_PI * 2 / 360));
|
||||
sp = sin(angle);
|
||||
cp = cos(angle);
|
||||
|
||||
angle = (float_precision)(angles[PITCH] * (M_PI * 2 / 360));
|
||||
sr = sin(angle);
|
||||
cr = cos(angle);
|
||||
|
||||
matrix[0][0] = cr * cp;
|
||||
matrix[1][0] = cr * sp;
|
||||
matrix[2][0] = -sr;
|
||||
|
||||
matrix[0][1] = (sy * sr) * cp - cy * sp;
|
||||
matrix[1][1] = (sy * sr) * sp + cy * cp;
|
||||
matrix[2][1] = sy * cr;
|
||||
|
||||
matrix[0][2] = (cy * sr) * cp + sy * sp;
|
||||
matrix[1][2] = (cy * sr) * sp - sy * cp;
|
||||
matrix[2][2] = cy * cr;
|
||||
|
||||
matrix[0][3] = 0.0f;
|
||||
matrix[1][3] = 0.0f;
|
||||
matrix[2][3] = 0.0f;
|
||||
}
|
||||
|
||||
/* <2ce67b> ../cstrike/pm_shared/pm_math.c:142 */
|
||||
NOBODY void AngleIMatrix(const vec_t *angles, float *matrix)
|
||||
NOBODY void AngleIMatrix(const vec_t *angles, float (*matrix)[4])
|
||||
{
|
||||
// float angle; // 144
|
||||
// float sr; // 145
|
||||
@ -117,9 +140,15 @@ NOBODY void VectorTransform(const vec_t *in1, float *in2, vec_t *out)
|
||||
}
|
||||
|
||||
/* <2ce996> ../cstrike/pm_shared/pm_math.c:259 */
|
||||
NOBODY int VectorCompare(const vec_t *v1, const vec_t *v2)
|
||||
int VectorCompare(const vec_t *v1, const vec_t *v2)
|
||||
{
|
||||
// int i; // 261
|
||||
int i;
|
||||
for (i = 0 ; i < 3 ; i++)
|
||||
{
|
||||
if (v1[i] != v2[i])
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* <2ce9de> ../cstrike/pm_shared/pm_math.c:270 */
|
||||
|
@ -42,13 +42,13 @@ void AngleVectors(const vec_t *angles, vec_t *forward, vec_t *right, vec_t *up);
|
||||
|
||||
|
||||
NOBODY void AngleVectorsTranspose(const vec_t *angles, vec_t *forward, vec_t *right, vec_t *up);
|
||||
NOBODY void AngleMatrix(const vec_t *angles, float *matrix);
|
||||
NOBODY void AngleIMatrix(const vec_t *angles, float *matrix);
|
||||
void AngleMatrix(const vec_t *angles, float (*matrix)[4]);
|
||||
NOBODY void AngleIMatrix(const vec_t *angles, float (*matrix)[4]);
|
||||
NOBODY void NormalizeAngles(float *angles);
|
||||
NOBODY void InterpolateAngles(float *start, float *end, float *output, float frac);
|
||||
NOBODY float AngleBetweenVectors(const vec_t *v1, const vec_t *v2);
|
||||
NOBODY void VectorTransform(const vec_t *in1, float *in2, vec_t *out);
|
||||
NOBODY int VectorCompare(const vec_t *v1, const vec_t *v2);
|
||||
int VectorCompare(const vec_t *v1, const vec_t *v2);
|
||||
NOBODY void VectorMA(const vec_t *veca, float scale, const vec_t *vecb, vec_t *vecc);
|
||||
|
||||
NOXREF vec_t _DotProduct(vec_t *v1, vec_t *v2);
|
||||
|
@ -50,6 +50,7 @@ TEST(StructOffsets, ReversingChecks, 5000)
|
||||
REPEAT_SIZEOF_PRINT(CHalfLifeTraining);
|
||||
REPEAT_SIZEOF_PRINT(CGib);
|
||||
REPEAT_SIZEOF_PRINT(CSprayCan);
|
||||
REPEAT_SIZEOF_PRINT(CountdownTimer);
|
||||
|
||||
// offset the members
|
||||
REPEAT_OFFSETOF_PRINT(CBaseEntity, pev);
|
||||
@ -66,6 +67,7 @@ TEST(StructOffsets, ReversingChecks, 5000)
|
||||
CHECK_CLASS_SIZE(CHalfLifeTraining, 0x2E8u, 0x2D8u);
|
||||
CHECK_CLASS_SIZE(CGib, 0x98, 0xA8);
|
||||
CHECK_CLASS_SIZE(CSprayCan, 0x88, 0x98);
|
||||
//CHECK_CLASS_SIZE(CountdownTimer, 0xC, 0x8);
|
||||
|
||||
//CHECK_CLASS_SIZE(CBotManager, 12u, 12);
|
||||
//CHECK_CLASS_SIZE(CCSBotManager, 740, 0x2E0u);//0x2E4u | 0x2E0u
|
||||
|
Loading…
x
Reference in New Issue
Block a user