View Single Post
Re: Make BOT more client-like (Changing CBasePlayer::random_seed variable)
Old
  (#9)
Immortal_BLG
Member
 
Status: Offline
Posts: 170
Join Date: Nov 2007
Location: Russian Federation
Default Re: Make BOT more client-like (Changing CBasePlayer::random_seed variable) - 20-02-2011

Sorry, but with my knowledge of English language I do not want a long explanation about how there shots randomization in CS.
I want to tell only one that value of a variable random_seed simply increases by unit with each frame - for the real client.
Checks about that is whether the player runs, sits or still something occur in mp.dll in a function CSomeWeapon:: PrimaryAttack.

P.S. In previous post I'll gave to you link where you can find answer to you question. (look at wpn_deagle.cpp for example)
P.S.S. function CBaseEntity::FireBullets3 takes all the information about the shot (damage, distance, penetrating power, spread, random_seed, ...) and on the basis of all it calculates the final vector where player will shoot. This function (a bit modified) you can found in HL2SRC.
  
Reply With Quote