[nexuiz-commits] r7602 - trunk/data/qcsrc/client
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu Sep 3 02:23:20 EDT 2009
Author: lordhavoc
Date: 2009-09-03 02:23:20 -0400 (Thu, 03 Sep 2009)
New Revision: 7602
Modified:
trunk/data/qcsrc/client/rubble.qc
Log:
fix bugs with removal of least recent rubble, there were uninitialized
variables and other chaotic elements
Modified: trunk/data/qcsrc/client/rubble.qc
===================================================================
--- trunk/data/qcsrc/client/rubble.qc 2009-09-03 05:47:37 UTC (rev 7601)
+++ trunk/data/qcsrc/client/rubble.qc 2009-09-03 06:23:20 UTC (rev 7602)
@@ -2,20 +2,26 @@
void RubbleDrop(entity list, void() deleteproc)
{
- float t,tt;
+ float t;
entity rub,old_rub;
rub = findchainentity(owner,list);
+ old_rub = rub;
+ t = rub.creationtime;
+ rub = rub.chain;
while(rub)
{
- if(rub.creationtime > t)
+ if(t > rub.creationtime)
{
+ t = rub.creationtime;
old_rub = rub;
- tt = t;
}
rub = rub.chain;
}
+ if (old_rub == world)
+ return;
+
rub = self;
self = old_rub;
deleteproc();
More information about the nexuiz-commits
mailing list