1
This commit is contained in:
parent
e13bf7465c
commit
ee3faa6f61
@ -58,7 +58,9 @@ void CallFuncBuff::Activate()
|
|||||||
VP_Buff,
|
VP_Buff,
|
||||||
GetCaster().Get()->GetUniId(),
|
GetCaster().Get()->GetUniId(),
|
||||||
GetCaster().Get()->GetName(),
|
GetCaster().Get()->GetName(),
|
||||||
dmg_out
|
dmg_out,
|
||||||
|
0,
|
||||||
|
0
|
||||||
);
|
);
|
||||||
owner->GetTrigger()->Attacked(GetCaster().Get());
|
owner->GetTrigger()->Attacked(GetCaster().Get());
|
||||||
}
|
}
|
||||||
@ -219,7 +221,9 @@ void CallFuncBuff::Activate()
|
|||||||
VP_Buff,
|
VP_Buff,
|
||||||
GetCaster().Get()->GetUniId(),
|
GetCaster().Get()->GetUniId(),
|
||||||
GetCaster().Get()->GetName(),
|
GetCaster().Get()->GetName(),
|
||||||
dmg_out
|
dmg_out,
|
||||||
|
0,
|
||||||
|
0
|
||||||
);
|
);
|
||||||
owner->GetTrigger()->Attacked(GetCaster().Get());
|
owner->GetTrigger()->Attacked(GetCaster().Get());
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,9 @@ void DiveBuff::Activate()
|
|||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
"water",
|
"water",
|
||||||
dmg_out);
|
dmg_out,
|
||||||
|
0,
|
||||||
|
0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
&xtimer_attacher
|
&xtimer_attacher
|
||||||
|
@ -309,7 +309,9 @@ void Car::OnBulletHit(IBullet* bullet)
|
|||||||
bullet->GetGunMeta()->id(),
|
bullet->GetGunMeta()->id(),
|
||||||
bullet->GetSender().Get()->GetUniId(),
|
bullet->GetSender().Get()->GetUniId(),
|
||||||
bullet->GetSender().Get()->GetName(),
|
bullet->GetSender().Get()->GetName(),
|
||||||
dmg_out);
|
dmg_out,
|
||||||
|
0,
|
||||||
|
0);
|
||||||
if (bullet->GetSender().Get() &&
|
if (bullet->GetSender().Get() &&
|
||||||
!bullet->GetSender().Get()->dead &&
|
!bullet->GetSender().Get()->dead &&
|
||||||
dmg_out > 0.0f &&
|
dmg_out > 0.0f &&
|
||||||
@ -377,12 +379,14 @@ void Car::OnExplosionHit(Explosion* e)
|
|||||||
e->GetExplosionEffect(),
|
e->GetExplosionEffect(),
|
||||||
real_killer_id,
|
real_killer_id,
|
||||||
real_killer_name,
|
real_killer_name,
|
||||||
dmg_out);
|
dmg_out,
|
||||||
|
0,
|
||||||
|
0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Car::DecHP(float dec_hp, int killer_id, const std::string killer_name, int weapon_id,
|
void Car::DecHP(float dec_hp, int killer_id, const std::string killer_name, int weapon_id,
|
||||||
int real_killer_id, const std::string real_killer_name,
|
int real_killer_id, const std::string real_killer_name,
|
||||||
float& real_dmg_out)
|
float& real_dmg_out, int dmg_type, int dmg_bp)
|
||||||
{
|
{
|
||||||
real_dmg_out = 0.0f;
|
real_dmg_out = 0.0f;
|
||||||
if (dec_hp < 0.001f) {
|
if (dec_hp < 0.001f) {
|
||||||
|
@ -43,7 +43,9 @@ class Car : public Creature
|
|||||||
virtual void DecHP(float dec_hp,
|
virtual void DecHP(float dec_hp,
|
||||||
int killer_id, const std::string killer_name, int weapon_id,
|
int killer_id, const std::string killer_name, int weapon_id,
|
||||||
int real_killer_id, const std::string real_killer_name,
|
int real_killer_id, const std::string real_killer_name,
|
||||||
float& real_dmg_out) override;
|
float& real_dmg_out,
|
||||||
|
int dmg_type,
|
||||||
|
int dmg_bp) override;
|
||||||
virtual void SendDebugMsg(const std::string& debug_msg) override;
|
virtual void SendDebugMsg(const std::string& debug_msg) override;
|
||||||
virtual void SetAttackDir(const glm::vec3& attack_dir) override;
|
virtual void SetAttackDir(const glm::vec3& attack_dir) override;
|
||||||
virtual void DropItems(Obstacle* obstacle) override;
|
virtual void DropItems(Obstacle* obstacle) override;
|
||||||
|
@ -78,7 +78,9 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg)
|
|||||||
DecHP(dmg, VP_Gas, TEXT("battle_server_killer_gas", "毒圈"), VW_Gas,
|
DecHP(dmg, VP_Gas, TEXT("battle_server_killer_gas", "毒圈"), VW_Gas,
|
||||||
VP_Gas,
|
VP_Gas,
|
||||||
TEXT("battle_server_killer_gas", "毒圈"),
|
TEXT("battle_server_killer_gas", "毒圈"),
|
||||||
dmg_out);
|
dmg_out,
|
||||||
|
0,
|
||||||
|
0);
|
||||||
} else if (cmd == "stop_world") {
|
} else if (cmd == "stop_world") {
|
||||||
room->stop_world = true;
|
room->stop_world = true;
|
||||||
} else if (cmd == "start_world") {
|
} else if (cmd == "start_world") {
|
||||||
@ -121,7 +123,9 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg)
|
|||||||
DecHP(dmg, VP_Gas, TEXT("battle_server_killer_gas", "毒圈"), VW_Gas,
|
DecHP(dmg, VP_Gas, TEXT("battle_server_killer_gas", "毒圈"), VW_Gas,
|
||||||
VP_Gas,
|
VP_Gas,
|
||||||
TEXT("battle_server_killer_gas", "毒圈"),
|
TEXT("battle_server_killer_gas", "毒圈"),
|
||||||
dmg_out);
|
dmg_out,
|
||||||
|
0,
|
||||||
|
0);
|
||||||
}
|
}
|
||||||
} else if (cmd == "add_shield") {
|
} else if (cmd == "add_shield") {
|
||||||
if (cmds.size() > 1) {
|
if (cmds.size() > 1) {
|
||||||
|
@ -1382,7 +1382,9 @@ void Creature::UpdatePoisoning()
|
|||||||
DecHP(dmg, VP_Gas, TEXT("battle_server_killer_gas", "毒圈"), VW_Gas,
|
DecHP(dmg, VP_Gas, TEXT("battle_server_killer_gas", "毒圈"), VW_Gas,
|
||||||
VP_Gas,
|
VP_Gas,
|
||||||
TEXT("battle_server_killer_gas", "毒圈"),
|
TEXT("battle_server_killer_gas", "毒圈"),
|
||||||
dmg_out);
|
dmg_out,
|
||||||
|
0,
|
||||||
|
0);
|
||||||
if (IsPlayer()) {
|
if (IsPlayer()) {
|
||||||
int eliminate_time = std::min(30.0f, GetHP() / std::max(1.0f, dmg_out));
|
int eliminate_time = std::min(30.0f, GetHP() / std::max(1.0f, dmg_out));
|
||||||
room->frame_event.AddPropChg(GetWeakPtrRef(),
|
room->frame_event.AddPropChg(GetWeakPtrRef(),
|
||||||
|
@ -262,7 +262,9 @@ class Creature : public MoveableEntity
|
|||||||
virtual void DecHP(float dec_hp, int killer_id,
|
virtual void DecHP(float dec_hp, int killer_id,
|
||||||
const std::string killer_name, int weapon_id,
|
const std::string killer_name, int weapon_id,
|
||||||
int real_killer_id, const std::string real_killer_name,
|
int real_killer_id, const std::string real_killer_name,
|
||||||
float& real_dmg_out) {};
|
float& real_dmg_out,
|
||||||
|
int dmg_type,
|
||||||
|
int dmg_bp) {};
|
||||||
void AddHp(float hp);
|
void AddHp(float hp);
|
||||||
void SetHP(float hp);
|
void SetHP(float hp);
|
||||||
void SetMaxHP(float max_hp);
|
void SetMaxHP(float max_hp);
|
||||||
|
@ -163,7 +163,9 @@ void Hero::OnExplosionHit(Explosion* e)
|
|||||||
e->GetExplosionEffect(),
|
e->GetExplosionEffect(),
|
||||||
real_killer_id,
|
real_killer_id,
|
||||||
real_killer_name,
|
real_killer_name,
|
||||||
dmg_out);
|
dmg_out,
|
||||||
|
0,
|
||||||
|
0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hero::OnBulletHit(IBullet* bullet)
|
void Hero::OnBulletHit(IBullet* bullet)
|
||||||
@ -195,7 +197,9 @@ void Hero::OnBulletHit(IBullet* bullet)
|
|||||||
bullet->GetGunMeta()->id(),
|
bullet->GetGunMeta()->id(),
|
||||||
bullet->GetSender().Get()->GetUniId(),
|
bullet->GetSender().Get()->GetUniId(),
|
||||||
bullet->GetSender().Get()->GetName(),
|
bullet->GetSender().Get()->GetName(),
|
||||||
dmg_out);
|
dmg_out,
|
||||||
|
0,
|
||||||
|
0);
|
||||||
if (bullet->GetSender().Get() &&
|
if (bullet->GetSender().Get() &&
|
||||||
!bullet->GetSender().Get()->dead &&
|
!bullet->GetSender().Get()->dead &&
|
||||||
dmg_out > 0.0f &&
|
dmg_out > 0.0f &&
|
||||||
@ -265,7 +269,9 @@ void Hero::DetachFromMaster()
|
|||||||
|
|
||||||
void Hero::DecHP(float dec_hp, int killer_id, const std::string killer_name, int weapon_id,
|
void Hero::DecHP(float dec_hp, int killer_id, const std::string killer_name, int weapon_id,
|
||||||
int real_killer_id, const std::string real_killer_name,
|
int real_killer_id, const std::string real_killer_name,
|
||||||
float& real_dmg_out)
|
float& real_dmg_out,
|
||||||
|
int dmg_type,
|
||||||
|
int dmg_bp)
|
||||||
{
|
{
|
||||||
real_dmg_out = 0.0f;
|
real_dmg_out = 0.0f;
|
||||||
if (!room->BattleStarted()) {
|
if (!room->BattleStarted()) {
|
||||||
|
@ -28,7 +28,9 @@ public:
|
|||||||
virtual void DecHP(float dec_hp,
|
virtual void DecHP(float dec_hp,
|
||||||
int killer_id, const std::string killer_name, int weapon_id,
|
int killer_id, const std::string killer_name, int weapon_id,
|
||||||
int real_killer_id, const std::string real_killer_name,
|
int real_killer_id, const std::string real_killer_name,
|
||||||
float& real_dmg_out) override;
|
float& real_dmg_out,
|
||||||
|
int dmg_type,
|
||||||
|
int dmg_bp) override;
|
||||||
virtual std::string GetName() override;
|
virtual std::string GetName() override;
|
||||||
virtual void DropItems(Obstacle* obstacle) override;
|
virtual void DropItems(Obstacle* obstacle) override;
|
||||||
virtual const mt::Hero* GetHeroMeta() override { return meta; };
|
virtual const mt::Hero* GetHeroMeta() override { return meta; };
|
||||||
|
@ -217,7 +217,9 @@ void Human::BeKill(int killer_id, const std::string& killer_name, int weapon_id,
|
|||||||
|
|
||||||
void Human::DecHP(float dec_hp, int killer_id, const std::string killer_name, int weapon_id,
|
void Human::DecHP(float dec_hp, int killer_id, const std::string killer_name, int weapon_id,
|
||||||
int real_killer_id, const std::string real_killer_name,
|
int real_killer_id, const std::string real_killer_name,
|
||||||
float& real_dmg_out)
|
float& real_dmg_out,
|
||||||
|
int dmg_type,
|
||||||
|
int dmg_bp)
|
||||||
{
|
{
|
||||||
real_dmg_out = 0.0f;
|
real_dmg_out = 0.0f;
|
||||||
if (!room->BattleStarted()) {
|
if (!room->BattleStarted()) {
|
||||||
@ -346,7 +348,9 @@ void Human::DecHP(float dec_hp, int killer_id, const std::string killer_name, in
|
|||||||
std::min(1.0f, (float)mt::Param::GetFloatParam("downed_dec_hp"));
|
std::min(1.0f, (float)mt::Param::GetFloatParam("downed_dec_hp"));
|
||||||
DecHP(dec_hp, info->killer_id, info->killer_name, info->weapon_id,
|
DecHP(dec_hp, info->killer_id, info->killer_name, info->weapon_id,
|
||||||
info->real_killer_id, info->real_killer_name,
|
info->real_killer_id, info->real_killer_name,
|
||||||
dmg_out);
|
dmg_out,
|
||||||
|
0,
|
||||||
|
0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
&xtimer_attacher);
|
&xtimer_attacher);
|
||||||
@ -2350,7 +2354,9 @@ void Human::OnBulletHit(IBullet* bullet)
|
|||||||
bullet->GetGunMeta()->id(),
|
bullet->GetGunMeta()->id(),
|
||||||
bullet->GetPassenger().Get()->GetUniId(),
|
bullet->GetPassenger().Get()->GetUniId(),
|
||||||
bullet->GetPassenger().Get()->GetName(),
|
bullet->GetPassenger().Get()->GetName(),
|
||||||
dmg_out);
|
dmg_out,
|
||||||
|
0,
|
||||||
|
0);
|
||||||
bullet->GetSender().Get()->GetTrigger()->DmgOut(this, dmg_out);
|
bullet->GetSender().Get()->GetTrigger()->DmgOut(this, dmg_out);
|
||||||
if (bullet->GetSender().Get() &&
|
if (bullet->GetSender().Get() &&
|
||||||
!bullet->GetSender().Get()->dead &&
|
!bullet->GetSender().Get()->dead &&
|
||||||
@ -2396,7 +2402,9 @@ void Human::OnBulletHit(IBullet* bullet)
|
|||||||
bullet->GetGunMeta()->id(),
|
bullet->GetGunMeta()->id(),
|
||||||
bullet->GetSender().Get()->GetUniId(),
|
bullet->GetSender().Get()->GetUniId(),
|
||||||
bullet->GetSender().Get()->GetName(),
|
bullet->GetSender().Get()->GetName(),
|
||||||
dmg_out);
|
dmg_out,
|
||||||
|
0,
|
||||||
|
0);
|
||||||
#if 0
|
#if 0
|
||||||
if (bullet->GetSender().Get()->IsEntityType(ET_Hero)) {
|
if (bullet->GetSender().Get()->IsEntityType(ET_Hero)) {
|
||||||
a8::XPrintf("被炮塔打出血 %f %f %f\n", {GetHP(), GetMaxHP(), dmg_out});
|
a8::XPrintf("被炮塔打出血 %f %f %f\n", {GetHP(), GetMaxHP(), dmg_out});
|
||||||
@ -2493,7 +2501,9 @@ void Human::OnExplosionHit(Explosion* e)
|
|||||||
e->GetExplosionEffect(),
|
e->GetExplosionEffect(),
|
||||||
real_killer_id,
|
real_killer_id,
|
||||||
real_killer_name,
|
real_killer_name,
|
||||||
dmg_out);
|
dmg_out,
|
||||||
|
0,
|
||||||
|
0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,7 +169,9 @@ class Human : public Creature
|
|||||||
virtual void DecHP(float dec_hp,
|
virtual void DecHP(float dec_hp,
|
||||||
int killer_id, const std::string killer_name, int weapon_id,
|
int killer_id, const std::string killer_name, int weapon_id,
|
||||||
int real_killer_id, const std::string real_killer_name,
|
int real_killer_id, const std::string real_killer_name,
|
||||||
float& real_dmg_out) override;
|
float& real_dmg_out,
|
||||||
|
int dmg_type,
|
||||||
|
int dmg_bp) override;
|
||||||
virtual void AddToNewObjects(Entity* entity) override;
|
virtual void AddToNewObjects(Entity* entity) override;
|
||||||
virtual void AddToPartObjects(Entity* entity) override;
|
virtual void AddToPartObjects(Entity* entity) override;
|
||||||
virtual void AddToImageObjects(Creature* c) override;
|
virtual void AddToImageObjects(Creature* c) override;
|
||||||
|
@ -1806,7 +1806,9 @@ void Player::_CMReportSpecShotHitPos(f8::MsgHdr* hdr, const cs::CMReportSpecShot
|
|||||||
if (target->GetPos().Distance2D2(pos) < 200) {
|
if (target->GetPos().Distance2D2(pos) < 200) {
|
||||||
float real_dmg_out = 0.0f;
|
float real_dmg_out = 0.0f;
|
||||||
target->DecHP(100, GetUniId(), GetName(), VW_Weapon,
|
target->DecHP(100, GetUniId(), GetName(), VW_Weapon,
|
||||||
GetUniId(), GetName(), real_dmg_out);
|
GetUniId(), GetName(), real_dmg_out,
|
||||||
|
0,
|
||||||
|
0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -868,7 +868,9 @@ void RoomObstacle::ActiveMedicalStation()
|
|||||||
VP_Buff,
|
VP_Buff,
|
||||||
master.Get()->GetUniId(),
|
master.Get()->GetUniId(),
|
||||||
master.Get()->GetName(),
|
master.Get()->GetName(),
|
||||||
dmg_out);
|
dmg_out,
|
||||||
|
0,
|
||||||
|
0);
|
||||||
|
|
||||||
if (meta->_int_param1) {
|
if (meta->_int_param1) {
|
||||||
c->TryAddBuff(master.Get(),
|
c->TryAddBuff(master.Get(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user