1
This commit is contained in:
parent
b52a2f4778
commit
1efa6d0aaf
@ -35,6 +35,7 @@ void Car::Initialize()
|
|||||||
weapons[GUN_SLOT1].Recalc();
|
weapons[GUN_SLOT1].Recalc();
|
||||||
SetCurrWeapon(&weapons[GUN_SLOT1]);
|
SetCurrWeapon(&weapons[GUN_SLOT1]);
|
||||||
}
|
}
|
||||||
|
born_frameno_ = room->GetFrameNo();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Car::FillMFObjectPart(Room* room, Human* hum, cs::MFObjectPart* part_data)
|
void Car::FillMFObjectPart(Room* room, Human* hum, cs::MFObjectPart* part_data)
|
||||||
@ -60,6 +61,7 @@ void Car::FillMFObjectFull(Room* room, Human* hum, cs::MFObjectFull* full_data)
|
|||||||
auto less_data = p->add_passengers();
|
auto less_data = p->add_passengers();
|
||||||
hum->FillMFObjectLess(room, hum, less_data);
|
hum->FillMFObjectLess(room, hum, less_data);
|
||||||
}
|
}
|
||||||
|
p->set_born_frameno(ceil(born_frameno_ / 2.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Car::GetDown(Human* passenger)
|
void Car::GetDown(Human* passenger)
|
||||||
|
@ -34,6 +34,7 @@ class Car : public Creature
|
|||||||
int AllocSeat();
|
int AllocSeat();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
long long born_frameno_ = 0;
|
||||||
bool later_removed_ = false;
|
bool later_removed_ = false;
|
||||||
Human* driver_ = nullptr;
|
Human* driver_ = nullptr;
|
||||||
std::set<Human*> passengers_;
|
std::set<Human*> passengers_;
|
||||||
|
@ -13,6 +13,7 @@ cs::SMUpdate* FrameMaker::MakeUpdateMsg(Human* hum)
|
|||||||
cs::SMUpdate* msg = new cs::SMUpdate;
|
cs::SMUpdate* msg = new cs::SMUpdate;
|
||||||
{
|
{
|
||||||
Room* room = hum->room;
|
Room* room = hum->room;
|
||||||
|
msg->set_frameno(room->GetFrameNo() / 2);
|
||||||
if (room->GetGasData().gas_mode == GasJump) {
|
if (room->GetGasData().gas_mode == GasJump) {
|
||||||
cs::MFPlane* p = msg->mutable_plane();
|
cs::MFPlane* p = msg->mutable_plane();
|
||||||
TypeConvert::ToPb(room->plane.start_point, p->mutable_start_point());
|
TypeConvert::ToPb(room->plane.start_point, p->mutable_start_point());
|
||||||
|
@ -441,6 +441,7 @@ message MFCarFull
|
|||||||
!!!注意这里只返回客户端必要的用于显示玩家外观的信息而不是全量信息
|
!!!注意这里只返回客户端必要的用于显示玩家外观的信息而不是全量信息
|
||||||
*/
|
*/
|
||||||
repeated MFPlayerFull passengers = 6;
|
repeated MFPlayerFull passengers = 6;
|
||||||
|
optional int32 born_frameno = 8; //出生帧号 born_frameno == SMUpdate.frmanoe时表示在当前这帧出生
|
||||||
}
|
}
|
||||||
|
|
||||||
//对象信息-部分
|
//对象信息-部分
|
||||||
@ -1057,6 +1058,7 @@ message SMUpdate
|
|||||||
//一下字段只有僵尸模式才有效
|
//一下字段只有僵尸模式才有效
|
||||||
repeated MFPosition object_positions = 43; //对象坐标信息,如果对象已经在part_objects则可能不发,这时客户端可以读取part_objects里的左边更新小地图
|
repeated MFPosition object_positions = 43; //对象坐标信息,如果对象已经在part_objects则可能不发,这时客户端可以读取part_objects里的左边更新小地图
|
||||||
optional int32 game_left_time = 45; //游戏剩余时间(毫秒, 战斗开始后字段才有意义)
|
optional int32 game_left_time = 45; //游戏剩余时间(毫秒, 战斗开始后字段才有意义)
|
||||||
|
optional int32 frameno = 46;
|
||||||
}
|
}
|
||||||
|
|
||||||
//滚动消息
|
//滚动消息
|
||||||
|
Loading…
x
Reference in New Issue
Block a user