primordial
-
Автор темы
- #1
Скиньте, пожалуйста, определения left_layers, center_layers и right_layers.
right_layers
center_layers
Дай определениеleft_layers
Это равно 13?ANIMATION_LAYER_COUNT
I am guessing that this is part of animfix?this is what Vantape personally does...
C++:c_anim_layer right_layers[ ANIMATION_LAYER_COUNT ]; // thirteen c_anim_layer center_layers[ ANIMATION_LAYER_COUNT ]; // thirteen c_anim_layer left_layers[ ANIMATION_LAYER_COUNT ]; // thirteen // how to use: // in arguments: int side switch(side) { case 1: { player->setup_bones_rebuilt( right_matrix, BONE_FLAG_USED_BY_HITBOX ); memcpy( right_layers, player->get_anim_layers( ), 13 * sizeof( c_anim_layer ) ); }break; case 2: { player->setup_bones_rebuilt( center_matrix, BONE_FLAG_USED_BY_HITBOX ); memcpy( center_layers, player->get_anim_layers( ), 13 * sizeof( c_anim_layer ) ); }break; case 3: { player->setup_bones_rebuilt( left_matrix, BONE_FLAG_USED_BY_HITBOX ); memcpy( left_layers, player->get_anim_layers( ), 13 * sizeof( c_anim_layer ) ); }break; }
Зачем ты ему скидываешь паста код, если человек не понимает, что он делает впринципе? Да в паблике куча информации гуляет, человеку элементарно лень загуглить, не то что впастить. Глупость, не более.так лично делает вантап...
C++:c_anim_layer right_layers[ ANIMATION_LAYER_COUNT ]; // 13 c_anim_layer center_layers[ ANIMATION_LAYER_COUNT ]; // 13 c_anim_layer left_layers[ ANIMATION_LAYER_COUNT ]; // 13 // how to use: // in arguments: int side switch ( side ) { case 1: { player->setup_bones_rebuilt( right_matrix, BONE_FLAG_USED_BY_HITBOX ); memcpy( right_layers, player->get_anim_layers( ), 13 * sizeof( c_anim_layer ) ); }break; case 2: { player->setup_bones_rebuilt( center_matrix, BONE_FLAG_USED_BY_HITBOX ); memcpy( center_layers, player->get_anim_layers( ), 13 * sizeof( c_anim_layer ) ); }break; case 3: { player->setup_bones_rebuilt( left_matrix, BONE_FLAG_USED_BY_HITBOX ); memcpy( left_layers, player->get_anim_layers( ), 13 * sizeof( c_anim_layer ) ); }break; }
Wait but i am getting side by them how am i gonna memcpy them before i got my sideye
after setup matrixes..
if you already have it
он попросил я скинул вместо того что бы сидеть и говорить загадками
ты же в ответ поставил мне *раздражает*
Ty but i am using layers to actually get side when player is moving how am i gonna setup layers before actually getting side and i need to get side after memcpying layersПосмотреть вложение 201540
i calling this func on c_player_lagcompensation::on_frame_stage_notify( ) if server sended new data..
fully part.
lagcomp_data its lag_record stuff.C++:std::deque<lagcomp_data> anim_records[64]; void lagcomp_data::run_second(c_cs_player* player, lagcomp_data* data, float yaw, int side) { c_anim_state State; auto animstate = player->get_anim_state(); if (player->get_spawn_time() != spawtime[player->get_index()]) { animstate->reset(); spawtime[player->get_index()] = player->get_spawn_time(); } anim_layer_t _layers[13]; memcpy(_layers, data->anim_overlay, sizeof(anim_layer_t) * 13); memcpy(&State, animstate, sizeof(c_anim_state)); animstate->m_foot_yaw = normalize_yaw(data->eye_angles.y + yaw); player->get_client_side_animation() = true; player->update_client_side_animation(); player->get_client_side_animation() = false; switch (side) { case 1: { player->invalidate_bone_cache(); player->setup_bones(data->zero_matrix, 128, BONE_FLAG_USED_BY_HITBOX, data->simtime); memcpy(data->zero_layers, &player->get_anim_layers(), 13 * sizeof(anim_layer_t)); data->zero_yaw = player->get_anim_state()->m_foot_yaw; }break; case 2: { player->invalidate_bone_cache(); player->setup_bones(data->right_matrix, 128, BONE_FLAG_USED_BY_HITBOX, data->simtime); memcpy(data->right_layers, &player->get_anim_layers(), 13 * sizeof(anim_layer_t)); data->right_side = player->get_anim_state()->m_foot_yaw; }break; case 3: { player->invalidate_bone_cache(); player->setup_bones(data->left_matrix, 128, BONE_FLAG_USED_BY_HITBOX, data->simtime); memcpy(data->left_layers, &player->get_anim_layers(), 13 * sizeof(anim_layer_t)); data->left_side = player->get_anim_state()->m_foot_yaw; }break; case 4: { player->invalidate_bone_cache(); player->setup_bones(data->low_left_matrix, 128, BONE_FLAG_USED_BY_HITBOX, data->simtime); memcpy(data->low_left_layers, &player->get_anim_layers(), 13 * sizeof(anim_layer_t)); data->low_left_side = player->get_anim_state()->m_foot_yaw; }break; case 5: { player->invalidate_bone_cache(); player->setup_bones(data->low_right_matrix, 128, BONE_FLAG_USED_BY_HITBOX, data->simtime); memcpy(data->low_right_layers, &player->get_anim_layers(), 13 * sizeof(anim_layer_t)); data->low_right_side = player->get_anim_state()->m_foot_yaw; }break; } memcpy(&player->get_anim_layers(), _layers, sizeof(anim_layer_t) * 13); memcpy(animstate, &State, sizeof(c_anim_state)); }
Thats cool bro but i think you can get that without doing side switches, memcpy layers after matrixes.you will get the side after you copy the anim layers and then just update the animations or I already answered you in the topic how to get the play_back_rate without waiting for new data from the server
result: blue left matrix red center and right matrixes
Посмотреть вложение 201545
если ты вот так вьебешь,то это по факту ниче не даст.c_anim_layer right_layers[ ANIMATION_LAYER_COUNT ]; // 13
c_anim_layer center_layers[ ANIMATION_LAYER_COUNT ]; // 13
c_anim_layer left_layers[ ANIMATION_LAYER_COUNT ]; // 13
вот это что?
Проект предоставляет различный материал, относящийся к сфере киберспорта, программирования, ПО для игр, а также позволяет его участникам общаться на многие другие темы. Почта для жалоб: admin@yougame.biz