每天第一次玩允许复活两次
This commit is contained in:
parent
867cee0414
commit
c44d5b4a5b
@ -749,6 +749,9 @@ void Human::BeKill(int killer_id, const std::string& killer_name, int weapon_id)
|
|||||||
dead_frameno = room->frame_no;
|
dead_frameno = room->frame_no;
|
||||||
++dead_times;
|
++dead_times;
|
||||||
int max_revive_times = MetaMgr::Instance()->GetSysParamAsInt("max_revive_times", 1);
|
int max_revive_times = MetaMgr::Instance()->GetSysParamAsInt("max_revive_times", 1);
|
||||||
|
if (today_enter_times == 0) {
|
||||||
|
++max_revive_times;
|
||||||
|
}
|
||||||
if (weapon_id != VW_Spectate &&
|
if (weapon_id != VW_Spectate &&
|
||||||
dead_times <= max_revive_times &&
|
dead_times <= max_revive_times &&
|
||||||
room->AliveCount() > 2 &&
|
room->AliveCount() > 2 &&
|
||||||
|
@ -44,6 +44,7 @@ class Human : public Entity
|
|||||||
std::string from_appid;
|
std::string from_appid;
|
||||||
std::string team_uuid;
|
std::string team_uuid;
|
||||||
bool auto_fill = false;
|
bool auto_fill = false;
|
||||||
|
int today_enter_times = 0;
|
||||||
int account_registertime = 0;
|
int account_registertime = 0;
|
||||||
MetaData::Player* meta = nullptr;
|
MetaData::Player* meta = nullptr;
|
||||||
MetaData::Equip* helmet_meta = nullptr;
|
MetaData::Equip* helmet_meta = nullptr;
|
||||||
|
@ -51,6 +51,7 @@ Player* PlayerMgr::CreatePlayerByCMJoin(long ip_saddr, int socket, const cs::CMJ
|
|||||||
hum->use_touch = msg.use_touch();
|
hum->use_touch = msg.use_touch();
|
||||||
hum->avatar_url = msg.avatar_url();
|
hum->avatar_url = msg.avatar_url();
|
||||||
hum->energy_shield = msg.energy_shield();
|
hum->energy_shield = msg.energy_shield();
|
||||||
|
hum->today_enter_times = msg.today_enter_times();
|
||||||
hum->create_tick = a8::XGetTickCount();
|
hum->create_tick = a8::XGetTickCount();
|
||||||
hum->account_registertime = f8::ExtractRegisterTimeFromSessionId(msg.session_id());
|
hum->account_registertime = f8::ExtractRegisterTimeFromSessionId(msg.session_id());
|
||||||
hum->atk_add = msg.atk_add();
|
hum->atk_add = msg.atk_add();
|
||||||
|
@ -655,6 +655,7 @@ message CMJoin
|
|||||||
optional int32 emoji2 = 25; //表情2
|
optional int32 emoji2 = 25; //表情2
|
||||||
optional int32 parachute = 26; //降落伞
|
optional int32 parachute = 26; //降落伞
|
||||||
optional bool has_pass = 27; //是否有通行证
|
optional bool has_pass = 27; //是否有通行证
|
||||||
|
optional int32 today_enter_times = 28; //今天进入游戏的次数
|
||||||
}
|
}
|
||||||
|
|
||||||
//移动
|
//移动
|
||||||
|
Loading…
x
Reference in New Issue
Block a user