Bartis1313 / csgo

Free and open source CSGO hack
MIT License
180 stars 26 forks source link

Minor issue in prediction #54

Closed ghost closed 1 year ago

ghost commented 1 year ago

https://github.com/Bartis1313/csgo/blob/ebad79b9d6525141526c93474c0764ee48503bf5/cheats/features/prediction/prediction.cpp#L72

Should be m_afButtonReleased() instead.

Bartis1313 commented 1 year ago

thanks, will fix today

ghost commented 1 year ago

@Bartis1313 Thanks, can you check as well if yours is correctly updated (from IDA).

https://github.com/Bartis1313/csgo/blob/84b43ce893e9d8444e4ec96636ac41404bf49681/SDK/IPrediction.hpp#L48-L63

Latest class info that I got: https://www.unknowncheats.me/forum/3482390-post15919.html

In class IPrediction, I'm confused about m_bFirstTimePredicted and m_bOldCLPredictValue.

Bartis1313 commented 1 year ago

yes it's correct (yours), while mine not. Fastest way I did it is to lookup Prediction errors occurred string, which is a reference to leaked sdk Here to get this var understood correctly, without var renames

if ( *(_DWORD *)(v7 + v3 + 36) && (*(int (__thiscall **)(int *))(dword_1523F5C8 + 52))(&dword_1523F5C8) )
        Warning("Prediction errors occurred at %i %f\n", *(_DWORD *)(off_10DAA8D0 + 28), *(float *)(off_10DAA8D0 + 16));
      v5 = a2;
    }
    v8 = v43 == -1;
    v6 = v43++ + 1;
  }
  while ( v8 );
  v35 = *(_BYTE *)(v3 + 9);
  if ( (*(unsigned __int8 (__thiscall **)(int *))(dword_14DFAA48 + 84))(&dword_14DFAA48) != v35 )

Take a look at this: v35 = *(_BYTE *)(v3 + 9); and an operation below which is literally in sdk Another ways would be to lookup cl_predict, but I think it will be leading to same time in getting it, or even slower.

.text:10022AEF 68 E4 AB BB 10                          push    offset aClPredict ; "cl_predict"
.text:10022AF4 B9 48 AA DF 14                          mov     ecx, offset dword_14DFAA48

Will update it also, thanks again!

ghost commented 1 year ago

Thanks to you, let's get things correct 😃

ghost commented 1 year ago

@Bartis1313 I was confused because there is the struct Split_t too. (same variable names)

https://github.com/perilouswithadollarsign/cstrike15_src/blob/f82112a2388b841d72cb62ca48ab1846dfcc11c8/game/client/prediction.h#L160

ghost commented 1 year ago

@Bartis1313 So there is both split.m_bFirstTimePredicted and m_bFirstTimePredicted to account?

Bartis1313 commented 1 year ago

Idk, seems useless as server overwrites compressed values, can't do anything about it. This is why I don't use those fields at all. To fix, you can do some compression removal yourself, but I don't know how would you do that.

Bartis1313 commented 1 year ago

compression removal yourself - probably would end up fixing it as custom networked fields, not sure at all about that. This might break some of the error detections though. So I don't rush with doing it, current code is just what would you take from last leaked source and do it (in most).

ghost commented 1 year ago

@Bartis1313 Thanks for the clarification, I will look into it 👍, keep up the good work!