1
This commit is contained in:
parent
568e7449b4
commit
2236a9b640
@ -52,7 +52,13 @@ void Human::Initialize()
|
||||
|
||||
float Human::GetSpeed()
|
||||
{
|
||||
return meta->i->move_speed() + buff.speed;
|
||||
if (a8::HasBitFlag(status, HS_Jump)) {
|
||||
return meta->i->jump_speed() + buff.speed;
|
||||
} if (downed) {
|
||||
return meta->i->move_speed3() + buff.speed;
|
||||
} else {
|
||||
return meta->i->move_speed() + buff.speed;
|
||||
}
|
||||
}
|
||||
|
||||
float Human::GetSpeed4()
|
||||
|
@ -447,10 +447,14 @@ void Player::Shot()
|
||||
CancelAction();
|
||||
}
|
||||
|
||||
#if 1
|
||||
if (true) {
|
||||
#else
|
||||
if (room->gas_data.gas_mode != GasInactive &&
|
||||
!a8::HasBitFlag(status, HS_Fly) &&
|
||||
!a8::HasBitFlag(status, HS_Jump)
|
||||
) {
|
||||
#endif
|
||||
for (auto& tuple : curr_weapon->meta->bullet_born_offset) {
|
||||
Vector2D bullet_born_offset = Vector2D(std::get<0>(tuple), std::get<1>(tuple));
|
||||
bullet_born_offset.Rotate(attack_dir.CalcAngle(Vector2D::UP));
|
||||
@ -465,13 +469,15 @@ void Player::Shot()
|
||||
bullet_born_offset.Rotate(attack_dir.CalcAngle(Vector2D::UP));
|
||||
Vector2D bullet_born_pos = pos + bullet_born_offset;
|
||||
Vector2D bullet_dir = attack_dir;
|
||||
float bullet_angle = std::get<0>(tuple);
|
||||
float bullet_angle = std::get<2>(tuple);
|
||||
if (curr_weapon->meta->i->bullet_angle() >= 1.0f) {
|
||||
bullet_angle += (rand() % (int)curr_weapon->meta->i->bullet_angle()) * (rand() % 2 == 0 ? 1 : -1);
|
||||
}
|
||||
bullet_dir.Rotate(bullet_angle / 180.0f);
|
||||
room->frame_event.AddBullet(this, bullet_born_pos, bullet_dir, fly_distance);
|
||||
room->CreateBullet(this, curr_weapon->meta, bullet_born_pos, bullet_dir, fly_distance);
|
||||
if (room->BattleStarted()) {
|
||||
room->CreateBullet(this, curr_weapon->meta, bullet_born_pos, bullet_dir, fly_distance);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
|
@ -88,9 +88,11 @@ message Player
|
||||
optional float radius = 2; //半径
|
||||
optional int32 health = 3; //初始血量
|
||||
optional int32 move_speed = 4; //移动速度
|
||||
optional int32 jump_speed = 5; //跳伞速度
|
||||
optional int32 move_speed3 = 6;
|
||||
optional int32 move_speed4 = 10; //移动速度4
|
||||
optional float def = 5; //防御
|
||||
optional string volume = 6; //初始库存
|
||||
optional float def = 11; //防御
|
||||
optional string volume = 12; //初始库存
|
||||
}
|
||||
|
||||
message Skill
|
||||
|
Loading…
x
Reference in New Issue
Block a user