1
This commit is contained in:
parent
4e3f00bc68
commit
bdf403485b
@ -404,7 +404,8 @@ void Player::UpdateJump()
|
|||||||
{
|
{
|
||||||
if (a8::HasBitFlag(status, HS_Fly)) {
|
if (a8::HasBitFlag(status, HS_Fly)) {
|
||||||
DoJump();
|
DoJump();
|
||||||
room->xtimer.AddDeadLineTimerAndAttach(SERVER_FRAME_RATE * 3,
|
for (size_t i = 0; i < 4; ++i){
|
||||||
|
room->xtimer.AddDeadLineTimerAndAttach(SERVER_FRAME_RATE / 10,
|
||||||
a8::XParams()
|
a8::XParams()
|
||||||
.SetSender(this),
|
.SetSender(this),
|
||||||
[] (const a8::XParams& param)
|
[] (const a8::XParams& param)
|
||||||
@ -415,7 +416,7 @@ void Player::UpdateJump()
|
|||||||
.SetSender(hum),
|
.SetSender(hum),
|
||||||
[] (Human* hum, a8::XParams& param) -> bool
|
[] (Human* hum, a8::XParams& param) -> bool
|
||||||
{
|
{
|
||||||
if (a8::HasBitFlag(hum->status, HS_Fly)) {
|
if (a8::HasBitFlag(hum->status, HS_Fly) && hum->entity_subtype != EST_Player) {
|
||||||
hum->DoJump();
|
hum->DoJump();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -424,6 +425,7 @@ void Player::UpdateJump()
|
|||||||
},
|
},
|
||||||
&xtimer_attacher.timer_list_);
|
&xtimer_attacher.timer_list_);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
jump = false;
|
jump = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -368,6 +368,12 @@ void Room::CollisionDetection(Entity* sender, int detection_flags, std::vector<E
|
|||||||
if (sender == pair.second) {
|
if (sender == pair.second) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
#if 1
|
||||||
|
if (std::abs(sender->pos.x - pair.second->pos.x) > 1000 ||
|
||||||
|
std::abs(sender->pos.y - pair.second->pos.y) > 1000){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (a8::HasBitFlag(detection_flags, ET_Player) && pair.second->entity_type == ET_Player) {
|
if (a8::HasBitFlag(detection_flags, ET_Player) && pair.second->entity_type == ET_Player) {
|
||||||
if (sender->entity_type == ET_Bullet) {
|
if (sender->entity_type == ET_Bullet) {
|
||||||
Bullet* bullet = (Bullet*)sender;
|
Bullet* bullet = (Bullet*)sender;
|
||||||
@ -814,8 +820,8 @@ void Room::UpdateGas()
|
|||||||
gas_data.gas_start_frameno = frame_no;
|
gas_data.gas_start_frameno = frame_no;
|
||||||
ShuaPlane();
|
ShuaPlane();
|
||||||
RoomMgr::Instance()->RemoveFromInactiveRoomHash(room_uuid);
|
RoomMgr::Instance()->RemoveFromInactiveRoomHash(room_uuid);
|
||||||
#if 1
|
for (size_t i = 1; i < 7; ++i) {
|
||||||
xtimer.AddDeadLineTimerAndAttach(SERVER_FRAME_RATE * 3,
|
xtimer.AddDeadLineTimerAndAttach(SERVER_FRAME_RATE * 3 * i,
|
||||||
a8::XParams()
|
a8::XParams()
|
||||||
.SetSender(this),
|
.SetSender(this),
|
||||||
[] (const a8::XParams& param)
|
[] (const a8::XParams& param)
|
||||||
@ -826,7 +832,7 @@ void Room::UpdateGas()
|
|||||||
.SetSender(room),
|
.SetSender(room),
|
||||||
[] (Human* hum, a8::XParams& param) -> bool
|
[] (Human* hum, a8::XParams& param) -> bool
|
||||||
{
|
{
|
||||||
if (a8::HasBitFlag(hum->status, HS_Fly)) {
|
if (a8::HasBitFlag(hum->status, HS_Fly) && hum->entity_subtype != EST_Player) {
|
||||||
hum->DoJump();
|
hum->DoJump();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -834,7 +840,7 @@ void Room::UpdateGas()
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
&xtimer_attacher.timer_list_);
|
&xtimer_attacher.timer_list_);
|
||||||
#endif
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user