Commit 8ede38d 1 parent b7ac8ad commit 8ede38d Copy full SHA for 8ede38d
File tree 2 files changed +4
-6
lines changed
2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -422,21 +422,21 @@ impl Player {
422
422
if config. knockback {
423
423
let yaw = entity. yaw . load ( ) ;
424
424
let strength = 1.0 ;
425
- let victem_velocity = victem_entity. velocity . load ( ) ;
426
- let saved_velo = victem_velocity;
425
+ let saved_velo = victem_entity. velocity . load ( ) ;
427
426
victem_entity. knockback (
428
427
strength * 0.5 ,
429
428
( yaw * ( PI / 180.0 ) ) . sin ( ) as f64 ,
430
429
-( yaw * ( PI / 180.0 ) ) . cos ( ) as f64 ,
431
430
) ;
431
+ let victem_velocity = victem_entity. velocity . load ( ) ;
432
432
let packet = & CEntityVelocity :: new (
433
433
& entity_id,
434
434
victem_velocity. x as f32 ,
435
435
victem_velocity. y as f32 ,
436
436
victem_velocity. z as f32 ,
437
437
) ;
438
438
let velocity = entity. velocity . load ( ) ;
439
- victem_entity
439
+ entity
440
440
. velocity
441
441
. store ( velocity. multiply ( 0.6 , 1.0 , 0.6 ) ) ;
442
442
Original file line number Diff line number Diff line change @@ -112,9 +112,6 @@ pub async fn update_position(player: &Player) {
112
112
} ,
113
113
|chunk_pos| {
114
114
unloading_chunks. push ( chunk_pos) ;
115
- // player
116
- // .client
117
- // .send_packet(&CUnloadChunk::new(chunk_pos.x, chunk_pos.z));
118
115
} ,
119
116
false ,
120
117
) ;
@@ -131,6 +128,7 @@ pub async fn update_position(player: &Player) {
131
128
. world
132
129
. mark_chunks_as_not_watched ( & unloading_chunks)
133
130
. await ;
131
+ // we may don't need to iter twice
134
132
for chunk in unloading_chunks {
135
133
if !player
136
134
. client
You can’t perform that action at this time.
0 commit comments