This commit is contained in:
aozhiwei 2021-05-06 13:20:11 +08:00
parent bb422ec177
commit 39afdbe2c7
4 changed files with 4 additions and 9 deletions

View File

@ -57,11 +57,9 @@ void InternalShot(Creature* c,
} }
} }
bullet_dir.Rotate(bullet_angle / 180.0f); bullet_dir.Rotate(bullet_angle / 180.0f);
#if 0 #if 1
if (hum->GetCar()) { bullet_born_pos.x += c->shoot_offset.x;
bullet_born_pos.x += MetaMgr::Instance()->horse_shoot_x; bullet_born_pos.y += c->shoot_offset.y;
bullet_born_pos.y += MetaMgr::Instance()->horse_shoot_y;
}
#endif #endif
c->room->frame_event.AddBullet(c, c->room->frame_event.AddBullet(c,
weapon_meta, weapon_meta,

View File

@ -40,6 +40,7 @@ class Creature : public MoveableEntity
int team_id = 0; int team_id = 0;
bool aiming = false; bool aiming = false;
a8::Vec2 attack_dir; a8::Vec2 attack_dir;
a8::Vec2 shoot_offset;
HumanAbility ability; HumanAbility ability;
a8::Vec2 target_pos; a8::Vec2 target_pos;
std::function<bool ()> on_move_collision; std::function<bool ()> on_move_collision;

View File

@ -195,8 +195,6 @@ public:
MetaMgr::Instance()->tank_damage_interval = MetaMgr::Instance()->GetSysParamAsFloat("tank_damage_interval", 1); MetaMgr::Instance()->tank_damage_interval = MetaMgr::Instance()->GetSysParamAsFloat("tank_damage_interval", 1);
MetaMgr::Instance()->average_oil = MetaMgr::Instance()->GetSysParamAsInt("average_oil"); MetaMgr::Instance()->average_oil = MetaMgr::Instance()->GetSysParamAsInt("average_oil");
MetaMgr::Instance()->max_oil = MetaMgr::Instance()->GetSysParamAsInt("max_oil"); MetaMgr::Instance()->max_oil = MetaMgr::Instance()->GetSysParamAsInt("max_oil");
MetaMgr::Instance()->horse_shoot_x = MetaMgr::Instance()->GetSysParamAsInt("horse_shoot_x");
MetaMgr::Instance()->horse_shoot_y = MetaMgr::Instance()->GetSysParamAsInt("horse_shoot_y");
MetaMgr::Instance()->max_mount_horse_distance = MetaMgr::Instance()->GetSysParamAsFloat("max_mount_horse_distance", 100); MetaMgr::Instance()->max_mount_horse_distance = MetaMgr::Instance()->GetSysParamAsFloat("max_mount_horse_distance", 100);
MetaMgr::Instance()->newbie_game_times = MetaMgr::Instance()->GetSysParamAsInt("newbie_game_times", 5); MetaMgr::Instance()->newbie_game_times = MetaMgr::Instance()->GetSysParamAsInt("newbie_game_times", 5);
MetaMgr::Instance()->niube_win_times = MetaMgr::Instance()->GetSysParamAsInt("niube_win_times", 1); MetaMgr::Instance()->niube_win_times = MetaMgr::Instance()->GetSysParamAsInt("niube_win_times", 1);

View File

@ -75,8 +75,6 @@ class MetaMgr : public a8::Singleton<MetaMgr>
float tank_damage_interval = 0.0f; float tank_damage_interval = 0.0f;
float average_oil = 0.0f; float average_oil = 0.0f;
float max_oil = 0.0f; float max_oil = 0.0f;
float horse_shoot_x = 0.0f;
float horse_shoot_y = 0.0f;
float max_mount_horse_distance = 100.0f; float max_mount_horse_distance = 100.0f;
int newbie_game_times = 0; int newbie_game_times = 0;
int niube_win_times = 0; int niube_win_times = 0;