1
This commit is contained in:
parent
1a8990cc59
commit
e776c8a890
@ -38,6 +38,7 @@ void MachineGunBuff::SwitchWeapons()
|
|||||||
Weapon* weapon = &caster_.Get()->weapons[weapon_idx];
|
Weapon* weapon = &caster_.Get()->weapons[weapon_idx];
|
||||||
hold_weapons_.push_back(*weapon);
|
hold_weapons_.push_back(*weapon);
|
||||||
|
|
||||||
|
weapon->weapon_uniid = 0;
|
||||||
weapon->weapon_id = weapon_meta->id();
|
weapon->weapon_id = weapon_meta->id();
|
||||||
weapon->meta = weapon_meta;
|
weapon->meta = weapon_meta;
|
||||||
weapon->skill_meta = skill_meta;
|
weapon->skill_meta = skill_meta;
|
||||||
|
@ -166,6 +166,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)
|
||||||
{
|
{
|
||||||
|
if (!room->BattleStarted()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (dec_hp < 0.001f) {
|
if (dec_hp < 0.001f) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -453,15 +453,31 @@ float Human::GetSpeed()
|
|||||||
if (GetCurrWeapon()->weapon_idx == GUN_SLOT1 ||
|
if (GetCurrWeapon()->weapon_idx == GUN_SLOT1 ||
|
||||||
GetCurrWeapon()->weapon_idx == GUN_SLOT2) {
|
GetCurrWeapon()->weapon_idx == GUN_SLOT2) {
|
||||||
if (action_type != AT_Reload) {
|
if (action_type != AT_Reload) {
|
||||||
return meta->shot_speed() * (1 + GetAbility()->GetAttrRate(kHAT_ShotSpeed));
|
speed = meta->shot_speed() * (1 + GetAbility()->GetAttrRate(kHAT_ShotSpeed));
|
||||||
|
if (HasBuffEffect(kBET_InWater)) {
|
||||||
|
speed *= mt::Param::s().water_move_coefficient;
|
||||||
|
}
|
||||||
|
return speed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (aiming) {
|
} else if (aiming) {
|
||||||
return std::max(1, meta->aiming_speed());
|
speed = std::max(1, meta->aiming_speed());
|
||||||
|
if (HasBuffEffect(kBET_InWater)) {
|
||||||
|
speed *= mt::Param::s().water_move_coefficient;
|
||||||
|
}
|
||||||
|
return speed;
|
||||||
} else if (action_type == AT_Reload) {
|
} else if (action_type == AT_Reload) {
|
||||||
return std::max(1, meta->reload_speed());
|
speed = std::max(1, meta->reload_speed());
|
||||||
|
if (HasBuffEffect(kBET_InWater)) {
|
||||||
|
speed *= mt::Param::s().water_move_coefficient;
|
||||||
|
}
|
||||||
|
return speed;
|
||||||
} else if (action_type == AT_UseItem) {
|
} else if (action_type == AT_UseItem) {
|
||||||
return std::max(1, meta->useitem_speed());
|
speed = std::max(1, meta->useitem_speed());
|
||||||
|
if (HasBuffEffect(kBET_InWater)) {
|
||||||
|
speed *= mt::Param::s().water_move_coefficient;
|
||||||
|
}
|
||||||
|
return speed;
|
||||||
}
|
}
|
||||||
speed = meta->move_speed();
|
speed = meta->move_speed();
|
||||||
}
|
}
|
||||||
|
@ -247,6 +247,8 @@ class Human : public Creature
|
|||||||
int pain_killer_lastingtime = 0;
|
int pain_killer_lastingtime = 0;
|
||||||
a8::XTimerWp pain_killer_timer;
|
a8::XTimerWp pain_killer_timer;
|
||||||
|
|
||||||
|
a8::XTimerWp shen_bao_timer;
|
||||||
|
|
||||||
a8::XTimerWp downed_timer;
|
a8::XTimerWp downed_timer;
|
||||||
|
|
||||||
std::set<Human*> kill_humans;
|
std::set<Human*> kill_humans;
|
||||||
|
@ -956,12 +956,12 @@ void Human::FillMFActivePlayerData(cs::MFActivePlayerData* player_data)
|
|||||||
int action_param = 0;
|
int action_param = 0;
|
||||||
switch (action_item_id) {
|
switch (action_item_id) {
|
||||||
case IS_HEALTHKIT:
|
case IS_HEALTHKIT:
|
||||||
case IS_SHEN_BAO:
|
|
||||||
{
|
{
|
||||||
action_param = item_meta->heal();
|
action_param = item_meta->heal();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IS_PAIN_KILLER:
|
case IS_PAIN_KILLER:
|
||||||
|
case IS_SHEN_BAO:
|
||||||
{
|
{
|
||||||
action_param = item_meta->heal() * item_meta->time();
|
action_param = item_meta->heal() * item_meta->time();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user