1
This commit is contained in:
parent
0a06e5ce31
commit
02ddb2df40
@ -444,3 +444,13 @@ void Car::RecalcSelfCollider()
|
||||
self_collider_->pos = a8::Vec2(hero_meta_->i->move_offset_x(), hero_meta_->i->move_offset_y());
|
||||
self_collider_->rad = hero_meta_->i->radius();
|
||||
}
|
||||
|
||||
bool Car::NeedCreatureCollision()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void Car::CheckCreatureCollision()
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -2771,13 +2771,3 @@ void Creature::OnBattleStart(Room* room)
|
||||
RemoveBuffByUniId(*itr);
|
||||
}
|
||||
}
|
||||
|
||||
bool Creature::NeedCreatureCollision()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void Creature::CheckCreatureCollision()
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -3498,7 +3498,7 @@ void Human::GMAddItem(int item_id, int item_num)
|
||||
Weapon* weapon = weapon = TakeonWeapon(item_meta);
|
||||
if (weapon) {
|
||||
if (GetCurrWeapon() != weapon) {
|
||||
SetCurWeapon(weapon);
|
||||
SetCurrWeapon(weapon);
|
||||
}
|
||||
weapon->weapon_id = item_id;
|
||||
weapon->weapon_lv = std::max(1, 1);
|
||||
|
@ -833,17 +833,19 @@ void Player::ProcPrepareItems(const ::google::protobuf::RepeatedField< ::google:
|
||||
} else {
|
||||
Weapon* weapon = TakeonWeapon(item_meta);
|
||||
if (weapon) {
|
||||
weapon->weapon_id = entity->item_id;
|
||||
weapon->weapon_lv = std::max(1, entity->item_level);
|
||||
weapon->weapon_id = item_meta->i->id();
|
||||
weapon->weapon_lv = std::max(1, 1);
|
||||
weapon->ammo = 0;
|
||||
weapon->meta = item_meta;
|
||||
weapon->Recalc();
|
||||
if (GetCurrWeapon() != weapon) {
|
||||
SetCurrWeapon(weapon);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case EQUIP_TYPE_CAR:
|
||||
}
|
||||
break;
|
||||
case EQUIP_TYPE_CAR:
|
||||
{
|
||||
int car_uniid = room->CreateAndTakeonCar(item_meta->i->id(), GetPos());
|
||||
if (car_uniid != -1) {
|
||||
|
@ -1386,11 +1386,10 @@ void Room::UpdateGasJump()
|
||||
gas_data_.pos_old = map_meta_->first_safearea_center;
|
||||
gas_data_.pos_old_bk = gas_data_.pos_old;
|
||||
{
|
||||
bool gen_ok = GenSmallCircle(gas_data_.pos_old,
|
||||
gas_data_.old_area_meta->i->rad(),
|
||||
gas_data_.new_area_meta->i->rad(),
|
||||
gas_data_.pos_new);
|
||||
assert(gen_ok);
|
||||
bool gen_ok = GenSmallCircle();
|
||||
if (!gen_ok) {
|
||||
abort();
|
||||
}
|
||||
}
|
||||
gas_data_.rad_old = gas_data_.old_area_meta->i->rad();
|
||||
gas_data_.rad_new = gas_data_.new_area_meta->i->rad();
|
||||
@ -1408,12 +1407,12 @@ void Room::UpdateGasJump()
|
||||
}
|
||||
}
|
||||
|
||||
bool Room::GenSmallCircle(a8::Vec2 big_circle_pos, float big_circle_rad, float small_circle_rad,
|
||||
a8::Vec2& out_pos)
|
||||
bool Room::GenSmallCircle()
|
||||
{
|
||||
if (big_circle_rad <= small_circle_rad) {
|
||||
if (gas_data_.new_area_meta->i->rad() >= gas_data_.old_area_meta->i->rad()) {
|
||||
abort();
|
||||
}
|
||||
#if 0
|
||||
a8::Vec2 dir = a8::Vec2::UP;
|
||||
dir.Rotate(a8::RandAngle());
|
||||
float rad = rand() % (int)(big_circle_rad - small_circle_rad);
|
||||
@ -1421,6 +1420,7 @@ bool Room::GenSmallCircle(a8::Vec2 big_circle_pos, float big_circle_rad, float s
|
||||
rad = 0.001f;
|
||||
}
|
||||
out_pos = big_circle_pos + dir * rad;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -3803,10 +3803,7 @@ void Room::ForwardGasRing(int n)
|
||||
gas_data_.pos_old = pre_pos;
|
||||
gas_data_.pos_old_bk = gas_data_.pos_old;
|
||||
{
|
||||
bool gen_ok = GenSmallCircle(gas_data_.pos_old,
|
||||
gas_data_.old_area_meta->i->rad(),
|
||||
gas_data_.new_area_meta->i->rad(),
|
||||
gas_data_.pos_new);
|
||||
bool gen_ok = GenSmallCircle();
|
||||
if (!gen_ok) {
|
||||
abort();
|
||||
}
|
||||
|
@ -199,8 +199,7 @@ private:
|
||||
void UpdateGasWaiting();
|
||||
void UpdateGasMoving();
|
||||
void UpdateGasJump();
|
||||
bool GenSmallCircle(a8::Vec2 big_circle_pos, float big_circle_rad, float small_circle_rad,
|
||||
a8::Vec2& out_pos);
|
||||
bool GenSmallCircle();
|
||||
void MatchTeam(Human* hum);
|
||||
void CombineTeam();
|
||||
void AirDrop(int appear_time, int box_id, int airdrop_id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user