]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add some extra information to a few of the CSQC prints to better help with debugging
authorSamual <samual@xonotic.org>
Tue, 3 May 2011 16:53:36 +0000 (12:53 -0400)
committerSamual <samual@xonotic.org>
Tue, 3 May 2011 16:53:36 +0000 (12:53 -0400)
qcsrc/client/Main.qc
qcsrc/client/movetypes.qc

index 81a713c32456ee7d3b0d5034dacb31f9da1df228..6bd6b7bdbb383ec1f73a36015ef87867ed78ee5c 100644 (file)
@@ -717,7 +717,8 @@ void Ent_ReadPlayerScore()
 #ifdef DP_CSQC_ENTITY_REMOVE_IS_B0RKED
        if(!isNew && n != self.sv_entnum)
        {
-               print(_("A CSQC entity changed its owner!\n"));
+               //print(_("A CSQC entity changed its owner!\n"));
+               print(sprintf(_("A CSQC entity changed its owner! (edict: %d, classname: %s)\n"), num_for_edict(self), self.classname));
                isNew = true;
                Ent_Remove();
                self.enttype = ENT_CLIENT_SCORES;
@@ -931,7 +932,8 @@ void(float bIsNewEntity) CSQC_Ent_Update =
        if(self.enttype)
                if(t != self.enttype)
                {
-                       print(_("A CSQC entity changed its type!\n"));
+                       //print(_("A CSQC entity changed its type!\n"));
+                       print(sprintf(_("A CSQC entity changed its type! (edict: %d, classname: %s)\n"), num_for_edict(self), self.classname));
                        Ent_Remove();
                        bIsNewEntity = 1;
                }
@@ -968,7 +970,8 @@ void(float bIsNewEntity) CSQC_Ent_Update =
                case ENT_CLIENT_GAUNTLET: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_GAUNTLET); break;
                case ENT_CLIENT_ACCURACY: Ent_ReadAccuracy(); break;
                default:
-                       error(strcat(_("unknown entity type in CSQC_Ent_Update: %d\n"), self.enttype));
+                       //error(strcat(_("unknown entity type in CSQC_Ent_Update: %d\n"), self.enttype));
+                       error(sprintf(_("Unknown entity type in CSQC_Ent_Update (enttype: %d, edict: %d, classname: %s)\n"), self.enttype, num_for_edict(self), self.classname));
                        break;
        }
 
index 1d6a6e393d59dd6bc450d7b2311702db573204c7..9a17dea35694f9ee005b836f603d65071a2ac7ba 100644 (file)
@@ -156,10 +156,10 @@ float _Movetype_UnstickEntity() // SV_UnstickEntity
                if(!_Movetype_TestEntityPosition('0 0 -1' * i)) goto success;
                if(!_Movetype_TestEntityPosition('0 0 1' * i)) goto success;
        }
-       dprint("Some entity is stuck\n");
+       dprint(sprintf(_("Can't unstick an entity (edict: %d, classname: %s, origin: %s)\n"), num_for_edict(self), self.classname, vtos(self.move_origin)));
        return FALSE;
 :success
-       dprint("Unstuck some entity\n");
+       dprint(sprintf(_("Sucessfully unstuck an entity (edict: %d, classname: %s, origin: %s)\n"), num_for_edict(self), self.classname, vtos(self.move_origin)));
        _Movetype_LinkEdict(TRUE);
        return TRUE;
 }