X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fphysics%2Fmovetypes%2Ftoss.qc;fp=qcsrc%2Fcommon%2Fphysics%2Fmovetypes%2Ftoss.qc;h=67405a636498d0f0aef004f2b5236750e42dda4d;hp=772eb1b070c59a2be0df4aa72df5bc904e115838;hb=52a9c292d13ebe409521e61be89dcb4eebe1114e;hpb=3361c3ad17aad16593146d25e69233922b7cfd66 diff --git a/qcsrc/common/physics/movetypes/toss.qc b/qcsrc/common/physics/movetypes/toss.qc index 772eb1b07..67405a636 100644 --- a/qcsrc/common/physics/movetypes/toss.qc +++ b/qcsrc/common/physics/movetypes/toss.qc @@ -56,9 +56,17 @@ void _Movetype_Physics_Toss(entity this, float dt) // SV_Physics_Toss if (wasfreed(this)) return; - if (trace_startsolid) + // NOTE: this is bmodelstartsolid in the engine + if (trace_startsolid && trace_ent.solid == SOLID_BSP) { + // QC lacks pointers so we must save the old trace values + float oldtrace_fraction = trace_fraction; + vector oldtrace_plane_normal = trace_plane_normal; + entity oldtrace_ent = trace_ent; _Movetype_UnstickEntity(this); + trace_fraction = oldtrace_fraction; + trace_plane_normal = oldtrace_plane_normal; + trace_ent = oldtrace_ent; if(!_Movetype_PushEntity(this, move, true, true)) return; if (wasfreed(this))