remove dataflags32
This commit is contained in:
parent
e321fe3bea
commit
fc3c132b82
@ -57,6 +57,14 @@ enum GasMode_e
|
||||
GasMoving = 2
|
||||
};
|
||||
|
||||
enum ActionType_e
|
||||
{
|
||||
AT_None = 0,
|
||||
AT_Reload = 1,
|
||||
AT_UseItem = 2,
|
||||
AT_Relive = 3,
|
||||
};
|
||||
|
||||
const char* const PROJ_NAME_FMT = "game%d_gameserver";
|
||||
const char* const PROJ_ROOT_FMT = "/data/logs/%s";
|
||||
|
||||
|
@ -72,7 +72,9 @@ void Human::FillMFObjectFull(cs::MFObjectFull* full_data)
|
||||
p->set_disconnected(disconnected);
|
||||
p->set_anim_type(anim_type);
|
||||
p->set_anim_seq(anim_seq);
|
||||
#if 0
|
||||
p->set_action_type(action_type);
|
||||
#endif
|
||||
p->set_skin(skin);
|
||||
p->set_backpack(backpack);
|
||||
p->set_helmet(helmet);
|
||||
|
@ -34,7 +34,9 @@ class Human : public Entity
|
||||
bool disconnected = false;
|
||||
int anim_type = 0;
|
||||
int anim_seq = 0;
|
||||
int action_type = 0;
|
||||
ActionType_e action_type = AT_None;
|
||||
long long action_frameno = 0;
|
||||
long long action_duration = 0;
|
||||
int skin = 0;
|
||||
int backpack = 0;
|
||||
int helmet = 0;
|
||||
@ -56,8 +58,6 @@ class Human : public Entity
|
||||
|
||||
HumanFrameData frame_data;
|
||||
|
||||
std::set<Human*> my_seen_players;
|
||||
std::set<Human*> seen_me_players;
|
||||
std::set<Entity*> new_objects;
|
||||
std::set<Entity*> part_objects;
|
||||
|
||||
|
@ -13,22 +13,6 @@
|
||||
#include "building.h"
|
||||
#include "loot.h"
|
||||
|
||||
const int F_del_objids = 2;
|
||||
const int F_full_objects = 3;
|
||||
const int F_part_objects = 4;
|
||||
const int F_active_player_id = 5;
|
||||
const int F_active_player_data = 6;
|
||||
const int F_alive_count = 15;
|
||||
const int F_gasT = 16;
|
||||
const int F_gas_data = 17;
|
||||
const int F_team_data = 18;
|
||||
const int F_teams = 19;
|
||||
const int F_bullets = 20;
|
||||
const int F_shots = 21;
|
||||
const int F_explosions = 22;
|
||||
const int F_emotes = 23;
|
||||
const int F_ack = 24;
|
||||
|
||||
Player::Player()
|
||||
{
|
||||
entity_type = ET_Player;
|
||||
@ -45,13 +29,6 @@ Player::~Player()
|
||||
void Player::Initialize()
|
||||
{
|
||||
health = meta->i->health();
|
||||
#if 0
|
||||
weapons[GUN_SLOT1].weapon_idx = GUN_SLOT1;
|
||||
weapons[GUN_SLOT1].weapon_id = DEF_WEAPON_ID;
|
||||
weapons[GUN_SLOT1].weapon_lv = 1;
|
||||
weapons[GUN_SLOT1].meta = MetaMgr::Instance()->GetEquip(DEF_WEAPON_ID);;
|
||||
curr_weapon = &weapons[GUN_SLOT1];
|
||||
#endif
|
||||
RecalcSelfCollider();
|
||||
}
|
||||
|
||||
@ -607,7 +584,6 @@ void Player::_CMVoice(f8::MsgHdr& hdr, const cs::CMVoice& msg)
|
||||
|
||||
void Player::FillMFActivePlayerData(cs::MFActivePlayerData* player_data)
|
||||
{
|
||||
player_data->set_has_action(false);
|
||||
player_data->set_skin(skin);
|
||||
player_data->set_backpack(backpack);
|
||||
player_data->set_helmet(helmet);
|
||||
@ -711,32 +687,5 @@ void Player::MakeUpdateMsg()
|
||||
room->gas_data.pos_old.ToPB(update_msg->mutable_gas_pos_old());
|
||||
}
|
||||
update_msg->set_alive_count(room->AliveCount());
|
||||
|
||||
{
|
||||
int data_flags32 = 0;
|
||||
if (!update_msg->del_objids_size() > 0) {
|
||||
a8::SetBitFlag(data_flags32, F_del_objids);
|
||||
}
|
||||
if (!new_objects.empty()) {
|
||||
a8::SetBitFlag(data_flags32, F_full_objects);
|
||||
}
|
||||
if (!part_objects.empty()) {
|
||||
a8::SetBitFlag(data_flags32, F_part_objects);
|
||||
}
|
||||
if (update_msg->bullets_size() > 0) {
|
||||
a8::SetBitFlag(data_flags32, F_bullets);
|
||||
}
|
||||
if (update_msg->shots_size() > 0) {
|
||||
a8::SetBitFlag(data_flags32, F_shots);
|
||||
}
|
||||
|
||||
if (updated_times == 0) {
|
||||
a8::SetBitFlag(data_flags32, F_active_player_id);
|
||||
a8::SetBitFlag(data_flags32, F_active_player_data);
|
||||
}
|
||||
a8::SetBitFlag(data_flags32, F_alive_count);
|
||||
|
||||
update_msg->set_data_flags32(data_flags32);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -149,7 +149,8 @@ message MFPlayerFull
|
||||
optional bool disconnected = 9; //是否断网
|
||||
optional int32 anim_type = 10; //
|
||||
optional int32 anim_seq = 11; //
|
||||
optional int32 action_type = 12; //0: none 1:reload 2:useitem 3:relive
|
||||
//optional int32 action_type = 12; //0: none 1:reload 2:useitem 3:relive
|
||||
//optional int32 action_duration = 22; //持续时间毫秒
|
||||
optional int32 skin = 13; //皮肤id
|
||||
optional int32 backpack = 14; //背包
|
||||
optional int32 helmet = 16; //头盔
|
||||
@ -326,7 +327,7 @@ message MFObjectPart
|
||||
optional MFSmokePart union_obj_9 = 10;
|
||||
}
|
||||
|
||||
//对象信息-部分
|
||||
//对象信息-全量
|
||||
message MFObjectFull
|
||||
{
|
||||
//1:player 2:obstacle 3:building 4:lootspawner 5:loot 6:deadbody 7:decal 8:projectile 9:smoke
|
||||
@ -346,14 +347,10 @@ message MFObjectFull
|
||||
//活跃玩家数据(当前)
|
||||
message MFActivePlayerData
|
||||
{
|
||||
optional float boost = 1;
|
||||
|
||||
//
|
||||
optional bool has_action = 2;
|
||||
optional float actoin_time = 3;
|
||||
optional float action_duration = 4;
|
||||
optional int32 action_item_id = 5;
|
||||
optional int32 action_target_id = 6;
|
||||
optional int32 actoin_type = 3; //0: none 1:reload 2:useitem 3:relive
|
||||
optional int32 action_duration = 5; //持续时间毫秒
|
||||
optional int32 action_item_id = 6;
|
||||
optional int32 action_target_id = 7;
|
||||
|
||||
optional int32 skin = 30; //皮肤id
|
||||
optional int32 backpack = 31; //背包
|
||||
@ -626,8 +623,6 @@ message SMUpdate
|
||||
repeated MFSmoke smokes = 25; //烟雾
|
||||
repeated MFEmote emotes = 23; //表情
|
||||
optional int32 ack = 24; //服务器最后处理的req id
|
||||
|
||||
optional uint32 data_flags32 = 256;
|
||||
}
|
||||
|
||||
//击杀
|
||||
|
Loading…
x
Reference in New Issue
Block a user