mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
Merge remote-tracking branch 'remotes/origin/logging_changes'
This commit is contained in:
@@ -97,7 +97,6 @@ void repair_a_high_waypoint(Map *map, PathNode *it) {
|
||||
}
|
||||
} else {
|
||||
z_no_map_count++;
|
||||
//printf("Missed: (%.3f, %.3f, %.3f)\n", it->x, it->y, it->z);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,8 +198,6 @@ RESTART_WP_REDUCE:
|
||||
//we are removing the second one
|
||||
wp_reduce_count++;
|
||||
|
||||
//printf("pos=%d/%d\n", pos, g->nodes.size());
|
||||
//printf("trail = 0x%x(0x%x) (%.3f, %.3f, %.3f)\n",
|
||||
// *trail, second, (*trail)->x, (*trail)->y, (*trail)->z);
|
||||
//trail = cur2;
|
||||
|
||||
@@ -277,7 +274,6 @@ void break_long_lines(list<PathGraph*> &db_paths) {
|
||||
if(len2 < cutlen2)
|
||||
continue;
|
||||
|
||||
//printf("Cut (%.3f,%.3f,%.3f) -> (%.3f,%.3f,%.3f) d2=%.3f\n", e->from->x, e->from->y, e->from->z, e->to->x, e->to->y, e->to->z, len2);
|
||||
|
||||
float len = sqrt(len2);
|
||||
v1.x = (e->to->x - e->from->x)/len;
|
||||
@@ -297,7 +293,6 @@ void break_long_lines(list<PathGraph*> &db_paths) {
|
||||
ee = new PathEdge(last_node, n);
|
||||
last_node = n;
|
||||
|
||||
//printf(" (%.3f,%.3f,%.3f) -> (%.3f,%.3f,%.3f) d2=%.3f\n", ee->from->x, ee->from->y, ee->from->z, ee->to->x, ee->to->y, ee->to->z, e->from->Dist2(e->to));
|
||||
g->edges.push_back(ee);
|
||||
g->nodes.push_back(n);
|
||||
|
||||
@@ -967,7 +962,6 @@ run an algorithm to remove redundancy:
|
||||
RESTART_GRID_CLEAN:
|
||||
cur = big->nodes.begin();
|
||||
end = big->nodes.end();
|
||||
//printf("Starting clean at pos %d with %d nodes\n", cur_pos, big->nodes.size());
|
||||
for(r = 0; r < cur_pos; r++)
|
||||
cur++;
|
||||
for(; cur != end; cur++, cur_pos++, stat++) {
|
||||
@@ -989,16 +983,13 @@ RESTART_GRID_CLEAN:
|
||||
if(n == f)
|
||||
continue;
|
||||
if(n->Dist2(f) > ce2) {
|
||||
//printf("Dist %f, ce2 %f\n", n->Dist2(f), ce2);
|
||||
continue;
|
||||
}
|
||||
//printf("Distbbb %f, ce2 %f, (%f,%f), (%f,%f)\n", n->Dist2(f), ce2, n->x, n->y, f->x, f->y);
|
||||
|
||||
#ifdef COMBINE_CHECK_ALL_LOS
|
||||
//we should merge these. Now we wanna check to make sure combining
|
||||
//them will not cause the old node's edges to become invalid.
|
||||
|
||||
//printf("Checking combine LOS on %d, with %d edges.\n", r, big->edges.size());
|
||||
badlos = false;
|
||||
|
||||
if(node_edges.count(f) == 1) {
|
||||
@@ -1618,7 +1609,6 @@ void count_crossing_lines(list<PathEdge *> &edges, PathGraph *out, PathGraph *ex
|
||||
|
||||
|
||||
if(count >= CROSS_REDUCE_COUNT) {
|
||||
//printf("Edge crosses %d edges.\n", count);
|
||||
out->edges.push_back(e);
|
||||
cross_edge_count++;
|
||||
cross_list[e] = hits;
|
||||
@@ -1847,7 +1837,6 @@ QTNode *build_quadtree(Map *map, PathGraph *big) {
|
||||
end = _root->nodes.end();
|
||||
//int findex = 0;
|
||||
for(; curs != end; curs++) {
|
||||
//printf("Started With node index %d (0x%x)\n", findex++, *curs);
|
||||
}
|
||||
|
||||
_root->divideYourself(0);
|
||||
@@ -1915,7 +1904,6 @@ bool write_path_file(QTNode *_root, PathGraph *big, const char *file, vector< ve
|
||||
end = big->nodes.end();
|
||||
int nn = 0;
|
||||
for(; cur != end; cur++, curn++, nn++) {
|
||||
//printf("Filling node %d/%d n=0x%x, lb=0x%x, curl=0x%x/0x%x\n", nn, index, *cur, linkBlock, curl, &linkBlock[eoffset]);
|
||||
n = *cur;
|
||||
if(n == NULL) {
|
||||
printf("Got NULL node building quadtree, WTF.");
|
||||
@@ -1926,7 +1914,6 @@ int nn = 0;
|
||||
curn->z = n->z;
|
||||
curn->link_offset = eoffset;
|
||||
curn->distance = n->longest_path;
|
||||
//printf("Node %d: (%.2f,%.2f,%.2f) LO %d, D %d\n", nn, curn->x, curn->y, curn->z, curn->link_offset, curn->distance);
|
||||
|
||||
int ecount = 0;
|
||||
cur4 = big->edges.begin();
|
||||
@@ -1939,7 +1926,6 @@ int nn = 0;
|
||||
curl = &linkBlock[eoffset];
|
||||
curl->dest_node = e->to->node_id;
|
||||
curl->reach = e->normal_reach;
|
||||
//printf("\tLinkFrom %d: dest %d, reach %d\n", eoffset, curl->dest_node, curl->reach);
|
||||
from_edges[e] = ecount;
|
||||
ecount++;
|
||||
eoffset++;
|
||||
@@ -1948,7 +1934,6 @@ int nn = 0;
|
||||
curl = &linkBlock[eoffset];
|
||||
curl->dest_node = e->from->node_id;
|
||||
curl->reach = e->reverse_reach;
|
||||
//printf("\tLinkTo %d: dest %d, reach %d\n", eoffset, curl->dest_node, curl->reach);
|
||||
to_edges[e] = ecount;
|
||||
ecount++;
|
||||
eoffset++;
|
||||
@@ -1959,7 +1944,6 @@ int nn = 0;
|
||||
printf("ERROR: a node has more than %d links, number will be truncated!", PATH_LINK_OFFSET_NONE-1);
|
||||
}
|
||||
curn->link_count = ecount;
|
||||
//printf("Used up to slot %d of %d in links\n", eoffset, head.link_count);
|
||||
}
|
||||
|
||||
//write vertexBlock
|
||||
|
||||
@@ -297,7 +297,6 @@ void color_disjoint_graphs(
|
||||
if(n->color != 0)
|
||||
continue; //allready visited
|
||||
|
||||
//printf("New Color at: (%.3f,%.3f,%.3f)\n", n->x, n->y, n->z);
|
||||
|
||||
cc = 1;
|
||||
djc = 0;
|
||||
@@ -457,7 +456,6 @@ void calc_path_lengths(Map *map, MyGraph &vg, PathGraph *big, map<PathEdge *, Ed
|
||||
|
||||
int longest = longest_dists[n->node_id];
|
||||
//n->longest_path = longest;
|
||||
//printf("Node %d's longest path is %d\n", n->node_id, longest);
|
||||
|
||||
if(longest < shortest) {
|
||||
shortest = longest;
|
||||
@@ -476,7 +474,6 @@ printf("The tree's root is %d\n", shortest_node);
|
||||
n->longest_path = 0;
|
||||
else
|
||||
n->longest_path = root_dists[n->node_id];
|
||||
//printf("Node %d's distance from root is %d\n", n->node_id, root_dists[n->node_id]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -86,17 +86,14 @@ void QTNode::fillBlocks(PathTree_Struct *heads, PathPointRef *flist, unsigned lo
|
||||
head->miny = miny;
|
||||
head->maxy = maxy;
|
||||
head->flags = 0;
|
||||
//printf("Node %u: (%.2f -> %.2f, %.2f -> %.2f)\n", hindex-1, head->minx, head->maxx, head->miny, head->maxy);
|
||||
|
||||
//rearranged to give all QT nodes a node list
|
||||
head->nodelist.count = nodes.size();
|
||||
head->nodelist.offset = findex;
|
||||
//printf(" Final node with %u nodes, list offset %lu.\n", head->nodes.count, head->nodes.offset);
|
||||
list<PathNode *>::iterator curs,end;
|
||||
curs = nodes.begin();
|
||||
end = nodes.end();
|
||||
for(; curs != end; curs++) {
|
||||
//printf("Got to node index %d (0x%x)\n", findex, *curs);
|
||||
PathNode *cur = *curs;
|
||||
flist[findex] = cur->node_id;
|
||||
findex++;
|
||||
@@ -283,7 +280,6 @@ void QTNode::buildVertexes() {
|
||||
}
|
||||
|
||||
bool QTNode::IsInNode(const QTNode *n, const PathNode *o) {
|
||||
//printf("IIN: (%.3f,%.3f) in (%.3f -> %.3f, %.3f -> %.3f)\n", o->x, o->y, n->minx, n->maxx, n->miny, n->maxy);
|
||||
if( o->x >= n->minx && o->x < n->maxx
|
||||
&& o->y >= n->miny && o->y < n->maxy )
|
||||
return(true);
|
||||
|
||||
@@ -257,7 +257,6 @@ long BSPCountNodes(BSP_Node *tree, long node_number) {
|
||||
|
||||
|
||||
long BSPFindRegion(BSP_Node *tree, long node_number, long region) {
|
||||
//printf("Find Region %ld in node %ld\n", region, node_number);
|
||||
if(node_number<1) {
|
||||
printf("Something went wrong\n");
|
||||
exit(1);
|
||||
@@ -329,7 +328,6 @@ long BSPFindNode(BSP_Node *tree, long node_number, float x, float y, float z) {
|
||||
|
||||
|
||||
long BSPMarkRegion(BSP_Node *tree, long node_number, long region, int region_type) {
|
||||
//printf("Find Region %ld in node %ld\n", region, node_number);
|
||||
if(node_number<1) {
|
||||
printf("Something went wrong\n");
|
||||
exit(1);
|
||||
|
||||
@@ -584,12 +584,10 @@ void QTNode::fillBlocks(nodeHeader *heads, unsigned long *flist, unsigned long &
|
||||
head->miny = miny;
|
||||
head->maxy = maxy;
|
||||
head->flags = 0;
|
||||
//printf("Node %u: (%.2f -> %.2f, %.2f -> %.2f)\n", hindex-1, head->minx, head->maxx, head->miny, head->maxy);
|
||||
if(final) {
|
||||
head->flags |= nodeFinal;
|
||||
head->faces.count = faces.size();
|
||||
head->faces.offset = findex;
|
||||
//printf(" Final node with %u faces, list offset %lu.\n", head->faces.count, head->faces.offset);
|
||||
unsigned long r;
|
||||
for(r = 0; r < head->faces.count; r++) {
|
||||
flist[findex] = faces[r].index;
|
||||
|
||||
@@ -178,7 +178,6 @@ const char *PFSLoader::FindExtension(const char *ext) {
|
||||
int elen = strlen(ext);
|
||||
|
||||
for(i = 0; i < this->count; ++i) {
|
||||
//printf("Look for %s: got %s\n", ext, this->filenames[i]);
|
||||
int flen = strlen(this->filenames[i]);
|
||||
if(flen <= elen)
|
||||
continue;
|
||||
@@ -197,7 +196,6 @@ int PFSLoader::GetFile(char *name, uchar **buf, int *len) {
|
||||
Lower(name);
|
||||
|
||||
for(i = 0; i < this->count; ++i) {
|
||||
//printf("Look for %s: got %s\n", name, this->filenames[i]);
|
||||
if(!strcmp(this->filenames[i], name)) {
|
||||
fseek(this->fp, this->files[i], SEEK_SET);
|
||||
fread(&s3d_dir, sizeof(struct_directory), 1, this->fp);
|
||||
|
||||
@@ -151,7 +151,6 @@ int line_count = 0;
|
||||
var = (char *) buffer;
|
||||
line_count++;
|
||||
|
||||
// printf("%s %s\n", val, var);
|
||||
|
||||
if(strlen(var) == 0 || strlen(val) == 0) {
|
||||
++buffer;
|
||||
@@ -166,7 +165,6 @@ int line_count = 0;
|
||||
mlist[j].basetex = new char[val_len + 1];
|
||||
memcpy(mlist[j].basetex, val, val_len + 1);
|
||||
++mat_count;
|
||||
// printf("%i: Basetex: %s\n", j + 1, mlist[j].basetex);
|
||||
++j;
|
||||
}
|
||||
else if(val[0] != 'e' && val[1] != '_' && ((var[0] != 'e' && var[1] != '_') || !strcmp(val, "e_fShininess0"))) {
|
||||
@@ -179,7 +177,6 @@ int line_count = 0;
|
||||
memcpy(mlist[j].name, val, val_len + 1);
|
||||
continue;
|
||||
}
|
||||
// printf("Named: %s\n", mlist[j].name);
|
||||
}
|
||||
|
||||
buffer += var_len + 1;
|
||||
@@ -321,7 +318,6 @@ printf("%d tris start at %d (0x%x)\n", zm->poly_count, (buffer-ter_orig), (buffe
|
||||
}
|
||||
zm->polys[j] = new Polygon;
|
||||
|
||||
//printf(" v1=%d, v2=%d, v3=%d, g=%d, unk=%d\n", ttri->v1, ttri->v2, ttri->v3, ttri->group, ttri->unk);
|
||||
|
||||
if(ttri->v1 >= zm->vert_count && errored < 10) {
|
||||
printf("Tri %d/%d (s %d) @0x%x: invalid v1: %d >= %d\n", i, zm->poly_count, skipped, (buffer-ter_orig), ttri->v1, zm->vert_count);
|
||||
|
||||
@@ -271,7 +271,6 @@ long BSPCountNodes(BSP_Node *tree, long node_number) {
|
||||
|
||||
|
||||
long BSPFindRegion(BSP_Node *tree, long node_number, long region) {
|
||||
//printf("Find Region %ld in node %ld\n", region, node_number);
|
||||
if(node_number<1) {
|
||||
printf("Something went wrong\n");
|
||||
exit(1);
|
||||
@@ -343,7 +342,6 @@ long BSPFindNode(BSP_Node *tree, long node_number, float x, float y, float z) {
|
||||
|
||||
|
||||
long BSPMarkRegion(BSP_Node *tree, long node_number, long region, int region_type) {
|
||||
//printf("Find Region %ld in node %ld\n", region, node_number);
|
||||
if(node_number<1) {
|
||||
printf("Something went wrong\n");
|
||||
exit(1);
|
||||
|
||||
@@ -447,12 +447,10 @@ void QTNode::fillBlocks(nodeHeader *heads, unsigned long *flist, unsigned long &
|
||||
head->miny = miny;
|
||||
head->maxy = maxy;
|
||||
head->flags = 0;
|
||||
//printf("Node %u: (%.2f -> %.2f, %.2f -> %.2f)\n", hindex-1, head->minx, head->maxx, head->miny, head->maxy);
|
||||
if(final) {
|
||||
head->flags |= nodeFinal;
|
||||
head->faces.count = faces.size();
|
||||
head->faces.offset = findex;
|
||||
//printf(" Final node with %u faces, list offset %lu.\n", head->faces.count, head->faces.offset);
|
||||
unsigned long r;
|
||||
for(r = 0; r < head->faces.count; r++) {
|
||||
flist[findex] = faces[r].index;
|
||||
|
||||
@@ -98,7 +98,6 @@ string GetToken(uchar *&Buffer, int &Position)
|
||||
++Position;
|
||||
}
|
||||
++Position;
|
||||
//printf("Returning %s\n", Token.c_str());
|
||||
return Token;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@ FRAG_CONSTRUCTOR(Data03) {
|
||||
memcpy(tex->filenames[i], buf, fnlen);
|
||||
decode((uchar *) tex->filenames[i], fnlen);
|
||||
|
||||
//printf("fnlen is %d, %s\n", fnlen, tex->filenames[i]);
|
||||
// Derision: Not sure why this check is here, but need to check fnlen is >=18
|
||||
if(fnlen>=18) {
|
||||
if(tex->filenames[i][fnlen - 8] == '.')
|
||||
@@ -188,7 +187,6 @@ FRAG_CONSTRUCTOR(Data22) {
|
||||
long Frag36Ref;
|
||||
if(data->flags==0x181) {
|
||||
Frag36Ref = *((long *) (data6area+20));
|
||||
//printf("Frag 36 reference?: %ld\n", *((long *) (data6area+20)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -107,7 +107,6 @@ int Zonv4Loader::Open(char *base_path, char *zone_name, Archive *archive)
|
||||
for(unsigned int i = 0; i < this->datloader.model_data.ModelNames.size(); ++i)
|
||||
{
|
||||
char tmp[200];
|
||||
//printf("Opening %s.mod\n", this->datloader.model_data.ModelNames[i].c_str());
|
||||
sprintf(tmp, "%s.mod", this->datloader.model_data.ModelNames[i].c_str());
|
||||
|
||||
char *str = tmp;
|
||||
|
||||
@@ -119,8 +119,6 @@ int main() {
|
||||
snprintf(bptr, 128, "' WHERE id=%lu", id);
|
||||
|
||||
// printf("Query: '%s'\n", outbuffer);
|
||||
//printf(outbuffer);
|
||||
//printf(";\n");
|
||||
/* if(mysql_query(&out, outbuffer) != 0) {
|
||||
failed_count++;
|
||||
printf(" Error updating char id %lu: %s\n", id, mysql_error(&m));
|
||||
|
||||
@@ -113,8 +113,6 @@ fprintf(stderr, "Char '%s' skill %d = %d\n", row[1], r, in_pp->skills[r]);
|
||||
snprintf(bptr, 128, "' WHERE id=%lu", id);
|
||||
|
||||
// printf("Query: '%s'\n", outbuffer);
|
||||
//printf(outbuffer);
|
||||
//printf(";\n");
|
||||
/* if(mysql_query(&out, outbuffer) != 0) {
|
||||
failed_count++;
|
||||
printf(" Error updating char id %lu: %s\n", id, mysql_error(&m));
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
-- ----------------------------
|
||||
-- Table structure for logsys_categories
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `logsys_categories`;
|
||||
CREATE TABLE `logsys_categories` (
|
||||
`log_category_id` int(11) NOT NULL,
|
||||
`log_category_description` varchar(150) DEFAULT NULL,
|
||||
`log_to_console` smallint(11) DEFAULT '0',
|
||||
`log_to_file` smallint(11) DEFAULT '0',
|
||||
`log_to_gmsay` smallint(11) DEFAULT '0',
|
||||
PRIMARY KEY (`log_category_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of logsys_categories
|
||||
-- ----------------------------
|
||||
INSERT INTO `logsys_categories` VALUES ('1', 'AA', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('2', 'AI', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('3', 'Aggro', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('4', 'Attack', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('5', 'Client_Server_Packet', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('6', 'Combat', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('7', 'Commands', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('8', 'Crash', '1', '1', '1');
|
||||
INSERT INTO `logsys_categories` VALUES ('9', 'Debug', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('10', 'Doors', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('11', 'Error', '1', '1', '1');
|
||||
INSERT INTO `logsys_categories` VALUES ('12', 'Guilds', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('13', 'Inventory', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('14', 'Launcher', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('15', 'Netcode', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('16', 'Normal', '1', '1', '1');
|
||||
INSERT INTO `logsys_categories` VALUES ('17', 'Object', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('18', 'Pathing', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('19', 'QS_Server', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('20', 'Quests', '1', '1', '1');
|
||||
INSERT INTO `logsys_categories` VALUES ('21', 'Rules', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('22', 'Skills', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('23', 'Spawns', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('24', 'Spells', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('25', 'Status', '1', '1', '1');
|
||||
INSERT INTO `logsys_categories` VALUES ('26', 'TCP_Connection', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('27', 'Tasks', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('28', 'Tradeskills', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('29', 'Trading', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('30', 'Tribute', '0', '1', '0');
|
||||
INSERT INTO `logsys_categories` VALUES ('31', 'UCS_Server', '1', '1', '1');
|
||||
INSERT INTO `logsys_categories` VALUES ('32', 'WebInterface_Server', '1', '1', '1');
|
||||
INSERT INTO `logsys_categories` VALUES ('33', 'World_Server', '1', '1', '1');
|
||||
INSERT INTO `logsys_categories` VALUES ('34', 'Zone Server', '1', '1', '1');
|
||||
INSERT INTO `logsys_categories` VALUES ('35', 'MySQL Error', '1', '1', '1');
|
||||
INSERT INTO `logsys_categories` VALUES ('36', 'MySQL Queries', '0', '1', '0');
|
||||
Reference in New Issue
Block a user