Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool is_slow_walking(SDK::CBaseEntity * entity) {
- float velocity_2D[64], old_velocity_2D[64];
- if (entity->GetVelocity().Length2D() != velocity_2D[entity->GetIndex()] && entity->GetVelocity().Length2D() != NULL) {
- old_velocity_2D[entity->GetIndex()] = velocity_2D[entity->GetIndex()];
- velocity_2D[entity->GetIndex()] = entity->GetVelocity().Length2D();
- }
- if (velocity_2D[entity->GetIndex()] > 0.1) {
- int tick_counter[64];
- if (velocity_2D[entity->GetIndex()] == old_velocity_2D[entity->GetIndex()])
- ++tick_counter[entity->GetIndex()];
- else
- tick_counter[entity->GetIndex()] = 0;
- while (tick_counter[entity->GetIndex()] > (1 / INTERFACES::Globals->interval_per_tick) * fabsf(0.1f))// should give use 100ms in ticks if their speed stays the same for that long they are definetely up to something..
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement