ent->persistent.muzzleflash = 0;
ent->persistent.trail_allowed = false;
}
+ else if ((ent->state_previous.effects & EF_TELEPORT_BIT) != (ent->state_current.effects & EF_TELEPORT_BIT))
+ {
+ // don't interpolate the move
+ ent->persistent.lerpdeltatime = 0;
+ ent->persistent.lerpstarttime = cl.mtime[1];
+ VectorCopy(ent->state_current.origin, ent->persistent.oldorigin);
+ VectorCopy(ent->state_current.angles, ent->persistent.oldangles);
+ VectorCopy(ent->state_current.origin, ent->persistent.neworigin);
+ VectorCopy(ent->state_current.angles, ent->persistent.newangles);
+ ent->persistent.trail_allowed = false;
+
+ if(ent->state_current.frame != ent->state_previous.frame)
+ {
+ // if we ALSO changed animation frame in the process (but ONLY then!)
+ // then let's reset the animation interpolation too
+ ent->render.frame1 = ent->render.frame2 = ent->state_current.frame;
+ ent->render.frame1time = ent->render.frame2time = cl.time;
+ ent->render.framelerp = 1;
+ }
+
+ // note that this case must do everything the following case does too
+ }
else if (DotProduct(odelta, odelta) > 1000*1000
|| (cl.fixangle[0] && !cl.fixangle[1])
|| (ent->state_previous.tagindex != ent->state_current.tagindex)
#define EF_UNUSED18 262144
#define EF_UNUSED19 524288
#define EF_UNUSED20 1048576
-#define EF_UNUSED21 2197152
+#define EF_TELEPORT_BIT 2197152 // div0: teleport bit (toggled when teleporting, prevents lerping when the bit has changed)
#define EF_LOWPRECISION 4194304 // LordHavoc: entity is low precision (integer coordinates) to save network bandwidth (serverside only)
#define EF_NOMODELFLAGS 8388608 // indicates the model's .effects should be ignored (allows overriding them)
#define EF_ROCKET 16777216 // leave a trail