1
This commit is contained in:
parent
438ea6eec3
commit
f98124ec0a
@ -399,5 +399,7 @@ const int TERMINATOR_BUFF_ID = 1033;
|
||||
const int TURN_OVER_SKILL_ID = 41001;
|
||||
|
||||
const int HUNLUAN_BUFFID = 6001;
|
||||
|
||||
const int kThroughWall_BUFFID = 6003;
|
||||
const int FLY_BUFFID = 7001;
|
||||
const int JUMP_BUFFID = 7002;
|
||||
|
@ -1351,19 +1351,23 @@ void Human::DoJump()
|
||||
{
|
||||
if (HasBuffEffect(kBET_Fly)) {
|
||||
RemoveBuffByEffectId(kBET_Fly);
|
||||
MustBeAddBuff(this, kThroughWall_BUFFID);
|
||||
MustBeAddBuff(this, JUMP_BUFFID);
|
||||
jump_frameno_ = room->GetFrameNo();
|
||||
SyncAroundPlayers(__FILE__, __LINE__, __func__);
|
||||
room->xtimer.AddDeadLineTimerAndAttach
|
||||
(MetaMgr::Instance()->jump_time * SERVER_FRAME_RATE,
|
||||
a8::XParams()
|
||||
.SetSender(this),
|
||||
[] (const a8::XParams& param)
|
||||
{
|
||||
Human* hum = (Human*)param.sender.GetUserData();
|
||||
hum->OnLand();
|
||||
},
|
||||
&xtimer_attacher.timer_list_);
|
||||
MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(JUMP_BUFFID);
|
||||
if (buff_meta) {
|
||||
room->xtimer.AddDeadLineTimerAndAttach
|
||||
(buff_meta->i->duration_time() * SERVER_FRAME_RATE,
|
||||
a8::XParams()
|
||||
.SetSender(this),
|
||||
[] (const a8::XParams& param)
|
||||
{
|
||||
Human* hum = (Human*)param.sender.GetUserData();
|
||||
hum->OnLand();
|
||||
},
|
||||
&xtimer_attacher.timer_list_);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -4280,6 +4284,7 @@ void Human::OnBuffRemove(const Buff& buff)
|
||||
void Human::OnLand()
|
||||
{
|
||||
//着陆
|
||||
RemoveBuffByEffectId(kBET_Jump);
|
||||
RemoveBuffByEffectId(kBET_ThroughWall);
|
||||
if (IsCollisionInMapService()) {
|
||||
a8::Vec2 old_pos = GetPos();
|
||||
|
@ -180,7 +180,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
MetaMgr::Instance()->jump_time = MetaMgr::Instance()->GetSysParamAsFloat("jump_time");
|
||||
MetaMgr::Instance()->K = MetaMgr::Instance()->GetSysParamAsFloat("K");
|
||||
MetaMgr::Instance()->kill_param = MetaMgr::Instance()->GetSysParamAsFloat("kill_parameter");
|
||||
MetaMgr::Instance()->rank_param = MetaMgr::Instance()->GetSysParamAsFloat("rank_parameter");
|
||||
|
@ -61,7 +61,6 @@ class MetaMgr : public a8::Singleton<MetaMgr>
|
||||
int zbmode_game_duration = 60 * 2;
|
||||
int zbmode_player_num = 15;
|
||||
int zbmode_init_zombie_num = 2;
|
||||
int jump_time = 10;
|
||||
float K = 100.0f;
|
||||
float kill_param = 0.0f;
|
||||
float rank_param = 0.0f;
|
||||
|
Loading…
x
Reference in New Issue
Block a user