This commit is contained in:
aozhiwei 2023-02-02 15:38:20 +08:00
parent 7712960d96
commit 473336892a
5 changed files with 6 additions and 4 deletions

View File

@ -534,5 +534,3 @@ const int CHECK_SHOT_HOLD_STATE_TIMER_EVENT = a8::TIMER_USER_EVENT + 1;
const int kReviveTimeAdd = 12; const int kReviveTimeAdd = 12;
const int kSkinNum = 4; const int kSkinNum = 4;
const int kMoveStep = 80;

View File

@ -2360,7 +2360,7 @@ void Creature::UpdateMove()
if (GetMovement()->UpdatePosition()) { if (GetMovement()->UpdatePosition()) {
} else { } else {
if (!GetMovement()->IsFindPath()) { if (!GetMovement()->IsFindPath()) {
GetMovement()->CalcTargetPos(kMoveStep); GetMovement()->CalcTargetPos(mt::Param::s().move_step_len);
if (GetMovement()->UpdatePosition()) { if (GetMovement()->UpdatePosition()) {
} }
} }

View File

@ -94,6 +94,8 @@ namespace mt
METAMGR_READ(dive_hp_consume, 20); METAMGR_READ(dive_hp_consume, 20);
METAMGR_READ(dive_explosion_dmg_switch, 0); METAMGR_READ(dive_explosion_dmg_switch, 0);
METAMGR_READ(inwater_oxygen_recover, 20); METAMGR_READ(inwater_oxygen_recover, 20);
METAMGR_READ(move_step_len, 80);
} }
#if 0 #if 0
{ {

View File

@ -84,6 +84,8 @@ namespace mt
int inwater_oxygen_recover = 0; int inwater_oxygen_recover = 0;
int revive_time = 15; int revive_time = 15;
int move_step_len = 80;
}; };
static void StaticPostInit(); static void StaticPostInit();
static const S& s() { return s_; }; static const S& s() { return s_; };

View File

@ -789,7 +789,7 @@ void Player::_CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg)
std::fabs(new_move_dir.y - GetMoveDir().y) > 0.00001f || std::fabs(new_move_dir.y - GetMoveDir().y) > 0.00001f ||
std::fabs(new_move_dir.z - GetMoveDir().z) > 0.00001f) { std::fabs(new_move_dir.z - GetMoveDir().z) > 0.00001f) {
SetMoveDir(new_move_dir); SetMoveDir(new_move_dir);
GetMovement()->CalcTargetPos(kMoveStep); GetMovement()->CalcTargetPos(mt::Param::s().move_step_len);
} }
moving = true; moving = true;
} }