1 // interpolating with the engine:
2 // it.movetype = MOVETYPE_STEP; // engine only interpolates this movetype
3 // it.flags |= FL_FLY; // don't apply forces
4 // it.solid = SOLID_NOT; // don't make stepping sounds
8 bool net_object_send(entity this, entity to, int sendflags)
10 WriteHeader(MSG_ENTITY, ENT_OBJECT);
11 serialize(ENT_OBJECT, MSG_ENTITY, this);
15 void spawnfunc_worldspawn()
19 // static_init_precache();
21 entity it = testent = spawn();
22 precache_model("models/player/erebus.iqm");
23 _setmodel(it, "models/player/erebus.iqm");
25 Net_LinkEntity(it, true, 0, net_object_send);
28 void PlayerPreThink(entity this)
31 // what the client knows: time - this.ping
32 // for fairness, don't compensate shots beyond 400ms
33 // what the client sees: _ - this.cl_interp;
38 float f = 1 / autocvar_xon_sys_phys_dt;
40 float x = ((floor(time * f) / f) % n) / n;
41 vector norg = '0 1 0' * x * 500;
42 if (norg != testent.origin)
44 if (!norg) testent.effects |= EF_TELEPORT_BIT;
45 testent.SendFlags |= 1;
46 setorigin(testent, norg);
47 testent.angles = '0 -360 0' * x;
48 // testent.origin = norg;