This commit is contained in:
aozhiwei 2023-05-23 14:20:21 +08:00
parent 8227b6abd3
commit a009046449
4 changed files with 26 additions and 6 deletions

View File

@ -258,6 +258,8 @@ enum PropertyType_e
kPropGuideStep = 46, kPropGuideStep = 46,
kPropBlueStone = 47, kPropBlueStone = 47,
kPropPurpleStone = 48, kPropPurpleStone = 48,
kPropArmorShield = 49,
}; };
enum SkinSlot_e enum SkinSlot_e

View File

@ -256,7 +256,17 @@ void Human::DecHP(float dec_hp, int killer_id, const std::string killer_name, in
last_receive_dmg_frameno = room->GetFrameNo(); last_receive_dmg_frameno = room->GetFrameNo();
float old_hp = GetHP(); float old_hp = GetHP();
if (energy_shield > 0.001f) { if (armor_shield > 0.0001f){
armor_shield = std::max(0.0f, armor_shield - dec_hp);
room->frame_event.AddPropChg
(
GetWeakPtrRef(),
kPropEnergyShield,
armor_shield,
max_armor_shield,
true);
GetTrigger()->ReceiveDmg();
} else if (energy_shield > 0.001f) {
energy_shield = std::max(0.0f, energy_shield - dec_hp); energy_shield = std::max(0.0f, energy_shield - dec_hp);
room->frame_event.AddPropChg room->frame_event.AddPropChg
( (

View File

@ -2260,7 +2260,7 @@ void Room::NotifyGameStart()
long long Room::GetGasInactiveTime() long long Room::GetGasInactiveTime()
{ {
#ifdef DEBUG #ifdef DEBUG
return 30; return 12;
#endif #endif
if (IsPveRoom()) { if (IsPveRoom()) {
return 10; return 10;

View File

@ -223,6 +223,9 @@ message MFVec3
value: value:
property_type: 48 property_type: 48
value: value:
property_type: 49
property_subtype:
value: max护甲值
*/ */
message MFPropertyChg message MFPropertyChg
{ {
@ -362,8 +365,8 @@ message MFPlayerFull
optional int32 team_member_num = 70 [default = 0]; // optional int32 team_member_num = 70 [default = 0]; //
optional int32 armor_shield = 73; // optional int32 armor_shield = 73; //
optional int32 max_armor_shield = 74; // optional int32 max_armor_shield = 74; //
} }
@ -630,8 +633,8 @@ message MFActivePlayerData
optional int32 gemstone = 68; // optional int32 gemstone = 68; //
optional int32 armor_shield = 73; // optional int32 armor_shield = 73; //
optional int32 max_armor_shield = 74; // optional int32 max_armor_shield = 74; //
} }
// //
@ -1375,6 +1378,9 @@ message CMMove
optional MFThrow throw_bomb = 44; // optional MFThrow throw_bomb = 44; //
optional MFVec3 sand_table_target_pos = 45; // optional MFVec3 sand_table_target_pos = 45; //
optional MFVec3 shot_target_pos = 46; //()
optional MFVec3 shot_client_pos = 47; //
} }
// //
@ -1532,6 +1538,8 @@ message SMJoinedNotify
optional int32 adjust_bullet = 12; //( 1:) optional int32 adjust_bullet = 12; //( 1:)
optional int32 is_newbie_room = 13; // optional int32 is_newbie_room = 13; //
optional int32 pre_client_shot = 14; //
} }
// //