完成武器协议定义
This commit is contained in:
parent
7f21ebc7d1
commit
61bf237ab7
@ -57,7 +57,9 @@ void Human::FillMFObjectFull(cs::MFObjectFull* full_data)
|
|||||||
|
|
||||||
p->set_helmet(helmet);
|
p->set_helmet(helmet);
|
||||||
p->set_chest(chest);
|
p->set_chest(chest);
|
||||||
|
#if 0
|
||||||
p->set_weapon(weapon);
|
p->set_weapon(weapon);
|
||||||
|
#endif
|
||||||
p->set_energy_shield(energy_shield);
|
p->set_energy_shield(energy_shield);
|
||||||
p->set_vip(vip);
|
p->set_vip(vip);
|
||||||
p->set_sdmg(sdmg);
|
p->set_sdmg(sdmg);
|
||||||
@ -72,7 +74,9 @@ void Human::Shot(Vector2D& target_dir)
|
|||||||
{
|
{
|
||||||
cs::MFShot* shot = room->frame_data.shots.Add();
|
cs::MFShot* shot = room->frame_data.shots.Add();
|
||||||
shot->set_player_id(entity_uniid);
|
shot->set_player_id(entity_uniid);
|
||||||
|
#if 0
|
||||||
shot->set_weapon_id(weapon_meta->i->id());
|
shot->set_weapon_id(weapon_meta->i->id());
|
||||||
|
#endif
|
||||||
shot->set_offhand(true);
|
shot->set_offhand(true);
|
||||||
shot->set_bullskin(10001);
|
shot->set_bullskin(10001);
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,9 @@ void Player::Shot()
|
|||||||
{
|
{
|
||||||
cs::MFShot* shot = room->frame_data.shots.Add();
|
cs::MFShot* shot = room->frame_data.shots.Add();
|
||||||
shot->set_player_id(entity_uniid);
|
shot->set_player_id(entity_uniid);
|
||||||
|
#if 0
|
||||||
shot->set_weapon_id(weapon_meta->i->id());
|
shot->set_weapon_id(weapon_meta->i->id());
|
||||||
|
#endif
|
||||||
shot->set_offhand(true);
|
shot->set_offhand(true);
|
||||||
shot->set_bullskin(10001);
|
shot->set_bullskin(10001);
|
||||||
}
|
}
|
||||||
|
@ -119,6 +119,13 @@ message MFPlug
|
|||||||
optional int32 param = 3;
|
optional int32 param = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//武器
|
||||||
|
message MFWeapon
|
||||||
|
{
|
||||||
|
optional int32 weapon_id = 1; //武器id 当weapon_id == 0时表示无装备(装备位置显示空)
|
||||||
|
optional int32 num = 2; //数量 手雷和烟雾弹时该字段有意义
|
||||||
|
}
|
||||||
|
|
||||||
//玩家信息-部分
|
//玩家信息-部分
|
||||||
message MFPlayerPart
|
message MFPlayerPart
|
||||||
{
|
{
|
||||||
@ -145,7 +152,7 @@ message MFPlayerFull
|
|||||||
optional int32 backpack = 14; //背包
|
optional int32 backpack = 14; //背包
|
||||||
optional int32 helmet = 16; //头盔
|
optional int32 helmet = 16; //头盔
|
||||||
optional int32 chest = 17; //防弹衣
|
optional int32 chest = 17; //防弹衣
|
||||||
optional int32 weapon = 18; //武器
|
optional MFWeapon weapon = 18; //武器
|
||||||
optional int32 energy_shield = 19; //能量护盾
|
optional int32 energy_shield = 19; //能量护盾
|
||||||
optional int32 vip = 20; //vip
|
optional int32 vip = 20; //vip
|
||||||
optional int32 sdmg = 21;
|
optional int32 sdmg = 21;
|
||||||
@ -367,8 +374,8 @@ message MFActivePlayerData
|
|||||||
*/
|
*/
|
||||||
repeated int32 inventory = 11; //库存
|
repeated int32 inventory = 11; //库存
|
||||||
|
|
||||||
optional int32 cur_weap_idx = 15; //当前武器索引 0-3
|
optional int32 cur_weapon_idx = 15; //当前武器索引 0-4
|
||||||
repeated int32 weapons = 16; //武器列表
|
repeated MFWeapon weapons = 16; //武器列表1-4 0:拳头 1:枪 2:枪 3:手雷 4:烟雾弹
|
||||||
|
|
||||||
optional int32 spectator_count = 20;
|
optional int32 spectator_count = 20;
|
||||||
}
|
}
|
||||||
@ -427,7 +434,7 @@ message MFBullet
|
|||||||
message MFShot
|
message MFShot
|
||||||
{
|
{
|
||||||
optional int32 player_id = 1; //玩家id
|
optional int32 player_id = 1; //玩家id
|
||||||
optional int32 weapon_id = 2; //武器id
|
optional MFWeapon weapon = 2; //武器id
|
||||||
optional bool offhand = 3;
|
optional bool offhand = 3;
|
||||||
optional int32 bullskin = 4;
|
optional int32 bullskin = 4;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user