void MobMovementManager::FillCommandStruct(PlayerPositionUpdateServer_Struct *spu, Mob *m, float dx, float dy, float dz, float dh, int anim) { memset(spu, 0x00, sizeof(PlayerPositionUpdateServer_Struct)); spu->spawn_id = m->GetID(); spu->x_pos = FloatToEQ19(m->GetX()); spu->y_pos = FloatToEQ19(m->GetY()); spu->z_pos = FloatToEQ19(m->GetZ()); spu->heading = FloatToEQ12(m->GetHeading()); spu->delta_x = FloatToEQ13(dx); spu->delta_y = FloatToEQ13(dy); spu->delta_z = FloatToEQ13(dz); spu->delta_heading = FloatToEQ10(dh); spu->animation = (m->IsBot() ? (int)((float)anim / 1.785714f) : anim); }
void PerlPacket::SetEQ1913(uint32 pos, float part19, float part13) { if(pos + sizeof(EQ1913) > len || packet == NULL) return; EQ1913 *p = (EQ1913 *) (packet + pos); p->part19 = FloatToEQ19(part19); p->part13 = FloatToEQ13(part13); }