projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
working? interpolation
[carveJwlIkooP6JGAAIwe30JlM.git]
/
player_remote.c
diff --git
a/player_remote.c
b/player_remote.c
index 4989b078c803cf77bc185bec583cfb04c6e8204f..dc133b25f0454e34deabf12fc019d8671c73eae6 100644
(file)
--- a/
player_remote.c
+++ b/
player_remote.c
@@
-285,6
+285,11
@@
static void pose_remote_player( u32 index,
posed.keyframes );
}
posed.keyframes );
}
+ v3_lerp( pose0.root_co, pose1.root_co, t, posed.root_co );
+ q_nlerp( pose0.root_q, pose1.root_q, t, posed.root_q );
+ posed.type = pose0.type;
+ posed.board.lean = vg_lerpf( pose0.board.lean, pose1.board.lean, t );
+
apply_full_skeleton_pose( &av->sk, &posed, final_mtx );
}
else {
apply_full_skeleton_pose( &av->sk, &posed, final_mtx );
}
else {
@@
-294,8
+299,8
@@
static void pose_remote_player( u32 index,
static void animate_remote_player( u32 index ){
static void animate_remote_player( u32 index ){
- f64 min_time =
999999999.9,
- max_time =
-
999999999.9,
+ f64 min_time =
-
999999999.9,
+ max_time =
999999999.9,
abs_max_time = -999999999.9;
struct interp_frame *minframe = NULL,
abs_max_time = -999999999.9;
struct interp_frame *minframe = NULL,
@@
-307,12
+312,12
@@
static void animate_remote_player( u32 index ){
struct interp_frame *ifr = &buf->frames[i];
if( ifr->active ){
struct interp_frame *ifr = &buf->frames[i];
if( ifr->active ){
- if( (ifr->timestamp
< min_time) && (ifr->timestamp >
buf->t) ){
+ if( (ifr->timestamp
> min_time) && (ifr->timestamp <
buf->t) ){
min_time = ifr->timestamp;
minframe = ifr;
}
min_time = ifr->timestamp;
minframe = ifr;
}
- if( (ifr->timestamp
> max_time) && (ifr->timestamp <
buf->t) ){
+ if( (ifr->timestamp
< max_time) && (ifr->timestamp >
buf->t) ){
max_time = ifr->timestamp;
maxframe = ifr;
}
max_time = ifr->timestamp;
maxframe = ifr;
}
@@
-322,7
+327,7
@@
static void animate_remote_player( u32 index ){
abs_max_frame = ifr;
}
}
abs_max_frame = ifr;
}
}
- }
+ }
if( minframe && maxframe ){
pose_remote_player( index, minframe, maxframe );
if( minframe && maxframe ){
pose_remote_player( index, minframe, maxframe );