X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Flib%2Fdeglobalization.qh;fp=qcsrc%2Flib%2Fdeglobalization.qh;h=d9417b4895ae45b3b483cbdbad0d83ffe6c13415;hb=c5724c3955aaa0135aebf8875b70a8f91358d582;hp=1097035bf77bff236f39d5267ea4e4b2d4f650a8;hpb=ac4f809419574ad8c2f10bc0531b303ed98c109f;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/lib/deglobalization.qh b/qcsrc/lib/deglobalization.qh index 1097035bf..d9417b489 100644 --- a/qcsrc/lib/deglobalization.qh +++ b/qcsrc/lib/deglobalization.qh @@ -20,13 +20,20 @@ #ifdef GAMEQC STATIC_INIT(globals) { // set to NaN to more easily detect uninitialized use - // TODO when all functions are wrapped and the raw functions are not used anymore, - // assert that the global vectors are NaN before calling the raw functions - // to make sure nobody (even builtins) is accidentally using them - NaN is the most likely value to expose remaining usages + // TODO when all functions are wrapped and the raw functions are not used anymore, + // assert that the global vectors are NaN before calling the raw functions + // to make sure nobody (even builtins) is accidentally using them - NaN is the most likely value to expose remaining usages + + // TODO make sure `isnan` actually works - potential compiler bug: + //LOG_INFOF("%f\n", 0.0/0.0 == 0.0/0.0); + //LOG_INFOF("%f\n", 0.0/0.0 != 0.0/0.0); + //float x = 0.0/0.0; + //LOG_INFOF("%f\n", x == x); + //LOG_INFOF("%f\n", x != x); + v_forward = VEC_NAN; v_right = VEC_NAN; v_up = VEC_NAN; - // FIXME check this is actually NaN } #endif