1
This commit is contained in:
parent
d8dfd96829
commit
b526e5dd3d
@ -1397,6 +1397,7 @@ void Human::FillMFGasData(cs::MFGasData* gas_data)
|
|||||||
long long duration = room->GetGasInactiveTime() * SERVER_FRAME_RATE -
|
long long duration = room->GetGasInactiveTime() * SERVER_FRAME_RATE -
|
||||||
(room->GetFrameNo() - room->GetGasData().gas_start_frameno);
|
(room->GetFrameNo() - room->GetGasData().gas_start_frameno);
|
||||||
gas_data->set_duration(std::max(duration * 50, (long long)1000) / 1000);
|
gas_data->set_duration(std::max(duration * 50, (long long)1000) / 1000);
|
||||||
|
gas_data->set_total_duration(room->GetGasInactiveTime());
|
||||||
} else if (room->GetGasData().GetGasMode() == GasJump) {
|
} else if (room->GetGasData().GetGasMode() == GasJump) {
|
||||||
gas_data->set_duration(0);
|
gas_data->set_duration(0);
|
||||||
} else if (room->GetGasData().GetGasMode() == GasMoving) {
|
} else if (room->GetGasData().GetGasMode() == GasMoving) {
|
||||||
|
@ -650,6 +650,7 @@ message MFGasData
|
|||||||
*/
|
*/
|
||||||
optional int32 mode = 1; //0:inactive 1:waiting 2:moving 3:jump
|
optional int32 mode = 1; //0:inactive 1:waiting 2:moving 3:jump
|
||||||
optional float duration = 2; //持续时间(秒)
|
optional float duration = 2; //持续时间(秒)
|
||||||
|
optional float total_duration = 7; //总时间(秒),只在inactive时有效
|
||||||
optional MFVec3 pos_old = 3; //前一个圆心
|
optional MFVec3 pos_old = 3; //前一个圆心
|
||||||
optional MFVec3 pos_new = 4; //新圆心
|
optional MFVec3 pos_new = 4; //新圆心
|
||||||
optional float rad_old = 5; //前一个圆半径
|
optional float rad_old = 5; //前一个圆半径
|
||||||
|
Loading…
x
Reference in New Issue
Block a user