From: TimePath Date: Fri, 15 Apr 2016 02:40:57 +0000 (+1000) Subject: Merge branch 'master' into TimePath/ecs X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5d41cbf8c0dec76b0a0658a61d573e78e6b5a54a;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into TimePath/ecs --- 5d41cbf8c0dec76b0a0658a61d573e78e6b5a54a diff --cc qcsrc/ecs/sv_main.qc index 000000000,000000000..e3a36e4e6 new file mode 100644 --- /dev/null +++ b/qcsrc/ecs/sv_main.qc @@@ -1,0 -1,0 +1,49 @@@ ++// interpolating with the engine: ++// it.movetype = MOVETYPE_STEP; // engine only interpolates this movetype ++// it.flags |= FL_FLY; // don't apply forces ++// it.solid = SOLID_NOT; // don't make stepping sounds ++ ++entity testent; ++ ++bool net_object_send(entity this, entity to, int sendflags) { ++ WriteHeader(MSG_ENTITY, ENT_OBJECT); ++ serialize(ENT_OBJECT, MSG_ENTITY, this); ++ return true; ++} ++ ++void spawnfunc_worldspawn() ++{ ++ static_init(); ++ static_init_late(); ++ // static_init_precache(); ++ ++ entity it = testent = spawn(); ++ precache_model("models/player/erebus.iqm"); ++ _setmodel(it, "models/player/erebus.iqm"); ++ ++ Net_LinkEntity(it, true, 0, net_object_send); ++} ++ ++void PlayerPreThink(entity this) ++{ ++ // the truth: time ++ // what the client knows: time - this.ping ++ // for fairness, don't compensate shots beyond 400ms ++ // what the client sees: _ - this.cl_interp; ++} ++ ++void StartFrame() ++{ ++ float f = 1 / autocvar_xon_sys_phys_dt; ++ float n = 5; ++ float x = ((floor(time * f) / f) % n) / n; ++ vector norg = '0 1 0' * x * 500; ++ if (norg != testent.origin) ++ { ++ if (!norg) testent.effects |= EF_TELEPORT_BIT; ++ testent.SendFlags |= 1; ++ setorigin(testent, norg); ++ testent.angles = '0 -360 0' * x; ++ // testent.origin = norg; ++ } ++}