diff --git a/src/header/local.h b/src/header/local.h index 3d6a3b2..2203d02 100644 --- a/src/header/local.h +++ b/src/header/local.h @@ -755,7 +755,6 @@ void cleanupHealTarget(edict_t *ent); #define DEFAULT_BULLET_VSPREAD 500 #define DEFAULT_SHOTGUN_HSPREAD 1000 #define DEFAULT_SHOTGUN_VSPREAD 500 -#define DEFAULT_DEATHMATCH_SHOTGUN_COUNT 12 #define DEFAULT_SHOTGUN_COUNT 12 #define DEFAULT_SSHOTGUN_COUNT 20 diff --git a/src/player/client.c b/src/player/client.c index 907530c..af5ed6a 100644 --- a/src/player/client.c +++ b/src/player/client.c @@ -325,7 +325,7 @@ ClientObituary(edict_t *self, edict_t *inflictor /* unused */, edict_t *attacker self->enemy = attacker; - if (attacker && attacker->client) + if (attacker->client) { switch (mod) { @@ -589,7 +589,7 @@ LookAtKiller(edict_t *self, edict_t *inflictor, edict_t *attacker) { vec3_t dir; - if (!self || !inflictor || !attacker) + if (!self) { return; } @@ -833,7 +833,6 @@ InitClientPersistant(gclient_t *client) client->pers.max_prox = 50; client->pers.max_tesla = 50; client->pers.max_flechettes = 200; - client->pers.max_flechettes = 200; client->pers.max_rounds = 100; client->pers.connected = true; diff --git a/src/player/weapon.c b/src/player/weapon.c index 7500c43..e365b75 100644 --- a/src/player/weapon.c +++ b/src/player/weapon.c @@ -537,7 +537,7 @@ Weapon_Generic(edict_t *ent, int FRAME_ACTIVATE_LAST, int FRAME_FIRE_LAST, int F { int n; - if (!ent || !pause_frames || !fire) + if (!ent || !fire) { return; } @@ -1711,16 +1711,8 @@ weapon_shotgun_fire(edict_t *ent) kick *= damage_multiplier; } - if (deathmatch->value) - { - fire_shotgun(ent, start, forward, damage, kick, 500, 500, - DEFAULT_DEATHMATCH_SHOTGUN_COUNT, MOD_SHOTGUN); - } - else - { - fire_shotgun(ent, start, forward, damage, kick, 500, 500, - DEFAULT_SHOTGUN_COUNT, MOD_SHOTGUN); - } + fire_shotgun(ent, start, forward, damage, kick, 500, 500, + DEFAULT_SHOTGUN_COUNT, MOD_SHOTGUN); /* send muzzle flash */ gi.WriteByte(svc_muzzleflash); diff --git a/src/shared/shared.c b/src/shared/shared.c index 1b8635d..7db313d 100644 --- a/src/shared/shared.c +++ b/src/shared/shared.c @@ -57,7 +57,7 @@ RotatePointAroundVector(vec3_t dst, const vec3_t dir, im[2][1] = m[1][2]; memset(zrot, 0, sizeof(zrot)); - zrot[0][0] = zrot[1][1] = zrot[2][2] = 1.0F; + zrot[1][1] = zrot[2][2] = 1.0F; zrot[0][0] = (float)cos(DEG2RAD(degrees)); zrot[0][1] = (float)sin(DEG2RAD(degrees)); @@ -851,6 +851,7 @@ Swap_Init(void) byte swaptest[2] = {1, 0}; /* set the byte swapping variables in a portable manner */ + /* PVS NOTE: maybe use memcpy instead? */ if (*(short *)swaptest == 1) { bigendien = false; @@ -1072,7 +1073,7 @@ Com_sprintf(char *dest, int size, char *fmt, ...) len = vsnprintf(bigbuffer, 0x10000, fmt, argptr); va_end(argptr); - if ((len >= size) || (len == size)) + if (len >= size) { Com_Printf("Com_sprintf: overflow\n"); @@ -1325,7 +1326,7 @@ Info_SetValueForKey(char *s, char *key, char *value) Info_RemoveKey(s, key); - if (!value || !strlen(value)) + if (*value == '\0') { return; }