Redoing movement to introduce proper rotation

This commit is contained in:
KimLS
2018-09-24 22:41:53 -07:00
parent 1aa97957d8
commit 29ea65a71e
25 changed files with 423 additions and 1311 deletions
-29
View File
@@ -188,10 +188,6 @@ bool Client::Process() {
if (IsStunned() && stunned_timer.Check())
Mob::UnStun();
if (!m_CheatDetectMoved) {
m_TimeSinceLastPositionCheck = Timer::GetCurrentTime();
}
if (bardsong_timer.Check() && bardsong != 0) {
//NOTE: this is kinda a heavy-handed check to make sure the mob still exists before
//doing the next pulse on them...
@@ -412,31 +408,6 @@ bool Client::Process() {
}
}
if (position_timer.Check()) {
if (IsAIControlled())
{
if (!IsMoving())
{
animation = 0;
m_Delta = glm::vec4(0.0f, 0.0f, 0.0f, m_Delta.w);
SendPositionUpdate(true);
}
}
// Send a position packet every 8 seconds - if not done, other clients
// see this char disappear after 10-12 seconds of inactivity
if (position_timer_counter >= 36) { // Approx. 4 ticks per second
entity_list.SendPositionUpdates(this, pLastUpdateWZ, RuleI(Range, MobPositionUpdates), GetTarget(), true);
pLastUpdate = Timer::GetCurrentTime();
pLastUpdateWZ = pLastUpdate;
position_timer_counter = 0;
}
else {
pLastUpdate = Timer::GetCurrentTime();
position_timer_counter++;
}
}
if (HasVirus()) {
if (viral_timer.Check()) {
viral_timer_counter++;