diff --git a/source/src/server.cpp b/source/src/server.cpp index 5dc82b31..7c91caba 100644 --- a/source/src/server.cpp +++ b/source/src/server.cpp @@ -1364,7 +1364,7 @@ void serverdamage(client *target, client *actor, int damage, int gun, bool gib, checkfrag(target, actor, gun, gib); if(target!=actor) { - if(!isteam(target->team, actor->team)) actor->state.frags += gib && gun != GUN_GRENADE ? 2 : 1; + if(!isteam(target->team, actor->team)) actor->state.frags += gib && gun != GUN_GRENADE && gun != GUN_SHOTGUN ? 2 : 1; else { actor->state.frags--; diff --git a/source/src/serverchecks.h b/source/src/serverchecks.h index 7d9a6819..a94873b9 100644 --- a/source/src/serverchecks.h +++ b/source/src/serverchecks.h @@ -9,8 +9,7 @@ inline float pow2(float x) #define MINELINE 50 //FIXME -/* There are smarter ways to implement this function */ -// flowtron: 2010jun27 : mapdims[6] is probably "good enough" - so this might be deprecated - mapdims would need a server-side implementation though. +/* There are smarter ways to implement this function, but must probably they will be very complex */ int getmaxarea(int inversed_x, int inversed_y, int transposed, int maplayout_factor, char *maplayout) { int ls = (1 << maplayout_factor); @@ -116,7 +115,7 @@ inline void addpt(client *c, int points) { #define FRAGPT 10 // player frags (normal) #define HEADSHOTPT 15 // player gibs with head shot #define KNIFEPT 20 // player gibs with the knife -#define SHOTGPT 15 // player gibs with the shotgun +#define SHOTGPT 12 // player gibs with the shotgun #define TKPT -10 // player tks #define FLAGTKPT -(10+cnumber) // player tks the flag keeper/stealer diff --git a/source/src/tools.cpp b/source/src/tools.cpp index dc97a49f..37e98b6f 100644 --- a/source/src/tools.cpp +++ b/source/src/tools.cpp @@ -85,12 +85,12 @@ mapstats *loadmapstats(const char *filename, bool getlayout) { char *c = testlayout + k; int type = f->getchar(); + int n = 1; switch(type) { case 255: { - int n = f->getchar(); - if(!t || n < 0) { fail = true; break; } + if(!t || (n = f->getchar()) < 0) { fail = true; break; } memset(c, *t, n); k += n - 1; break; @@ -118,8 +118,8 @@ mapstats *loadmapstats(const char *filename, bool getlayout) break; } if ( type != SOLID && diff > 6 ) { - Marea++; - Mvolume+=diff; + Marea += n; + Mvolume += diff * n; } if(fail) break; t = c; diff --git a/source/src/worldio.cpp b/source/src/worldio.cpp index 190b697e..33f055e1 100644 --- a/source/src/worldio.cpp +++ b/source/src/worldio.cpp @@ -534,6 +534,7 @@ bool load_world(char *mname) // still supports all map formats that have char *c = mlayout + k; sqr *s = &world[k]; int type = f ? f->getchar() : -1; + int n = 1; switch(type) { case -1: @@ -557,7 +558,6 @@ bool load_world(char *mname) // still supports all map formats that have } case 255: { - int n; if(!t || (n = f->getchar()) < 0) { delete f; f = NULL; k--; continue; } char tmp = *(c-1); memset(c, tmp, n); @@ -615,8 +615,8 @@ bool load_world(char *mname) // still supports all map formats that have } } if ( type != SOLID && diff > 6 ) { - Ma++; - Mv+=diff; + Ma += n; + Mv += diff * n; } s->defer = 0; t = s; @@ -628,7 +628,7 @@ bool load_world(char *mname) // still supports all map formats that have c2skeepalive(); int cwx, cwy; loopk(4) mapdims[k] = k < 2 ? ssize : 0; - loopk(cubicsize) + loopk(cubicsize) // FIXME // it is really necessary to loop again? { switch(world[k].type) { @@ -649,6 +649,9 @@ bool load_world(char *mname) // still supports all map formats that have } } loopk(2) mapdims[k+4] = mapdims[k+2] - mapdims[k]; + /* the results of this function do not make sense: + ac_desert: 070:070 - 185:185 : maxW 115 maxH 115 : Area 10216 + ac_douze: 075:067 - 187:189 : maxW 112 maxH 122 : Area 9926 */ int *mapll; mapll = new int[ssize]; // for testing loopj(ssize) @@ -671,6 +674,7 @@ bool load_world(char *mname) // still supports all map formats that have mapdims[4], mapdims[5], mapdims[6] ); // TESTING + loopi(7) mapdims[i] = 0; pushscontext(IEXC_MAPCFG); // untrusted altogether persistidents = false; execfile("config/default_map_settings.cfg");