game/client: fix C_BaseEntity prediction

This commit is contained in:
nillerusr 2022-07-25 16:47:41 +03:00
parent c739b2c5bb
commit ae94aa060d
3 changed files with 37 additions and 36 deletions

5
.gitignore vendored
View File

@ -3,9 +3,12 @@
*.vpc_crc *.vpc_crc
*.project *.project
*obj_* *obj_*
build/
.waf* .waf*
.lock-waf* .lock-waf*
__pycache__ __pycache__
*.pyc *.pyc
.DS_Store .DS_Store
build*/
android/
.cache/
.ccache/

View File

@ -5302,43 +5302,41 @@ int C_BaseEntity::GetIntermediateDataSize( void )
static int g_FieldSizes[FIELD_TYPECOUNT] = static int g_FieldSizes[FIELD_TYPECOUNT] =
{ {
0, // FIELD_VOID FIELD_SIZE( FIELD_VOID ),
sizeof(float), // FIELD_FLOAT FIELD_SIZE( FIELD_FLOAT ),
sizeof(int), // FIELD_STRING FIELD_SIZE( FIELD_STRING ),
sizeof(Vector), // FIELD_VECTOR FIELD_SIZE( FIELD_VECTOR ),
sizeof(Quaternion), // FIELD_QUATERNION FIELD_SIZE( FIELD_QUATERNION ),
sizeof(int), // FIELD_INTEGER FIELD_SIZE( FIELD_INTEGER ),
sizeof(char), // FIELD_BOOLEAN FIELD_SIZE( FIELD_BOOLEAN ),
sizeof(short), // FIELD_SHORT FIELD_SIZE( FIELD_SHORT ),
sizeof(char), // FIELD_CHARACTER FIELD_SIZE( FIELD_CHARACTER ),
sizeof(color32), // FIELD_COLOR32 FIELD_SIZE( FIELD_COLOR32 ),
sizeof(int), // FIELD_EMBEDDED (handled specially) FIELD_SIZE( FIELD_EMBEDDED ),
sizeof(int), // FIELD_CUSTOM (handled specially) FIELD_SIZE( FIELD_CUSTOM ),
//--------------------------------- FIELD_SIZE( FIELD_CLASSPTR ),
FIELD_SIZE( FIELD_EHANDLE ),
FIELD_SIZE( FIELD_EDICT ),
sizeof(int), // FIELD_CLASSPTR FIELD_SIZE( FIELD_POSITION_VECTOR ),
sizeof(EHANDLE), // FIELD_EHANDLE FIELD_SIZE( FIELD_TIME ),
sizeof(int), // FIELD_EDICT FIELD_SIZE( FIELD_TICK ),
FIELD_SIZE( FIELD_MODELNAME ),
FIELD_SIZE( FIELD_SOUNDNAME ),
sizeof(Vector), // FIELD_POSITION_VECTOR FIELD_SIZE( FIELD_INPUT ),
sizeof(float), // FIELD_TIME FIELD_SIZE( FIELD_FUNCTION ),
sizeof(int), // FIELD_TICK FIELD_SIZE( FIELD_VMATRIX ),
sizeof(int), // FIELD_MODELNAME FIELD_SIZE( FIELD_VMATRIX_WORLDSPACE ),
sizeof(int), // FIELD_SOUNDNAME FIELD_SIZE( FIELD_MATRIX3X4_WORLDSPACE ),
FIELD_SIZE( FIELD_INTERVAL ),
FIELD_SIZE( FIELD_MODELINDEX ),
FIELD_SIZE( FIELD_MATERIALINDEX ),
sizeof(int), // FIELD_INPUT (uses custom type) FIELD_SIZE( FIELD_VECTOR2D ),
#ifdef GNUC FIELD_SIZE( FIELD_INTEGER64 ),
// pointer to members under gnuc are 8bytes if you have a virtual func FIELD_SIZE( FIELD_POINTER ),
sizeof(uint64), // FIELD_FUNCTION
#else
sizeof(int *), // FIELD_FUNCTION
#endif
sizeof(VMatrix), // FIELD_VMATRIX
sizeof(VMatrix), // FIELD_VMATRIX_WORLDSPACE
sizeof(matrix3x4_t),// FIELD_MATRIX3X4_WORLDSPACE // NOTE: Use array(FIELD_FLOAT, 12) for matrix3x4_t NOT in worldspace
sizeof(interval_t), // FIELD_INTERVAL
sizeof(int), // FIELD_MODELINDEX
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

2
ivp

@ -1 +1 @@
Subproject commit 818b2cb7b060defb9739677449074798da3c8611 Subproject commit 878a544907704eee58555736615e11f7e0ff4109