From 6f7f9c2ee9e52063fa12b105dba531e478d8f8d5 Mon Sep 17 00:00:00 2001 From: div0 Date: Mon, 3 Aug 2009 13:44:30 +0000 Subject: [PATCH] credits update tracebug test case update git-svn-id: svn://svn.icculus.org/nexuiz/trunk@7296 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/nexuiz-credits.txt | 21 ++++++++++++--------- data/qcsrc/server/gamecommand.qc | 32 +++++++++++++++++++++++++++++--- 2 files changed, 41 insertions(+), 12 deletions(-) diff --git a/data/nexuiz-credits.txt b/data/nexuiz-credits.txt index 56b84bae1..bc6bacc7c 100644 --- a/data/nexuiz-credits.txt +++ b/data/nexuiz-credits.txt @@ -22,25 +22,28 @@ SavageX Andreas "Black" Kirsch *Programmer -Stephan "esteel" Stahl -*Programmer +Michael "Tenshihan" Quinn +*Sound FX and Player-Voices + +Paul "Strahlemann" Evers +*Level Designer Peter "Morphed" Pielak *Artist -Paul "Strahlemann" Evers -*Level Designer +Samual Lenks +*Programmer -Wolfgang "Blub\0" Bumiller +Saulo "mand1nga" Gil +*Programmer + +Stephan "esteel" Stahl *Programmer Tyler "-z-" Mulligan *Web Developer and Interaction Designer -Michael "Tenshihan" Quinn -*Sound FX and Player-Voices - -Saulo "mand1nga" Gil +Wolfgang "Blub\0" Bumiller *Programmer diff --git a/data/qcsrc/server/gamecommand.qc b/data/qcsrc/server/gamecommand.qc index c73474e69..e1bca263a 100644 --- a/data/qcsrc/server/gamecommand.qc +++ b/data/qcsrc/server/gamecommand.qc @@ -875,7 +875,8 @@ void GameCommand(string command) print("TEST CASE. If this returns the runaway loop counter error, possibly everything is oaky.\n"); for(;;) { - vector org, delta, start, end, p; + vector org, delta, start, end, p, pos; + float safe, unsafe; org = world.mins; delta = world.maxs - world.mins; @@ -902,11 +903,36 @@ void GameCommand(string command) tracebox(start, PL_MIN, PL_MAX, end, MOVE_NOMONSTERS, world); tracebox(p, PL_MIN, PL_MAX, p, MOVE_NOMONSTERS, world); + // how much do we need to back off? + safe = 1; + unsafe = 0; + for(;;) + { + pos = p * (1 - (safe + unsafe) * 0.5) + start * ((safe + unsafe) * 0.5); + tracebox(pos, PL_MIN, PL_MAX, pos, MOVE_NOMONSTERS, world); + if(trace_startsolid) + { + if((safe + unsafe) * 0.5 == unsafe) + break; + unsafe = (safe + unsafe) * 0.5; + } + else + { + if((safe + unsafe) * 0.5 == safe) + break; + safe = (safe + unsafe) * 0.5; + } + } + + print("safe distance to back off: ", ftos(safe * vlen(p - start)), "qu\n"); + print("unsafe distance to back off: ", ftos(unsafe * vlen(p - start)), "qu\n"); + tracebox(p, PL_MIN + '0.1 0.1 0.1', PL_MAX - '0.1 0.1 0.1', p, MOVE_NOMONSTERS, world); if(trace_startsolid) - error(strcat("trace_endpos much in solid when tracing from ", vtos(start), " to ", vtos(end), " endpos ", vtos(trace_endpos), "\n")); + print("trace_endpos much in solid when tracing from ", vtos(start), " to ", vtos(end), " endpos ", vtos(trace_endpos), "\n"); else - error(strcat("trace_endpos just in solid when tracing from ", vtos(start), " to ", vtos(end), " endpos ", vtos(trace_endpos), "\n")); + print("trace_endpos just in solid when tracing from ", vtos(start), " to ", vtos(end), " endpos ", vtos(trace_endpos), "\n"); + break; } } } -- 2.39.2