mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 05:21:29 +00:00
rewind_x, rewind_y,rewind_z replaced with m_RewindLocation of type xyz_location
This commit is contained in:
parent
cab1f986f1
commit
09f75c09b8
@ -4521,28 +4521,22 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app)
|
||||
float rewind_x_diff = 0;
|
||||
float rewind_y_diff = 0;
|
||||
|
||||
rewind_x_diff = ppu->x_pos - rewind_x;
|
||||
rewind_x_diff = ppu->x_pos - m_RewindLocation.m_X;
|
||||
rewind_x_diff *= rewind_x_diff;
|
||||
rewind_y_diff = ppu->y_pos - rewind_y;
|
||||
rewind_y_diff = ppu->y_pos - m_RewindLocation.m_Y;
|
||||
rewind_y_diff *= rewind_y_diff;
|
||||
|
||||
//We only need to store updated values if the player has moved.
|
||||
//If the player has moved more than units for x or y, then we'll store
|
||||
//his pre-PPU x and y for /rewind, in case he gets stuck.
|
||||
if ((rewind_x_diff > 750) || (rewind_y_diff > 750)) {
|
||||
rewind_x = m_Position.m_X;
|
||||
rewind_y = m_Position.m_Y;
|
||||
rewind_z = m_Position.m_Z;
|
||||
}
|
||||
if ((rewind_x_diff > 750) || (rewind_y_diff > 750))
|
||||
m_RewindLocation = m_Position;
|
||||
|
||||
//If the PPU was a large jump, such as a cross zone gate or Call of Hero,
|
||||
//just update rewind coords to the new ppu coords. This will prevent exploitation.
|
||||
|
||||
if ((rewind_x_diff > 5000) || (rewind_y_diff > 5000)) {
|
||||
rewind_x = ppu->x_pos;
|
||||
rewind_y = ppu->y_pos;
|
||||
rewind_z = ppu->z_pos;
|
||||
}
|
||||
if ((rewind_x_diff > 5000) || (rewind_y_diff > 5000))
|
||||
m_RewindLocation = xyz_location(ppu->x_pos, ppu->y_pos, ppu->z_pos);
|
||||
|
||||
if(proximity_timer.Check()) {
|
||||
entity_list.ProcessMove(this, ppu->x_pos, ppu->y_pos, ppu->z_pos);
|
||||
@ -11585,7 +11579,7 @@ void Client::Handle_OP_Rewind(const EQApplicationPacket *app)
|
||||
Message_StringID(MT_System, REWIND_WAIT);
|
||||
}
|
||||
else {
|
||||
CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), rewind_x, rewind_y, rewind_z, 0, 2, Rewind);
|
||||
CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), m_RewindLocation.m_X, m_RewindLocation.m_Y, m_RewindLocation.m_Z, 0, 2, Rewind);
|
||||
rewind_timer.Start(30000, true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -118,9 +118,7 @@ Mob::Mob(const char* in_name,
|
||||
AI_Init();
|
||||
SetMoving(false);
|
||||
moved=false;
|
||||
rewind_x = 0; //Stored x_pos for /rewind
|
||||
rewind_y = 0; //Stored y_pos for /rewind
|
||||
rewind_z = 0; //Stored z_pos for /rewind
|
||||
m_RewindLocation = xyz_location::Origin();
|
||||
move_tic_count = 0;
|
||||
|
||||
_egnode = nullptr;
|
||||
|
||||
@ -1056,7 +1056,6 @@ protected:
|
||||
uint8 pRunAnimSpeed;
|
||||
bool m_is_running;
|
||||
|
||||
|
||||
Timer attack_timer;
|
||||
Timer attack_dw_timer;
|
||||
Timer ranged_timer;
|
||||
@ -1091,9 +1090,8 @@ protected:
|
||||
uint8 projectile_increment[MAX_SPELL_PROJECTILE];
|
||||
float projectile_x[MAX_SPELL_PROJECTILE], projectile_y[MAX_SPELL_PROJECTILE], projectile_z[MAX_SPELL_PROJECTILE];
|
||||
|
||||
float rewind_x;
|
||||
float rewind_y;
|
||||
float rewind_z;
|
||||
xyz_location m_RewindLocation;
|
||||
|
||||
Timer rewind_timer;
|
||||
|
||||
// Currently 3 max nimbus particle effects at a time
|
||||
|
||||
@ -539,7 +539,7 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z
|
||||
SetHeading(heading);
|
||||
break;
|
||||
case Rewind:
|
||||
LogFile->write(EQEMuLog::Debug, "%s has requested a /rewind from %f, %f, %f, to %f, %f, %f in %s", GetName(), m_Position.m_X, m_Position.m_Y, m_Position.m_Z, rewind_x, rewind_y, rewind_z, zone->GetShortName());
|
||||
LogFile->write(EQEMuLog::Debug, "%s has requested a /rewind from %f, %f, %f, to %f, %f, %f in %s", GetName(), m_Position.m_X, m_Position.m_Y, m_Position.m_Z, m_RewindLocation.m_X, m_RewindLocation.m_Y, m_RewindLocation.m_Z, zone->GetShortName());
|
||||
zonesummon_x = m_Position.m_X = x;
|
||||
zonesummon_y = m_Position.m_Y = y;
|
||||
zonesummon_z = m_Position.m_Z = z;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user