Mercurial > hg > Game > Cerium
changeset 849:a84ae8e44710 draft
merge
author | tkaito |
---|---|
date | Sun, 06 Jun 2010 03:33:00 +0900 |
parents | a033d464c812 (current diff) 4482720bbba7 (diff) |
children | 2bff5d9fcefd |
files | |
diffstat | 2 files changed, 18 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/Renderer/Engine/SceneGraph.h Sun Jun 06 03:31:52 2010 +0900 +++ b/Renderer/Engine/SceneGraph.h Sun Jun 06 03:33:00 2010 +0900 @@ -32,7 +32,7 @@ int id; // Objectのシーケンス番号(Linda) // とりあえず動かしたいので追加 - int seq, resend_flag; + int seq, seq_rd, resend_flag; int property_size; void *propertyptr;
--- a/Renderer/Test/dynamic_create.cc Sun Jun 06 03:31:52 2010 +0900 +++ b/Renderer/Test/dynamic_create.cc Sun Jun 06 03:33:00 2010 +0900 @@ -94,12 +94,24 @@ { SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_; // LindaServerから座標データを取得してオブジェクトに反映させる。 + + if (!node->resend_flag || node->seq_rd != node->seq) { + unsigned char *reply_rd = psx_reply(node->seq_rd); + if (reply_rd != NULL) { + set_position(node, reply_rd); + free(reply_rd); + return; + } + } unsigned char *reply = psx_reply(node->seq); if (reply != NULL) { set_position(node, reply); free(reply); -// node->seq = psx_wait_rd(sgroot->tid, node->id * 10 + 1); - node->seq = psx_rd(sgroot->tid, node->id * 10 + 1); + node->seq = psx_wait_rd(sgroot->tid, node->id * 10 + 1); + node->resend_flag = true; + } else if (node->resend_flag) { + node->seq_rd = psx_rd(sgroot->tid, node->id * 10 + 1); + node->resend_flag = false; } } @@ -119,9 +131,9 @@ sgroot->createFromXMLmemory(sgroot->tmanager, child, (char *)data, len); child->set_move_collision(moon_move, moon_collision); child->id = serial_id; -// child->seq = psx_wait_rd(sgroot->tid, serial_id * 10 + 1); - child->seq = psx_rd(sgroot->tid, serial_id * 10 + 1); - + child->seq = psx_wait_rd(sgroot->tid, serial_id * 10 + 1); + child->seq_rd = psx_rd(sgroot->tid, serial_id * 10 + 1); + child->resend_flag = false; return child; }