1
This commit is contained in:
parent
4a80e4e660
commit
e987129307
@ -27,6 +27,7 @@ enum CreatureStatus
|
|||||||
{
|
{
|
||||||
CS_AlreadyLordMode = 1,
|
CS_AlreadyLordMode = 1,
|
||||||
CS_Disable = 2,
|
CS_Disable = 2,
|
||||||
|
CS_Collisioning = 3,
|
||||||
CS_DisableAttack = 8,
|
CS_DisableAttack = 8,
|
||||||
CS_End
|
CS_End
|
||||||
};
|
};
|
||||||
|
@ -1775,11 +1775,12 @@ void Human::_UpdateSpecMove()
|
|||||||
void Human::_UpdateMove(int speed)
|
void Human::_UpdateMove(int speed)
|
||||||
{
|
{
|
||||||
if (!HasBuffEffect(kBET_Vertigo)) {
|
if (!HasBuffEffect(kBET_Vertigo)) {
|
||||||
|
a8::UnSetBitFlag(status, CS_Collisioning);
|
||||||
do {
|
do {
|
||||||
int distance = std::min(5, speed);
|
int distance = std::min(5, speed);
|
||||||
_InternalUpdateMove(distance);
|
_InternalUpdateMove(distance);
|
||||||
speed -= distance;
|
speed -= distance;
|
||||||
} while (speed > 0);
|
} while (speed > 0 && !a8::HasBitFlag(status, CS_Collisioning));
|
||||||
CheckSpecObject();
|
CheckSpecObject();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1918,9 +1919,17 @@ void Human::_InternalUpdateMove(float speed)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if (a8::HasBitFlag(status, CS_Collisioning)) {
|
||||||
|
SetPos(old_pos);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SetPos(old_pos + a8::Vec2(nx, 0));
|
SetPos(old_pos + a8::Vec2(nx, 0));
|
||||||
if (IsCollisionInMapService()) {
|
if (IsCollisionInMapService()) {
|
||||||
|
if (a8::HasBitFlag(status, CS_Collisioning)) {
|
||||||
|
SetPos(old_pos);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (on_move_collision && !on_move_collision()) {
|
if (on_move_collision && !on_move_collision()) {
|
||||||
SetPos(old_pos);
|
SetPos(old_pos);
|
||||||
return;
|
return;
|
||||||
@ -1930,6 +1939,10 @@ void Human::_InternalUpdateMove(float speed)
|
|||||||
|
|
||||||
SetPos(old_pos + a8::Vec2(nx, ny));
|
SetPos(old_pos + a8::Vec2(nx, ny));
|
||||||
if (IsCollisionInMapService()) {
|
if (IsCollisionInMapService()) {
|
||||||
|
if (a8::HasBitFlag(status, CS_Collisioning)) {
|
||||||
|
SetPos(old_pos);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (on_move_collision && !on_move_collision()) {
|
if (on_move_collision && !on_move_collision()) {
|
||||||
SetPos(old_pos);
|
SetPos(old_pos);
|
||||||
return;
|
return;
|
||||||
|
@ -3946,7 +3946,7 @@ void Room::AirRaid(int airraid_id)
|
|||||||
(SERVER_FRAME_RATE * raid_meta->i->appear_time() / 1000.f,
|
(SERVER_FRAME_RATE * raid_meta->i->appear_time() / 1000.f,
|
||||||
a8::XParams()
|
a8::XParams()
|
||||||
.SetSender(this)
|
.SetSender(this)
|
||||||
.SetParam2(raid_meta)
|
.SetParam1(raid_meta)
|
||||||
.SetParam2(center.x)
|
.SetParam2(center.x)
|
||||||
.SetParam3(center.y),
|
.SetParam3(center.y),
|
||||||
raid_cb,
|
raid_cb,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user